]> Shamusworld >> Repos - schematic/blob - src/mainwin.h
Added a bunch of new functionality
[schematic] / src / mainwin.h
1 //
2 // mainwin.h: Header file
3 //
4 // by James Hammons
5 // (C) 2012 Underground Software
6 //
7
8 #ifndef __MAINWINDOW_H__
9 #define __MAINWINDOW_H__
10
11 #include <QtGui>
12 #include <QtSql>
13
14 class AboutWindow;
15
16 class MainWindow: public QMainWindow
17 {
18         // All Qt apps require this macro
19         Q_OBJECT
20
21         public:
22                 MainWindow();
23
24         protected:
25                 void closeEvent(QCloseEvent * event);
26
27         private slots:
28                 void Open();
29                 void ShowAboutWin(void);
30                 void HandleConfigDialog(void);
31                 void HandleVendorClassDialog(void);
32                 void HandleNewVendorDialog(void);
33
34         private:
35                 void ReadSettings(void);
36                 void WriteSettings(void);
37
38                 AboutWindow * aboutWin;
39
40                 QAction * quitAppAct;
41                 QAction * aboutAct;
42                 QAction * configAct;
43                 QAction * vendorClassAct;
44                 QAction * newVendorAct;
45
46                 QString dbHostName;
47                 QString dbName;
48                 QString dbUserName;
49                 QString dbPassword;
50
51                 QSqlDatabase db;
52
53         public:
54                 int loggedInUID;
55 };
56
57 #endif  // __MAINWINDOW_H__