]> Shamusworld >> Repos - schematic/blob - src/vendorclassdialog.h
Move DB access to NoteDialog class, new AlertDialog class.
[schematic] / src / vendorclassdialog.h
1 #ifndef __VENDORCLASSDIALOG_H__
2 #define __VENDORCLASSDIALOG_H__
3
4 #include <QtGui>
5 #include <vector>
6
7 struct VendorType
8 {
9         int key;
10         int seqNo;
11         bool isHeader;
12         QString description;
13 };
14
15
16 class VendorClassDialog: public QDialog
17 {
18         Q_OBJECT
19
20         public:
21                 VendorClassDialog(QWidget * parent = 0);
22                 ~VendorClassDialog();
23
24         private slots:
25                 void AddItem(void);
26                 void DeleteItem(void);
27                 void MoveItemUp(void);
28                 void MoveItemDown(void);
29                 void SetHeaderStateOnItem(void);
30                 void CurrentRowChanged(int);
31
32         private:
33                 void LoadList(void);
34                 void SaveList(void);
35
36         private:
37                 QDialogButtonBox * buttonBox;
38                 QToolButton * addItem;
39                 QToolButton * deleteItem;
40                 QToolButton * moveItemUp;
41                 QToolButton * moveItemDown;
42                 QCheckBox * makeHeader;
43                 std::vector<VendorType> oldList;
44                 QFont * normalFont;
45                 QFont * boldFont;
46
47         public:
48                 QListWidget * list;
49 //              QSqlDatabase & dbRef;
50 };
51
52 #endif  // __VENDORCLASSDIALOG_H__