blob: 4e08627665cb77cdce74817c116f6b0aa53595c6 (
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
|
#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);
}
|