summaryrefslogtreecommitdiffstats
path: root/newpicsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'newpicsdialog.cpp')
-rw-r--r--newpicsdialog.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/newpicsdialog.cpp b/newpicsdialog.cpp
index 20d5d4a..2d58a18 100644
--- a/newpicsdialog.cpp
+++ b/newpicsdialog.cpp
@@ -48,14 +48,8 @@ void NewPicsDialog::setupDlg(){
mFilesV->header()->moveSection(6, 2); //move picsize to front
mFilesV->header()->moveSection(5, 3); //move mime type to front
mFilesV->setAlternatingRowColors(true);
- mAddFiles = new QPushButton(tr("Select..."));
- connect(mAddFiles, SIGNAL(clicked()), this, SLOT(selectFiles()));
- mRemoveFiles = new QPushButton(tr("Remove"));
- connect(mRemoveFiles, SIGNAL(clicked()), this, SLOT(removeFiles()));
QHBoxLayout *fileButtonLayout = new QHBoxLayout;
fileButtonLayout->addStretch();
- fileButtonLayout->addWidget(mRemoveFiles);
- fileButtonLayout->addWidget(mAddFiles);
QVBoxLayout *filesLayout = new QVBoxLayout;
filesLayout->addWidget(mFilesV);
filesLayout->addLayout(fileButtonLayout);
@@ -70,15 +64,9 @@ void NewPicsDialog::setupDlg(){
connect(mOk, SIGNAL(clicked()), this, SLOT(accept()));
mCancel = new QPushButton(tr("Cancel"));
connect(mCancel, SIGNAL(clicked()), this, SLOT(reject()));
- mNext = new QPushButton(tr("Next >"));
- connect(mNext, SIGNAL(clicked()), this, SLOT(next()));
- mDelete = new QPushButton(tr("Delete"));
- connect(mDelete, SIGNAL(clicked()), this, SLOT(deleteCurrent()));
QHBoxLayout *dlgButtonLayout = new QHBoxLayout;
dlgButtonLayout->addStretch();
dlgButtonLayout->addWidget(mCancel);
- dlgButtonLayout->addWidget(mNext);
- dlgButtonLayout->addWidget(mDelete);
dlgButtonLayout->addWidget(mOk);
//put it together
@@ -112,18 +100,9 @@ void NewPicsDialog::addFiles(const QStringList &files){
if(files.isEmpty()){
return;
}
- show();
mFilesV->setSortingEnabled(false);
- QProgressDialog progress(tr("Preparing..."), QString(), 0, files.size(), this);
- progress.setMinimumWidth(400);
- progress.setWindowTitle(tr("Gathering data..."));
- progress.show();
- int pgctr = 0;
foreach(QString f, files){
mFilesModel->addFile(f);
- ++pgctr;
- progress.setValue(pgctr);
- qApp->processEvents();
}
mFilesV->setSortingEnabled(true);
for(int i = 0; i < NewPicFilesModel::NumFields; ++i){
@@ -237,21 +216,6 @@ void NewPicsDialog::archive(){
}
}
-void NewPicsDialog::deleteCurrent(){
- if(mFilesCtr < mFiles.count()){
- QString fp = mFiles.at(mFilesCtr);
- QFile::remove(fp);
- ++mFilesCtr;
- setNextPic();
- }
-}
-
-void NewPicsDialog::next(){
- archive();
- ++mFilesCtr;
- setNextPic();
-}
-
void NewPicsDialog::writeSettings(){
mMappingEditWidget->saveMappings("ui/newpicmappings");
QSettings s;