mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
added view functionality to can set root decorated or not decorated, people which dont wants a + for the tree.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1278 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
57f86fdb00
commit
0a0816cb77
@ -207,7 +207,17 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
|||||||
|
|
||||||
clearcompletedAct = new QAction(QIcon(IMAGE_CLEARCOMPLETED), tr( "Clear Completed" ), this );
|
clearcompletedAct = new QAction(QIcon(IMAGE_CLEARCOMPLETED), tr( "Clear Completed" ), this );
|
||||||
connect( clearcompletedAct , SIGNAL( triggered() ), this, SLOT( clearcompleted() ) );
|
connect( clearcompletedAct , SIGNAL( triggered() ), this, SLOT( clearcompleted() ) );
|
||||||
|
|
||||||
|
rootisnotdecoratedAct = new QAction(QIcon(), tr( "Set Root is not Decorated" ), this );
|
||||||
|
connect( rootisnotdecoratedAct , SIGNAL( triggered() ), this, SLOT( rootisnotdecorated() ) );
|
||||||
|
|
||||||
|
rootisdecoratedAct = new QAction(QIcon(), tr( "Set Root is Decorated" ), this );
|
||||||
|
connect( rootisdecoratedAct , SIGNAL( triggered() ), this, SLOT( rootdecorated() ) );
|
||||||
|
|
||||||
|
QMenu *viewMenu = new QMenu( tr("View"), this );
|
||||||
|
viewMenu->addAction(rootisnotdecoratedAct);
|
||||||
|
viewMenu->addAction(rootisdecoratedAct);
|
||||||
|
|
||||||
contextMnu.clear();
|
contextMnu.clear();
|
||||||
if (addPlayOption)
|
if (addPlayOption)
|
||||||
{
|
{
|
||||||
@ -221,7 +231,10 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
|||||||
contextMnu.addAction( pastelinkAct);
|
contextMnu.addAction( pastelinkAct);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction( clearcompletedAct);
|
contextMnu.addAction( clearcompletedAct);
|
||||||
|
contextMnu.addSeparator();
|
||||||
|
contextMnu.addMenu( viewMenu);
|
||||||
contextMnu.exec( mevent->globalPos() );
|
contextMnu.exec( mevent->globalPos() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransfersDialog::playSelectedTransfer()
|
void TransfersDialog::playSelectedTransfer()
|
||||||
@ -822,6 +835,17 @@ void TransfersDialog::clearcompleted()
|
|||||||
rsFiles->FileClearCompleted();
|
rsFiles->FileClearCompleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TransfersDialog::rootdecorated()
|
||||||
|
{
|
||||||
|
ui.downloadList->setRootIsDecorated(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TransfersDialog::rootisnotdecorated()
|
||||||
|
{
|
||||||
|
ui.downloadList->setRootIsDecorated(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
double TransfersDialog::getProgress(int row, QStandardItemModel *model)
|
double TransfersDialog::getProgress(int row, QStandardItemModel *model)
|
||||||
{
|
{
|
||||||
return model->data(model->index(row, PROGRESS), Qt::DisplayRole).toDouble();
|
return model->data(model->index(row, PROGRESS), Qt::DisplayRole).toDouble();
|
||||||
|
@ -66,6 +66,9 @@ class TransfersDialog : public MainPage
|
|||||||
|
|
||||||
void copyLink();
|
void copyLink();
|
||||||
void pasteLink();
|
void pasteLink();
|
||||||
|
|
||||||
|
void rootdecorated();
|
||||||
|
void rootisnotdecorated();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void playFiles(QStringList files);
|
void playFiles(QStringList files);
|
||||||
@ -94,6 +97,8 @@ class TransfersDialog : public MainPage
|
|||||||
QAction* clearcompletedAct;
|
QAction* clearcompletedAct;
|
||||||
QAction* copylinkAct;
|
QAction* copylinkAct;
|
||||||
QAction* pastelinkAct;
|
QAction* pastelinkAct;
|
||||||
|
QAction* rootisnotdecoratedAct;
|
||||||
|
QAction* rootisdecoratedAct;
|
||||||
|
|
||||||
QTreeView *downloadList;
|
QTreeView *downloadList;
|
||||||
|
|
||||||
@ -104,7 +109,7 @@ class TransfersDialog : public MainPage
|
|||||||
Ui::TransfersDialog ui;
|
Ui::TransfersDialog ui;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
int addItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining);
|
int addItem(QString symbol, QString name, QString coreID, qlonglong size, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining);
|
||||||
bool addPeerToItem(int row, QString symbol, QString name, QString coreID, qlonglong fileSize, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining);
|
bool addPeerToItem(int row, QString symbol, QString name, QString coreID, qlonglong fileSize, double progress, double dlspeed, QString sources, QString status, qlonglong completed, qlonglong remaining);
|
||||||
void delItem(int row);
|
void delItem(int row);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user