• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Widgets Library
 

KDevelop Widgets Library

  • lib
  • widgets
flagboxes.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2000-2001 Bernd Gehrmann <bernd@kdevelop.org>
3  Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef _FLAGBOXES_H_
22 #define _FLAGBOXES_H_
23 
24 #include <tdefile.h>
25 
31 #include <tqlistview.h>
32 #include <tqcheckbox.h>
33 #include <tqradiobutton.h>
34 #include <tqptrlist.h>
35 #include <tqstringlist.h>
36 
37 class TQSpinBox;
38 class FlagListBox;
39 class FlagListToolTip;
40 class FlagCheckBoxController;
41 class FlagRadioButtonController;
42 class FlagPathEditController;
43 class FlagEditController;
44 class KLineEdit;
45 class TQPushButton;
46 class KURLRequester;
47 
49 class FlagListItem : public TQCheckListItem
50 {
51 public:
52  FlagListItem(FlagListBox *parent, const TQString &flagstr,
53  const TQString &description);
54  FlagListItem(FlagListBox *parent, const TQString &flagstr,
55  const TQString &description, const TQString &offstr);
56  ~FlagListItem()
57  {}
58 private:
59  TQString flag;
60  TQString off;
61  TQString desc;
62  friend class FlagListToolTip;
63  friend class FlagListBox;
64 };
65 
66 
68 class FlagListBox : public TQListView
69 {
70  Q_OBJECT
71 
72 public:
73  FlagListBox( TQWidget *parent=0, const char *name=0 );
74  ~FlagListBox()
75  {}
76 
77  void readFlags(TQStringList *list);
78  void writeFlags(TQStringList *list);
79 };
80 
81 
83 class FlagCheckBox : public TQCheckBox
84 {
85  Q_OBJECT
86 
87 public:
88  FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
89  const TQString &flagstr, const TQString &description);
90  FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
91  const TQString &flagstr, const TQString &description,
92  const TQString &offstr);
93  FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
94  const TQString &flagstr, const TQString &description,
95  const TQString &offstr, const TQString &defstr);
96  ~FlagCheckBox()
97  {}
98 
99 private:
100  TQString flag;
101  TQString off;
102  TQString def;
103  bool includeOff;
104  bool useDef;
105  bool defSet;
106  friend class FlagCheckBoxController;
107 };
108 
110 class FlagRadioButton : public TQRadioButton
111 {
112  Q_OBJECT
113 
114 public:
115  FlagRadioButton(TQWidget *parent, FlagRadioButtonController *controller,
116  const TQString &flagstr, const TQString &description);
117  ~FlagRadioButton()
118  {}
119 
120 private:
121  TQString flag;
122  friend class FlagRadioButtonController;
123 };
124 
126 class FlagPathEdit: public TQWidget
127 {
128  Q_OBJECT
129 
130 public:
132  FlagPathEdit(TQWidget *parent, TQString pathDelimiter, FlagPathEditController *controller,
133  const TQString &flagstr, const TQString &description, KFile::Mode mode = KFile::Directory);
134 
135  ~FlagPathEdit() {}
136 
137  void setText(const TQString text);
138  bool isEmpty();
139  TQString text();
140 
141 private slots:
142  void showPathDetails();
143 
144 private:
145  KLineEdit *edit;
146  TQPushButton *details;
147  KURLRequester *url;
148 
149  TQString delimiter;
150  TQString flag;
151  TQString m_description;
152  friend class FlagPathEditController;
153 };
154 
156 class FlagListEdit: public TQWidget
157 {
158  Q_OBJECT
159 
160 public:
162  FlagListEdit(TQWidget *parent, TQString listDelimiter, FlagEditController *controller,
163  const TQString &flagstr, const TQString &description);
164 
165  ~FlagListEdit() {}
166 
167  void setText(const TQString text);
168  void appendText(const TQString text);
169  bool isEmpty();
170  TQString text();
171  TQStringList flags();
172 
173 private slots:
174  void showListDetails();
175 
176 private:
177  KLineEdit *edit;
178  TQPushButton *details;
179 
180  TQString delimiter;
181  TQString flag;
182  TQString m_description;
183  friend class FlagEditController;
184 };
185 
187 class FlagSpinEdit: public TQWidget
188 {
189 public:
190  FlagSpinEdit(TQWidget *parent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController *controller,
191  const TQString &flagstr, const TQString &description);
192  ~FlagSpinEdit() {}
193 
194  void setText(const TQString text);
195  TQString text();
196  bool isDefault();
197 
198  TQString flags();
199 
200 private:
201  int m_defaultVal;
202  TQString flag;
203 
204  TQSpinBox *spb;
205 
206  friend class FlagEditController;
207 };
208 
210 class FlagPathEditController
211 {
212 public:
213  FlagPathEditController();
214  ~FlagPathEditController();
215 
216  void readFlags(TQStringList *list);
217  void writeFlags(TQStringList *list);
218 
219 private:
220  void addPathEdit(FlagPathEdit *item);
221  TQPtrList<FlagPathEdit> plist;
222  friend class FlagPathEdit;
223 };
224 
226 class FlagEditController
227 {
228 public:
229  FlagEditController();
230  ~FlagEditController();
231 
232  void readFlags(TQStringList *list);
233  void writeFlags(TQStringList *list);
234 
235 private:
236  void addListEdit(FlagListEdit *item);
237  void addSpinBox(FlagSpinEdit *item);
238  TQPtrList<FlagListEdit> plist;
239  TQPtrList<FlagSpinEdit> slist;
240  friend class FlagListEdit;
241  friend class FlagSpinEdit;
242 };
243 
245 class FlagCheckBoxController
246 {
247 public:
252  FlagCheckBoxController(TQStringList multiKeys = TQStringList());
253  ~FlagCheckBoxController()
254  {}
255 
256  void readFlags(TQStringList *list);
257  void writeFlags(TQStringList *list);
258 
259  void addCheckBox(FlagCheckBox *item);
260 private:
261  TQPtrList<FlagCheckBox> cblist;
262 
263  TQStringList m_multiKeys;
264 };
265 
267 class FlagRadioButtonController
268 {
269 public:
274  FlagRadioButtonController(TQStringList multiKeys = TQStringList());
275  ~FlagRadioButtonController()
276  {}
277 
278  void readFlags(TQStringList *list);
279  void writeFlags(TQStringList *list);
280 
281  void addRadioButton(FlagRadioButton *item);
282 private:
283  TQPtrList<FlagRadioButton> cblist;
284 
285  TQStringList m_multiKeys;
286 };
287 
288 #endif
FlagPathEditController
Controller for path editors.
Definition: flagboxes.h:210
FlagListBox
List box item holding a compiler flag.
Definition: flagboxes.h:68
FlagListEdit
List editor if list is a compiler flag.
Definition: flagboxes.h:156
FlagCheckBox
Check box item holding a compiler flag.
Definition: flagboxes.h:83
FlagSpinEdit
Spin editor of a compiler flag.
Definition: flagboxes.h:187
FlagRadioButton
Radiobutton item holding an option of a compiler flag.
Definition: flagboxes.h:110
FlagCheckBoxController
Controller for check box editors.
Definition: flagboxes.h:245
FlagRadioButtonController
Controller for radiobutton editors.
Definition: flagboxes.h:267
FlagListItem
List item holding a compiler flag.
Definition: flagboxes.h:49
FlagEditController
Controller for flag editors.
Definition: flagboxes.h:226
FlagPathEdit
Path editor if path is a compiler flag.
Definition: flagboxes.h:126

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop Widgets Library

Skip menu "KDevelop Widgets Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Widgets Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.