diff options
author | Arno <arno@disconnect.de> | 2017-08-26 07:49:34 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-08-26 07:49:34 +0200 |
commit | 1285456abe4be9a22dc42498a1d0a1a43a0a00be (patch) | |
tree | 1d3475be09492735ab3c30cf043030cc19601ec2 /webradiodialog.cpp | |
parent | a957512861065d700663ddd522de57925b878eae (diff) | |
download | BeetPlayer-1285456abe4be9a22dc42498a1d0a1a43a0a00be.tar.gz BeetPlayer-1285456abe4be9a22dc42498a1d0a1a43a0a00be.tar.bz2 BeetPlayer-1285456abe4be9a22dc42498a1d0a1a43a0a00be.zip |
Implement dialog for adding WebRadios
Just enter a description and an URL.
Diffstat (limited to 'webradiodialog.cpp')
-rw-r--r-- | webradiodialog.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/webradiodialog.cpp b/webradiodialog.cpp new file mode 100644 index 0000000..4e08627 --- /dev/null +++ b/webradiodialog.cpp @@ -0,0 +1,29 @@ +#include <QVBoxLayout> +#include <QHBoxLayout> +#include <QFormLayout> +#include <QPushButton> +#include <QApplication> + +#include "webradiodialog.h" + +WebRadioDialog::WebRadioDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f){ + mDescription = new QLineEdit; + mUrl = new QLineEdit; + QFormLayout *topL = new QFormLayout; + topL->addRow(tr("&Description:"), mDescription); + topL->addRow(tr("&Url:"), mUrl); + QPushButton *okB = new QPushButton(tr("OK")); + connect(okB, &QPushButton::clicked, this, &QDialog::accept); + QPushButton *cancelB = new QPushButton(tr("Cancel")); + connect(cancelB, &QPushButton::clicked, this, &QDialog::reject); + QHBoxLayout *buttonL = new QHBoxLayout; + buttonL->addStretch(); + buttonL->addWidget(okB); + buttonL->addWidget(cancelB); + QVBoxLayout *mainL = new QVBoxLayout; + mainL->addLayout(topL); + mainL->addLayout(buttonL); + setLayout(mainL); + setWindowTitle(QString(tr("%1 - Add WebRadio")).arg(qApp->applicationName())); + setMinimumWidth(768); +} |