summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/client.pro12
-rw-r--r--client/dialog.cpp57
-rw-r--r--client/dialog.h29
-rw-r--r--client/main.cpp11
4 files changed, 109 insertions, 0 deletions
diff --git a/client/client.pro b/client/client.pro
new file mode 100644
index 0000000..ef28c1a
--- /dev/null
+++ b/client/client.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Wed Oct 19 03:05:59 2011
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += dialog.h
+SOURCES += dialog.cpp main.cpp
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
diff --git a/client/dialog.h b/client/dialog.h
new file mode 100644
index 0000000..f841f2b
--- /dev/null
+++ b/client/dialog.h
@@ -0,0 +1,29 @@
+
+#ifndef PROXY_DIALOG
+#define PROXY_DIALOG
+
+#include <QDialog>
+
+class QLabel;
+class QComboBox;
+
+class ProxyDialog: public QDialog
+{
+ Q_OBJECT
+
+ public:
+ ProxyDialog(QWidget *parent = 0);
+
+ signals:
+ //move to special Proxy class
+ void AddProxy(QString proxy);
+
+ private:
+ QLabel *topLabel;
+ QComboBox *countryBox;
+ QComboBox *stateBox;
+ QComboBox *cityBox;
+ QLabel *bottomLabel;
+};
+
+#endif \ No newline at end of file
diff --git a/client/main.cpp b/client/main.cpp
new file mode 100644
index 0000000..ab4d526
--- /dev/null
+++ b/client/main.cpp
@@ -0,0 +1,11 @@
+
+#include <QApplication>
+#include "dialog.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ProxyDialog *dialog = new ProxyDialog;
+ dialog->show();
+ return app.exec();
+} \ No newline at end of file