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
@ -208,6 +208,16 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
clearcompletedAct = new QAction(QIcon(IMAGE_CLEARCOMPLETED), tr( "Clear Completed" ), this );
|
||||
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();
|
||||
if (addPlayOption)
|
||||
{
|
||||
@ -221,7 +231,10 @@ void TransfersDialog::downloadListCostumPopupMenu( QPoint point )
|
||||
contextMnu.addAction( pastelinkAct);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction( clearcompletedAct);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addMenu( viewMenu);
|
||||
contextMnu.exec( mevent->globalPos() );
|
||||
|
||||
}
|
||||
|
||||
void TransfersDialog::playSelectedTransfer()
|
||||
@ -822,6 +835,17 @@ void TransfersDialog::clearcompleted()
|
||||
rsFiles->FileClearCompleted();
|
||||
}
|
||||
|
||||
void TransfersDialog::rootdecorated()
|
||||
{
|
||||
ui.downloadList->setRootIsDecorated(true);
|
||||
}
|
||||
|
||||
void TransfersDialog::rootisnotdecorated()
|
||||
{
|
||||
ui.downloadList->setRootIsDecorated(false);
|
||||
}
|
||||
|
||||
|
||||
double TransfersDialog::getProgress(int row, QStandardItemModel *model)
|
||||
{
|
||||
return model->data(model->index(row, PROGRESS), Qt::DisplayRole).toDouble();
|
||||
|
@ -67,6 +67,9 @@ class TransfersDialog : public MainPage
|
||||
void copyLink();
|
||||
void pasteLink();
|
||||
|
||||
void rootdecorated();
|
||||
void rootisnotdecorated();
|
||||
|
||||
signals:
|
||||
void playFiles(QStringList files);
|
||||
|
||||
@ -94,6 +97,8 @@ class TransfersDialog : public MainPage
|
||||
QAction* clearcompletedAct;
|
||||
QAction* copylinkAct;
|
||||
QAction* pastelinkAct;
|
||||
QAction* rootisnotdecoratedAct;
|
||||
QAction* rootisdecoratedAct;
|
||||
|
||||
QTreeView *downloadList;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user