made message table fit the width of the screen
[ptas] / zouba / ui.h
index a232ad9..4340f62 100644 (file)
@@ -1,20 +1,53 @@
 #ifndef UI_H
 #define UI_H
 
+#include <QObject>
+
 class QMainWindow;
 class QWidget;
-class QPushButton;
 class QTableWidget;
+class QButtonGroup;
+class MessageTable;
+class QHBoxLayout;
+class QVBoxLayout;
 
-class Ui
+class Ui : public QObject
 {
+  Q_OBJECT
+
 public:
   Ui();
   ~Ui();
   void setupUi( QMainWindow *mainWindow );
 
+  enum {
+    HomeButtonId=0,
+    WorkButtonId=1
+  };
+
+  enum {
+    ScreenWidth=800,
+    ScreenHeight=480
+  };
+  enum {
+   ButtonWidth=300,
+   ButtonHeight=70
+  };
+
+
   QWidget *centralWidget;
-  QPushButton *trigger;
-  QTableWidget *table;
+  QButtonGroup *destinationButtons;
+  QTableWidget *routeTable;
+  static MessageTable *messageTable;
+  QHBoxLayout *mainLayout;
+  QVBoxLayout *buttonLayout;
+
+Q_SIGNALS:
+  void homeAddressChanged( QString address );
+  void workAddressChanged( QString address );
+
+private Q_SLOTS:
+  void setHomeAddress();
+  void setWorkAddress();
 };
 #endif //UI_H