• 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
37class TQSpinBox;
38class FlagListBox;
39class FlagListToolTip;
40class FlagCheckBoxController;
41class FlagRadioButtonController;
42class FlagPathEditController;
43class FlagEditController;
44class KLineEdit;
45class TQPushButton;
46class KURLRequester;
47
49class FlagListItem : public TQCheckListItem
50{
51public:
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 {}
58private:
59 TQString flag;
60 TQString off;
61 TQString desc;
62 friend class FlagListToolTip;
63 friend class FlagListBox;
64};
65
66
68class FlagListBox : public TQListView
69{
70 TQ_OBJECT
71
72public:
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
83class FlagCheckBox : public TQCheckBox
84{
85 TQ_OBJECT
86
87public:
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
99private:
100 TQString flag;
101 TQString off;
102 TQString def;
103 bool includeOff;
104 bool useDef;
105 bool defSet;
106 friend class FlagCheckBoxController;
107};
108
110class FlagRadioButton : public TQRadioButton
111{
112 TQ_OBJECT
113
114public:
115 FlagRadioButton(TQWidget *parent, FlagRadioButtonController *controller,
116 const TQString &flagstr, const TQString &description);
117 ~FlagRadioButton()
118 {}
119
120private:
121 TQString flag;
122 friend class FlagRadioButtonController;
123};
124
126class FlagPathEdit: public TQWidget
127{
128 TQ_OBJECT
129
130public:
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
141private slots:
142 void showPathDetails();
143
144private:
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
156class FlagListEdit: public TQWidget
157{
158 TQ_OBJECT
159
160public:
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
173private slots:
174 void showListDetails();
175
176private:
177 KLineEdit *edit;
178 TQPushButton *details;
179
180 TQString delimiter;
181 TQString flag;
182 TQString m_description;
183 friend class FlagEditController;
184};
185
187class FlagSpinEdit: public TQWidget
188{
189public:
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
200private:
201 int m_defaultVal;
202 TQString flag;
203
204 TQSpinBox *spb;
205
206 friend class FlagEditController;
207};
208
210class FlagPathEditController
211{
212public:
213 FlagPathEditController();
214 ~FlagPathEditController();
215
216 void readFlags(TQStringList *list);
217 void writeFlags(TQStringList *list);
218
219private:
220 void addPathEdit(FlagPathEdit *item);
221 TQPtrList<FlagPathEdit> plist;
222 friend class FlagPathEdit;
223};
224
226class FlagEditController
227{
228public:
229 FlagEditController();
230 ~FlagEditController();
231
232 void readFlags(TQStringList *list);
233 void writeFlags(TQStringList *list);
234
235private:
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
245class FlagCheckBoxController
246{
247public:
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);
260private:
261 TQPtrList<FlagCheckBox> cblist;
262
263 TQStringList m_multiKeys;
264};
265
267class FlagRadioButtonController
268{
269public:
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);
282private:
283 TQPtrList<FlagRadioButton> cblist;
284
285 TQStringList m_multiKeys;
286};
287
288#endif
FlagCheckBoxController
Controller for check box editors.
Definition flagboxes.h:246
FlagCheckBox
Check box item holding a compiler flag.
Definition flagboxes.h:84
FlagEditController
Controller for flag editors.
Definition flagboxes.h:227
FlagListBox
List box item holding a compiler flag.
Definition flagboxes.h:69
FlagListEdit
List editor if list is a compiler flag.
Definition flagboxes.h:157
FlagListItem
List item holding a compiler flag.
Definition flagboxes.h:50
FlagPathEditController
Controller for path editors.
Definition flagboxes.h:211
FlagPathEdit
Path editor if path is a compiler flag.
Definition flagboxes.h:127
FlagRadioButtonController
Controller for radiobutton editors.
Definition flagboxes.h:268
FlagRadioButton
Radiobutton item holding an option of a compiler flag.
Definition flagboxes.h:111
FlagSpinEdit
Spin editor of a compiler flag.
Definition flagboxes.h:188

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.9.8
This website is maintained by Timothy Pearson.