UltraScan III
us_license.h
Go to the documentation of this file.
1 #ifndef US_LICENSE_H
3 #define US_LICENSE_H
4 
5 #include <QtGui>
6 
7 #include "us_widgets.h"
8 #include "us_help.h"
9 #include "us_extern.h"
10 
12 
19 #define spacing 5
21 #define commaWidth 10
22 #define buttonw 180
23 #define full_buttonw 610
24 #define half_buttonw 295
25 #define pushbutton 156
26 #define rowHeight 26
27 #define smallColumn 90
28 #define mediumColumn 110
29 #define codeWidth 60
30 
32 {
33  Q_OBJECT
34 
35  public:
45  US_License( QWidget* parent = 0, Qt::WindowFlags flags = 0 );
46 
49 
50  private:
51  QPushButton* pb_cancel;
52  QPushButton* pb_save;
53  QPushButton* pb_help;
54  QPushButton* pb_load;
55  QPushButton* pb_request;
56  QPushButton* pb_import;
57 
58  QString firstname;
59  QString lastname;
60  QString institution;
61  QString address;
62  QString city;
63  QString state;
64  QString zip;
65  QString phone;
66  QString email;
67  QString os;
68  QString platform;
69  QString version;
70  QString licensetype;
71  QString validation;
72  QString expiration;
73 
74  QLineEdit* le_firstname;
75  QLineEdit* le_lastname;
76  QLineEdit* le_institution;
77  QLineEdit* le_address;
78  QLineEdit* le_city;
79  QLineEdit* le_zip;
80  QLineEdit* le_phone;
81  QLineEdit* le_email;
82  QLineEdit* le_platform;
83  QLineEdit* le_expiration;
84  QLineEdit* le_registration;
85 
86  QLabel* lbl_version;
87  QLabel* lbl_platform;
88  QLabel* lbl_expiration;
89  QLabel* lbl_valid;
90 
91  QComboBox* cbb_state;
92  QComboBox* cbb_os1;
93  QComboBox* cbb_version;
94  QComboBox* cbb_licensetype;
95 
97 
98  QStringList states;
99  QStringList types;
101  QPushButton* pb_update;
102 
103  void update_screen ( void );
104  void load_current ( void );
105  QString titleCase ( const QString& );
106  void request ( void );
107  bool save ( void );
108 
109  private slots:
110  void help ( void );
111  void update ( void );
112  void update_response ( const QString& );
113  void request_response ( const QString& );
114  QString trim ( const QString& );
115 
116  void update_firstname ( const QString& s ){ firstname = trim( s ); };
117  void update_lastname ( const QString& s ){ lastname = trim( s ); };
118  void update_institution( const QString& s ){ institution = trim( s ); };
119  void update_address ( const QString& s ){ address = trim( s ); };
120  void update_city ( const QString& s ){ city = trim( s ); };
121  void update_state ( const QString& s ){ state = trim( s ); };
122  void update_zip ( const QString& s ){ zip = trim( s ); };
123  void update_phone ( const QString& s ){ phone = trim( s ); };
124  void update_email ( const QString& s ){ email = trim( s ); };
125  void update_licensetype( const QString& s ){ licensetype = trim( s ); };
126 };
127 #endif