MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), mDialog(0), mWebView(0), mCurrentNoteIndex(0) { loadSettings(); checkExistenceTempImgDir(); setWindowTitle(tr("Zoth Reader")); setWindowIcon(QIcon(":/images/green_book_zoth.png")); createCentralWidget(); //showFullScreen(); showMaximized(); setContextMenuPolicy(Qt::NoContextMenu); mDialog = new SettingsDialog(); connect(&mEnExport, SIGNAL(exported()), SLOT(notesReloaded())); connect(&mEnExport, SIGNAL(exported()), SLOT(displayNotes())); connect(&mEnExport, SIGNAL(exported()), SLOT(refreshNavigationLabel())); connect(mDialog, SIGNAL(accepted()), SLOT(saveDialogSettings())); if(isFirstRun){ HelloDialog* helloDialog = new HelloDialog(this); QPalette palette; palette.setColor(QPalette::Window, QColor(mBgColor)); helloDialog->setPalette(palette); helloDialog->setBackgroundRole(QPalette::Window); helloDialog->activateWindow(); helloDialog->show(); connect(helloDialog, SIGNAL(tagAccepted(QString)), SLOT(setTagAndReload(QString))); }else{ reloadNotes(); } }
int main(int argc, char *argv[]) { QApplication a(argc, argv); HelloDialog w; w.show(); return a.exec(); }