#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, &QPushButton::clicked, mIndexer, &IndexerWidget::startIndexing); QPushButton *stopB = new QPushButton(tr("Stop")); connect(stopB, &QPushButton::clicked, mIndexer, &IndexerWidget::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); }