diff options
author | Alex Borisov <b0ris@b0ris-universe.localdomain> | 2011-10-19 03:13:11 +0300 |
---|---|---|
committer | Alex Borisov <b0ris@b0ris-universe.localdomain> | 2011-10-19 03:13:11 +0300 |
commit | 4ac3da0fe4400b9109636143e8da53dbef6c3984 (patch) | |
tree | 71ca352b7f181c429ecc9929caaad8f9c5125d56 /client/dialog.cpp | |
parent | b7c741ecba97c00d8f5ade3ea388fe42a4511b04 (diff) |
Main window mockup
Diffstat (limited to 'client/dialog.cpp')
-rw-r--r-- | client/dialog.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/client/dialog.cpp b/client/dialog.cpp new file mode 100644 index 0000000..35e18be --- /dev/null +++ b/client/dialog.cpp @@ -0,0 +1,57 @@ + +#include <QtGui> +#include "dialog.h" + +ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent) +{ + topLabel = new QLabel(tr("Top Panel")); + countryBox = new QComboBox; + countryBox->addItem(tr("Ukraine")); + countryBox->addItem(tr("Russia")); + + stateBox = new QComboBox; + stateBox->addItem("AR Krym"); + stateBox->addItem("Kharkovskaya obl."); + stateBox->addItem("Odesskaya obl."); + + cityBox = new QComboBox; + cityBox->addItem("Alushta"); + cityBox->addItem("Simferopol"); + cityBox->addItem("Yalta"); + cityBox->addItem("Sevastopol"); + + /* proxy buttons */ + QPushButton *topProxy1 = new QPushButton("proxy 1"); + QPushButton *topProxy2 = new QPushButton("proxy 2"); + + QPushButton *bottomProxy1 = new QPushButton("proxy 3"); + QPushButton *bottomProxy2 = new QPushButton("proxy 4"); + + bottomLabel = new QLabel(tr("Bottom Panel")); + + /* setup layouting */ + QVBoxLayout *comboBoxLayout = new QVBoxLayout; + comboBoxLayout->addWidget(countryBox); + comboBoxLayout->addWidget(stateBox); + comboBoxLayout->addWidget(cityBox); + + QVBoxLayout *proxyButtonLayout = new QVBoxLayout; + proxyButtonLayout->addWidget(topProxy1); + proxyButtonLayout->addWidget(topProxy2); + + QHBoxLayout *topPanelLayout = new QHBoxLayout; + topPanelLayout->addLayout(comboBoxLayout); + topPanelLayout->addLayout(proxyButtonLayout); + + QHBoxLayout *bottomPanelLayout = new QHBoxLayout; + bottomPanelLayout->addWidget(bottomProxy1); + bottomPanelLayout->addWidget(bottomProxy2); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(topLabel); + mainLayout->addLayout(topPanelLayout); + mainLayout->addWidget(bottomLabel); + mainLayout->addLayout(bottomPanelLayout); + + setLayout(mainLayout); +}
\ No newline at end of file |