summaryrefslogtreecommitdiffstats
path: root/indexerdialog.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-02-26 15:47:24 +0100
committerArno <arno@disconnect.de>2017-02-26 15:47:24 +0100
commit03534db307eead153283252a0d9ea4c30f7810ee (patch)
treed7448addc3aa90c3b2249ba51c09508ea655a0f4 /indexerdialog.cpp
parent707853a339a804c9fe90e8ce5b7743c131b75dc1 (diff)
downloadBeetPlayer-03534db307eead153283252a0d9ea4c30f7810ee.tar.gz
BeetPlayer-03534db307eead153283252a0d9ea4c30f7810ee.tar.bz2
BeetPlayer-03534db307eead153283252a0d9ea4c30f7810ee.zip
Turned IndexerWidget into a dialog
and got rid of the TabWidget!
Diffstat (limited to 'indexerdialog.cpp')
-rw-r--r--indexerdialog.cpp31
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);
+}