summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--collectiondatesview.cpp6
-rw-r--r--copydialog.cpp5
-rw-r--r--copydialog.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/collectiondatesview.cpp b/collectiondatesview.cpp
index 5544f72..59fd5d2 100644
--- a/collectiondatesview.cpp
+++ b/collectiondatesview.cpp
@@ -100,5 +100,11 @@ void CollectionDatesView::copyTo(){
destDir = destDir.replace(" - ", "-");
destDir = destDir.replace(' ', '.');
cdlg->setDestFolder(destDir);
+ QStringList sources;
+ for(int i = 0; i < item->rowCount(); ++i){
+ QStandardItem *childItem = item->child(i);
+ sources << childItem->data(FullPathRole).toString();
+ }
+ cdlg->setSources(sources);
cdlg->show();
}
diff --git a/copydialog.cpp b/copydialog.cpp
index 625ccac..38a5b9f 100644
--- a/copydialog.cpp
+++ b/copydialog.cpp
@@ -36,6 +36,7 @@ CopyDialog::CopyDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
dirGB->setLayout(dirGrid);
QHBoxLayout *resultL = new QHBoxLayout;
mResultL = new QLabel;
+ mResultL->setAlignment(Qt::AlignTop | Qt::AlignLeft);
resultL->addWidget(mResultL);
QGroupBox *resultGB = new QGroupBox(tr("Result"));
resultGB->setLayout(resultL);
@@ -78,6 +79,10 @@ void CopyDialog::setDestFolder(const QString &dst){
mFolderE->setText(dst);
}
+void CopyDialog::setSources(const QStringList &sources){
+ mSources = sources;
+}
+
void CopyDialog::closeEvent(QCloseEvent *e){
QSettings s;
s.setValue("copydlgsize", size());
diff --git a/copydialog.h b/copydialog.h
index 5a63515..8a32372 100644
--- a/copydialog.h
+++ b/copydialog.h
@@ -15,6 +15,7 @@ class CopyDialog : public QDialog {
void getDestination();
void setSource(const QString &src);
void setDestFolder(const QString &dst);
+ void setSources(const QStringList &sources);
protected:
virtual void closeEvent(QCloseEvent *e);
@@ -24,6 +25,7 @@ class CopyDialog : public QDialog {
QLineEdit *mDstE;
QLineEdit *mFolderE;
QLabel *mResultL;
+ QStringList mSources;
};
#endif // COPYDIALOG_H