gSAFE  1.3.8
dialib.h
1 /* gSAFE - LIB
2  general Sql dAtabase FrontEnd
3  http://hyperprog.com/gsafe/
4 
5  (C) 2005-2013 Peter Deak (hyper80@gmail.com)
6 
7  License: GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
8 
9  dialib.h
10 */
11 
12 #ifndef GSAFE__DIALIB_HEADER_FILE_X_
13 #define GSAFE__DIALIB_HEADER_FILE_X_
14 
16 /* @{ */
17 
18 #include <QtCore>
19 #include <QtGui>
20 
21 #ifndef COMPILED_WITH_QT4X
22 #include <QtWidgets>
23 #endif
24 
25 #include "datalib.h"
26 #include "guilib.h"
27 
82 {
83  public:
85  HDialogData(void);
86 
99  int makeGui(QWidget *basew,QString caption=0,
100  HBase *dobj1=NULL,HBase *dobj2=NULL,
101  QString func="Ok|EscC|Vert",
102  QString ttext="",
103  QString tbutt1="",QString tbutt2="",QList<QPixmap *> *toolbuttons=NULL,
104  int xsize=320,int ysize=240 );
105 
106  public:
107  bool EscC;
108  bool t1C;
109  bool t1AC;
110  bool t2C;
111  bool t2AC;
112  bool inscroll;
113  bool deletedata;
114  bool declose;
115  HDispTable *table1,*table2;
116  HDispList *list1 ,*list2;
117  HDispPlainDataMatrix *dmatrix1, *dmatrix2;
118  QPushButton *toolbutton1,*toolbutton2,*closebutton;
119  QScrollArea *sv1,*sv2;
120  QToolButton *pixTool[8];
121 
126 };
127 
149 class HDialog : public QDialog , public HDialogData
150 {
151  Q_OBJECT
152 
153  public:
156  static int run(QWidget *parent=0,QString caption=0,HBase *dobj1=NULL,
157  HBase *dobj2=NULL,QString func="Ok|EscC|Vert",QString ttext="",
158  QString tbutt1="",QString tbutt2="",QList<QPixmap *> *toolbuttons=NULL,int xsize=320,int ysize=240);
159 
172  HDialog(QWidget *parent=0,
173  QString caption=0,
174  HBase *dobj1=NULL,
175  HBase *dobj2=NULL,
176  QString func="Ok|EscC|Vert",
177  QString ttext ="",
178  QString tbutt1="",
179  QString tbutt2="",
180  QList<QPixmap *> *toolbuttons=NULL,
181  int xsize=320,
182  int ysize=240
183  );
184 
186  ~HDialog(void);
187 
188  protected:
189  void keyPressEvent(QKeyEvent *e);
190 
191  public:
193  QWidget *parent_dialog;
194 
196  QToolButton *getToolButtObj(int i) { return pixTool[i]; }
197 
198  public:
200  QFrame *get1DispCont(void) { if(table1 != NULL) return table1;
201  if(list1 != NULL) return list1;
202  if(dmatrix1 != NULL) return dmatrix1;
203  return NULL; }
204 
206  QFrame *get2DispCont(void) { if(table2 != NULL) return table2;
207  if(list2 != NULL) return list2;
208  if(dmatrix2 != NULL) return dmatrix2;
209  return NULL; }
210 
211  private slots:
212  int tbutton1Cl(void);
213  int tbutton2Cl(void);
214  int lic(void);
215 
216  signals:
218  void tbutton1Clicked(void);
220  void tbutton2Clicked(void);
222  void listItemChanged(void);
223 
224 };
225 
226 class QWidget;
227 class QString;
228 class QLineEdit;
229 
231 class HGetTextBox : public QDialog
232 {
233  Q_OBJECT
234 
235  public:
239  HGetTextBox(QWidget *parent,QString cap,QString text,QList<QString> exptexts,bool largetexts=false);
240 
242  QList<QString> results;
243 
244  protected:
245  bool large;
246  QList<QLineEdit *> ledits;
247  QList<QTextEdit *> mledits;
248 
249  public slots:
250  int clickOk(void);
251 
252 };
253 
254 /* @} */
255 
256 #endif
QWidget * parent_dialog
Definition: dialib.h:193
QFrame * get1DispCont(void)
Definition: dialib.h:200
QFrame * get2DispCont(void)
Definition: dialib.h:206
~HDialog(void)
Definition: dialib.cpp:310
static int run(QWidget *parent=0, QString caption=0, HBase *dobj1=NULL, HBase *dobj2=NULL, QString func="Ok|EscC|Vert", QString ttext="", QString tbutt1="", QString tbutt2="", QList< QPixmap * > *toolbuttons=NULL, int xsize=320, int ysize=240)
Definition: dialib.cpp:265
HDialog(QWidget *parent=0, QString caption=0, HBase *dobj1=NULL, HBase *dobj2=NULL, QString func="Ok|EscC|Vert", QString ttext="", QString tbutt1="", QString tbutt2="", QList< QPixmap * > *toolbuttons=NULL, int xsize=320, int ysize=240)
Definition: dialib.cpp:285
void listItemChanged(void)
Definition: datalib.h:312
int makeGui(QWidget *basew, QString caption=0, HBase *dobj1=NULL, HBase *dobj2=NULL, QString func="Ok|EscC|Vert", QString ttext="", QString tbutt1="", QString tbutt2="", QList< QPixmap * > *toolbuttons=NULL, int xsize=320, int ysize=240)
Definition: dialib.cpp:41
QToolButton * getToolButtObj(int i)
Definition: dialib.h:196
bool tb2clicked
Definition: dialib.h:125
void tbutton2Clicked(void)
HGetTextBox(QWidget *parent, QString cap, QString text, QList< QString > exptexts, bool largetexts=false)
Definition: dialib.cpp:375
QList< QString > results
Definition: dialib.h:242
bool tb1clicked
Definition: dialib.h:123
HDialogData(void)
Definition: dialib.cpp:18
void tbutton1Clicked(void)