summaryrefslogtreecommitdiffstats
path: root/indexerdialog.cpp
blob: 0722badb4652861eb0be6352824167c8636e8199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);
}