Databasehandlingdialogclasses  0.5.3
hk_kdegridcolumndialog.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_kdeclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file LGPL included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 
12 #ifndef HK_KDEGRIDCOLUMNDIALOG_H
13 #define HK_KDEGRIDCOLUMNDIALOG_H
14 #include "hk_kdegridcolumndialogbase.h"
15 #include <hk_string.h>
16 #include <list>
17 #include <hk_definitions.h>
18 #include <hk_dsgridcolumn.h>
19 
20 class QScrollView;
21 class hk_kdegrid;
32 {
33  Q_OBJECT
34 
35  public:
36  hk_kdegridcolumndialog( hk_kdegrid* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
38 
39  public slots:
40  void addbutton_clicked();
41  void deletebutton_clicked();
42  void exitbutton_clicked();
43  void okbutton_clicked();
44  void defaultvalue_changed();
45  void columntype_changed();
46  void rightbox_selectionchanged(QListViewItem*);
47 
48  void alignment_changed();
49  void displayname_changed();
50  void identifier_changed();
51  void listcolumn_changed();
52  void listdatasource_changed();
53  void listdatasourcetype_changed();
54  void digits_changed();
55  void readonly_changed();
56  void separator_changed();
57  void viewcolumn_changed();
58 
59 
60 
61  virtual void onclickaction_clicked();
62  virtual void ondoubleclickaction_clicked();
63  virtual void onopenaction_clicked();
64  virtual void oncloseaction_clicked();
65  virtual void beforeupdateaction_clicked();
66  virtual void afterupdateaction_clicked();
67  virtual void beforerowchangeaction_changed();
68  virtual void afterrowchangeaction_changed();
69  virtual void beforedeleteaction_clicked();
70  virtual void afterdeleteaction_clicked();
71  virtual void beforeinsertaction_clicked();
72  virtual void afterinsertaction_clicked();
73  virtual void on_getfocusaction_clicked();
74  virtual void on_loosefocusaction_clicked();
75  virtual void onkeybutton_clicked();
76  virtual void onselectaction_clicked();
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87  private:
88  typedef class fieldstruct
89  {
90  public:
91  fieldstruct(void)
92  {
93  use_separators=false;
94  readonly=false;
95  listdatasourcetype=dt_table;
96  digits=-1;
97  columntype=hk_dsgridcolumn::columnedit;
98  alignment=hk_dsdatavisible::alignleft;
99  }
100  hk_string name;
101  hk_string defaultvalue;
102  hk_string identifier;
103  hk_dsdatavisible::alignmenttype alignment;
104  bool use_separators;
105  int digits;
106  datasourcetype listdatasourcetype;
107  bool readonly;
108  hk_string listdatasource;
109  hk_string listcolumn;
110  hk_string viewcolumn;
111  hk_string displayname;
112  hk_dsgridcolumn::enum_columntype columntype;
113  hk_string p_before_row_change_action;
114  hk_string p_after_row_change_action;
115  hk_string p_after_delete_action,p_before_delete_action;
116  hk_string p_after_update_action,p_before_update_action;
117  hk_string p_after_insert_action,p_before_insert_action;
118  hk_string p_clickaction,p_doubleclickaction, p_onopenaction,p_oncloseaction;
119  hk_string p_on_getfocus_action,p_on_loosefocus_action,p_on_key_action,p_on_select_action;
120  };
121  void set_buttontext(void);
122  list<fieldstruct> fields;
123  void listentries_changed(void);
124  void load_presentationdatasources(void);
125  void set_columnvalues(void);
126  void reload_listdatasource(void);
127  void set_currentlistdatasource(void);
128  hk_kdegrid* p_grid;
129  list<fieldstruct>::iterator p_currentfieldit;
130  QString settxt, notsettxt;
131  QScrollView* p_actionscrollview;
132 
133 };
134 #endif // HK_KDEGRIDCOLUMNDIALOG_H
Definition: hk_kdegridcolumndialogbase.h:34
Definition: hk_kdegridcolumndialog.h:31
shows data in a grid without columnheaders.
Definition: hk_kdegrid.h:45