From 03534db307eead153283252a0d9ea4c30f7810ee Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 26 Feb 2017 15:47:24 +0100 Subject: Turned IndexerWidget into a dialog and got rid of the TabWidget! --- indexerdialog.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 indexerdialog.cpp (limited to 'indexerdialog.cpp') 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 +#include +#include +#include + +#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); +} -- cgit v1.2.3-70-g09d2