summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/shemov.cpp b/shemov.cpp
index eed20df..a2fd195 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -59,6 +59,7 @@
#include "pictureviewer2.h"
#include "helper.h"
#include "smdirmodel.h"
+#include "smtreeview.h"
SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, flags), mOpenWithGroupFS(0), mOpenWithGroupAV(0) {
//application icon
@@ -104,7 +105,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(mPicWidget->picView(), SIGNAL(selectedSize(qint64)), this, SLOT(setSize(qint64)));
PictureViewer2 *picViewer = SmGlobals::instance()->pictureViewer();
- //newmoviewizard + dbanalyzer
+ //newmoviewizard + dbanalyzer + newpicsdialog
splash.showMessage(tr("Creating misc. Dialogs..."), Qt::AlignHCenter, Qt::yellow);
qApp->processEvents();
mNewMovieWizard = new NewMovieWizard(this);
@@ -112,6 +113,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
mDbAnalyzerDialog = new DbAnalyzerDialog(this);
connect(mDbAnalyzerDialog, SIGNAL(partClicked(int, int)), mATree, SLOT(selectMoviePart(int, int)));
connect(mDbAnalyzerDialog, SIGNAL(delItems(int,QList<int>&)), this, SLOT(analyzeDelete(int,QList<int>&)));
+ mNewPicsDialog = new NewPicsDialog(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(mTab);
@@ -144,6 +146,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
QWidget *centralWidget = new QWidget;
centralWidget->setLayout(mainLayout);
setCentralWidget(centralWidget);
+
show();
splash.finish(this);
mATree->readSettings();
@@ -398,8 +401,6 @@ void SheMov::createActions(){
connect(mConsistencyA, SIGNAL(triggered()), this, SLOT(checkConsistency()));
mAnalyzerA = new QAction(QIcon(":/higheels.png"), tr("Analyze Db..."), this);
connect(mAnalyzerA, SIGNAL(triggered()), this, SLOT(analyzeDb()));
- mMappingEditorA = new QAction(tr("Mapping editor..."), this);
- connect(mMappingEditorA, SIGNAL(triggered()), this, SLOT(mappingEditor()));
mNewPicsA = new QAction(tr("Archive pics...."), this);
connect(mNewPicsA, SIGNAL(triggered()), this, SLOT(newPicsDialog()));
@@ -765,7 +766,7 @@ void SheMov::createMenus(){
fileMenu->addSeparator();
fileMenu->addAction(mConsistencyA);
fileMenu->addAction(mAnalyzerA);
- fileMenu->addAction(mMappingEditorA);
+ //fileMenu->addAction(mMappingEditorA);
fileMenu->addSeparator();
fileMenu->addAction(mQuitA);
menuBar()->addMenu(fileMenu);
@@ -1110,9 +1111,11 @@ void SheMov::createPalette(){
pal.setColor(QPalette::Base, Qt::white);
pal.setColor(QPalette::AlternateBase, Qt::white);
}
- qApp->setPalette(pal);
foreach(QWidget *w, SmGlobals::instance()->treeWidgets()){
- w->setPalette(pal);
+ SmTreeView *aiv = qobject_cast<SmTreeView*>(w);
+ if(aiv){
+ aiv->setPalette(pal);
+ }
}
}
@@ -1171,18 +1174,8 @@ void SheMov::editMappings(QString table){
ed.exec();
}
-void SheMov::mappingEditor(){
- QDialog dlg(this);
- QHBoxLayout *dlgLayout = new QHBoxLayout;
- MappingTreeWidget *mtw = new MappingTreeWidget;
- dlgLayout->addWidget(mtw);
- dlg.setLayout(dlgLayout);
- dlg.exec();
-}
-
void SheMov::newPicsDialog(){
- NewPicsDialog npd(this);
- npd.exec();
+ mNewPicsDialog->exec();
}
void SheMov::newPicsDialogWithFiles(){
@@ -1194,6 +1187,7 @@ void SheMov::newPicsDialogWithFiles(){
foreach(QModelIndex idx, selected){
files << idx.data(SmDirModel::FullPathRole).toString();
}
- NewPicsDialog npd(files, this);
- npd.exec();
+ mNewPicsDialog->clearFiles();
+ mNewPicsDialog->addFiles(files);
+ mNewPicsDialog->exec();
}