diff options
Diffstat (limited to 'indexerdialog.cpp')
-rw-r--r-- | indexerdialog.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/indexerdialog.cpp b/indexerdialog.cpp new file mode 100644 index 0000000..0722bad --- /dev/null +++ b/indexerdialog.cpp @@ -0,0 +1,31 @@ +#include <QVBoxLayout> +#include <QHBoxLayout> +#include <QPushButton> +#include <QApplication> + +#include "indexerdialog.h" +#include "indexerwidget.h" + +IndexerDialog::IndexerDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f){ + //indexer + mIndexer = new IndexerWidget; + + //buttons + QPushButton *startB = new QPushButton(tr("Start")); + connect(startB, SIGNAL(clicked()), mIndexer, SLOT(startIndexing())); + QPushButton *stopB = new QPushButton(tr("Stop")); + connect(stopB, SIGNAL(clicked()), mIndexer, SLOT(stopIndexing())); + QHBoxLayout *buttonLayout = new QHBoxLayout; + buttonLayout->addStretch(); + buttonLayout->addWidget(startB); + buttonLayout->addWidget(stopB); + buttonLayout->addStretch(); + + //mainlayout + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(mIndexer); + mainLayout->addLayout(buttonLayout); + setLayout(mainLayout); + setWindowTitle(QString(tr("%1 - Indexer")).arg(qApp->applicationName())); + setMinimumWidth(768); +} |