added tool button to choose DL directory in rscollection dialog

This commit is contained in:
csoler 2017-11-02 22:52:30 +01:00
parent 638160833c
commit 2d18335da4
3 changed files with 15 additions and 3 deletions

View File

@ -157,7 +157,8 @@ RsCollectionDialog::RsCollectionDialog(const QString& collectionFileName
ui.downloadFolder_LE->setText(QString::fromUtf8(rsFiles->getDownloadDirectory().c_str())) ;
QObject::connect(ui.downloadFolder_LE,SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(openDestinationDirectoryMenu(QPoint)));
QObject::connect(ui.downloadFolder_LE,SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(openDestinationDirectoryMenu()));
QObject::connect(ui.destinationDir_TB,SIGNAL(pressed()), this, SLOT(openDestinationDirectoryMenu()));
}
// 1 - add all elements to the list.
@ -229,7 +230,7 @@ RsCollectionDialog::RsCollectionDialog(const QString& collectionFileName
QMessageBox::warning(NULL,tr("Bad filenames have been cleaned"),tr("Some filenames or directory names contained forbidden characters.\nCharacters <b>\",|,/,\\,&lt;,&gt;,*,?</b> will be replaced by '_'.\n Concerned files are listed in red.")) ;
}
void RsCollectionDialog::openDestinationDirectoryMenu(QPoint)
void RsCollectionDialog::openDestinationDirectoryMenu()
{
QMenu contextMnu( this );

View File

@ -51,7 +51,7 @@ private slots:
void remove() ;
void chooseDestinationDirectory();
void setDestinationDirectory();
void openDestinationDirectoryMenu(QPoint pt);
void openDestinationDirectoryMenu();
void processItem(QMap<QString, QString> &dirToAdd
, int &index
, ColFileInfo &parent

View File

@ -422,6 +422,17 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="destinationDir_TB">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/start.png</normaloff>:/images/start.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="downloadFolder_LE">
<property name="contextMenuPolicy">