1 | /*
|
---|
2 | * QTDialog.hpp
|
---|
3 | *
|
---|
4 | * Created on: Jan 18, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef QTDIALOG_HPP_
|
---|
9 | #define QTDIALOG_HPP_
|
---|
10 |
|
---|
11 | #include "UIElements/Dialog.hpp"
|
---|
12 | #include <QtGui/QDialog>
|
---|
13 | #include <QtGui/QFileDialog>
|
---|
14 |
|
---|
15 | #include <boost/filesystem.hpp>
|
---|
16 |
|
---|
17 | class QBoxLayout;
|
---|
18 | class QLabel;
|
---|
19 | class QSpinBox;
|
---|
20 | class QDoubleSpinBox;
|
---|
21 | class QLineEdit;
|
---|
22 | class QListWidget;
|
---|
23 | class QComboBox;
|
---|
24 | class QDialogButtonBox;
|
---|
25 |
|
---|
26 |
|
---|
27 | // Forward declarations for plumbing
|
---|
28 | template<typename T> class QTQueryListPipe;
|
---|
29 | class BooleanQTQueryPipe;
|
---|
30 | class StringQTQueryPipe;
|
---|
31 | class StringsQTQueryPipe;
|
---|
32 | class IntQTQueryPipe;
|
---|
33 | class DoubleQTQueryPipe;
|
---|
34 | class DoublesQTQueryPipe;
|
---|
35 | class AtomQTQueryPipe;
|
---|
36 | class AtomsQTQueryPipe;
|
---|
37 | class MoleculeQTQueryPipe;
|
---|
38 | class MoleculesQTQueryPipe;
|
---|
39 | class EmptyQTQueryPipe;
|
---|
40 | class ElementQTQueryPipe;
|
---|
41 | class ElementsQTQueryPipe;
|
---|
42 | class VectorQTQueryPipe;
|
---|
43 | class VectorsQTQueryPipe;
|
---|
44 | class FileQTQueryPipe;
|
---|
45 |
|
---|
46 | class QTDialog : public QDialog, public Dialog
|
---|
47 | {
|
---|
48 | Q_OBJECT
|
---|
49 | public:
|
---|
50 | QTDialog();
|
---|
51 | virtual ~QTDialog();
|
---|
52 |
|
---|
53 | virtual void queryEmpty(const char*, std::string);
|
---|
54 | virtual void queryBoolean(const char *, std::string = "");
|
---|
55 | virtual void queryInt(const char *,std::string = "");
|
---|
56 | virtual void queryInts(const char *,std::string = "");
|
---|
57 | virtual void queryDouble(const char*,std::string = "");
|
---|
58 | virtual void queryDoubles(const char*,std::string = "");
|
---|
59 | virtual void queryString(const char*,std::string = "");
|
---|
60 | virtual void queryStrings(const char*,std::string = "");
|
---|
61 | virtual void queryAtom(const char*,std::string = "");
|
---|
62 | virtual void queryAtoms(const char*,std::string = "");
|
---|
63 | virtual void queryMolecule(const char*,std::string = "");
|
---|
64 | virtual void queryMolecules(const char*,std::string = "");
|
---|
65 | virtual void queryVector(const char*,bool,std::string = "");
|
---|
66 | virtual void queryVectors(const char*,bool,std::string = "");
|
---|
67 | virtual void queryBox(const char*, std::string = "");
|
---|
68 | virtual void queryElement(const char*,std::string = "");
|
---|
69 | virtual void queryElements(const char*,std::string = "");
|
---|
70 | virtual void queryFile(const char*,std::string = "");
|
---|
71 |
|
---|
72 | virtual bool display();
|
---|
73 |
|
---|
74 | virtual void update();
|
---|
75 |
|
---|
76 | protected:
|
---|
77 | class IntQTQuery : public Dialog::IntQuery {
|
---|
78 | public:
|
---|
79 | IntQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
80 | virtual ~IntQTQuery();
|
---|
81 | virtual bool handle();
|
---|
82 | private:
|
---|
83 | QBoxLayout *parent;
|
---|
84 | QBoxLayout *thisLayout;
|
---|
85 | QLabel *titleLabel;
|
---|
86 | QSpinBox *inputBox;
|
---|
87 |
|
---|
88 | IntQTQueryPipe *pipe;
|
---|
89 | };
|
---|
90 |
|
---|
91 | class IntsQTQuery : public Dialog::IntsQuery {
|
---|
92 | public:
|
---|
93 | IntsQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
94 | virtual ~IntsQTQuery();
|
---|
95 | virtual bool handle();
|
---|
96 | void IntegerEntered(const QString&);
|
---|
97 | void IntegerSelected();
|
---|
98 | void AddInteger();
|
---|
99 | void RemoveInteger();
|
---|
100 | private:
|
---|
101 | QBoxLayout *parent;
|
---|
102 | QBoxLayout *thisLayout;
|
---|
103 | QLabel *titleLabel;
|
---|
104 |
|
---|
105 | QTQueryListPipe<int> *pipe;
|
---|
106 | };
|
---|
107 |
|
---|
108 | class DoubleQTQuery : public Dialog::DoubleQuery {
|
---|
109 | public:
|
---|
110 | DoubleQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
111 | virtual ~DoubleQTQuery();
|
---|
112 | virtual bool handle();
|
---|
113 | private:
|
---|
114 | QBoxLayout *parent;
|
---|
115 | QBoxLayout *thisLayout;
|
---|
116 | QLabel *titleLabel;
|
---|
117 | QDoubleSpinBox *inputBox;
|
---|
118 |
|
---|
119 | DoubleQTQueryPipe *pipe;
|
---|
120 | };
|
---|
121 |
|
---|
122 | class DoublesQTQuery : public Dialog::DoublesQuery {
|
---|
123 | public:
|
---|
124 | DoublesQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
125 | virtual ~DoublesQTQuery();
|
---|
126 | virtual bool handle();
|
---|
127 | private:
|
---|
128 | QBoxLayout *parent;
|
---|
129 | QBoxLayout *thisLayout;
|
---|
130 | QLabel *titleLabel;
|
---|
131 | QDoubleSpinBox *inputBox;
|
---|
132 |
|
---|
133 | QTQueryListPipe<double> *pipe;
|
---|
134 | };
|
---|
135 |
|
---|
136 | class StringQTQuery : public Dialog::StringQuery {
|
---|
137 | public:
|
---|
138 | StringQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
139 | virtual ~StringQTQuery();
|
---|
140 | virtual bool handle();
|
---|
141 | private:
|
---|
142 | QBoxLayout *parent;
|
---|
143 | QBoxLayout *thisLayout;
|
---|
144 | QLabel *titleLabel;
|
---|
145 | QLineEdit *inputBox;
|
---|
146 |
|
---|
147 | StringQTQueryPipe *pipe;
|
---|
148 | };
|
---|
149 |
|
---|
150 | class StringsQTQuery : public Dialog::StringsQuery {
|
---|
151 | public:
|
---|
152 | StringsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
153 | virtual ~StringsQTQuery();
|
---|
154 | virtual bool handle();
|
---|
155 | private:
|
---|
156 | QBoxLayout *parent;
|
---|
157 | QBoxLayout *thisLayout;
|
---|
158 | QLabel *titleLabel;
|
---|
159 | QLineEdit *inputBox;
|
---|
160 |
|
---|
161 | QTQueryListPipe<std::string> *pipe;
|
---|
162 | };
|
---|
163 |
|
---|
164 | class AtomQTQuery : public Dialog::AtomQuery {
|
---|
165 | public:
|
---|
166 | AtomQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
167 | virtual ~AtomQTQuery();
|
---|
168 | virtual bool handle();
|
---|
169 | private:
|
---|
170 | QBoxLayout *parent;
|
---|
171 | QBoxLayout *thisLayout;
|
---|
172 | QLabel *titleLabel;
|
---|
173 | QComboBox *inputBox;
|
---|
174 |
|
---|
175 | AtomQTQueryPipe *pipe;
|
---|
176 | };
|
---|
177 |
|
---|
178 | class AtomsQTQuery : public Dialog::AtomsQuery {
|
---|
179 | public:
|
---|
180 | AtomsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
181 | virtual ~AtomsQTQuery();
|
---|
182 | virtual bool handle();
|
---|
183 | private:
|
---|
184 | QBoxLayout *parent;
|
---|
185 | QBoxLayout *thisLayout;
|
---|
186 | QLabel *titleLabel;
|
---|
187 | QComboBox *inputBox;
|
---|
188 |
|
---|
189 | AtomsQTQueryPipe *pipe;
|
---|
190 | };
|
---|
191 |
|
---|
192 | class MoleculeQTQuery : public Dialog::MoleculeQuery {
|
---|
193 | public:
|
---|
194 | MoleculeQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
195 | virtual ~MoleculeQTQuery();
|
---|
196 | virtual bool handle();
|
---|
197 | private:
|
---|
198 | QBoxLayout *parent;
|
---|
199 | QBoxLayout *thisLayout;
|
---|
200 | QLabel *titleLabel;
|
---|
201 | QComboBox *inputBox;
|
---|
202 |
|
---|
203 | MoleculeQTQueryPipe *pipe;
|
---|
204 | };
|
---|
205 |
|
---|
206 | class MoleculesQTQuery : public Dialog::MoleculesQuery {
|
---|
207 | public:
|
---|
208 | MoleculesQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
209 | virtual ~MoleculesQTQuery();
|
---|
210 | virtual bool handle();
|
---|
211 | private:
|
---|
212 | QBoxLayout *parent;
|
---|
213 | QBoxLayout *thisLayout;
|
---|
214 | QLabel *titleLabel;
|
---|
215 | QComboBox *inputBox;
|
---|
216 |
|
---|
217 | MoleculesQTQueryPipe *pipe;
|
---|
218 | };
|
---|
219 |
|
---|
220 | class VectorQTQuery : public Dialog::VectorQuery {
|
---|
221 | public:
|
---|
222 | VectorQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
|
---|
223 | virtual ~VectorQTQuery();
|
---|
224 | virtual bool handle();
|
---|
225 | private:
|
---|
226 | QBoxLayout *parent;
|
---|
227 | QBoxLayout *mainLayout;
|
---|
228 | QLabel *titleLabel;
|
---|
229 | QBoxLayout *subLayout;
|
---|
230 | QBoxLayout *coordLayout;
|
---|
231 | QLabel *coordLabel;
|
---|
232 | QDoubleSpinBox *coordInput;
|
---|
233 |
|
---|
234 | VectorQTQueryPipe *pipe;
|
---|
235 | };
|
---|
236 |
|
---|
237 | class VectorsQTQuery : public Dialog::VectorsQuery {
|
---|
238 | public:
|
---|
239 | VectorsQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
|
---|
240 | virtual ~VectorsQTQuery();
|
---|
241 | virtual bool handle();
|
---|
242 | private:
|
---|
243 | QBoxLayout *parent;
|
---|
244 | QBoxLayout *mainLayout;
|
---|
245 | QLabel *titleLabel;
|
---|
246 | QBoxLayout *subLayout;
|
---|
247 | QBoxLayout *coordLayout;
|
---|
248 | QLabel *coordLabel;
|
---|
249 | QDoubleSpinBox *coordInput;
|
---|
250 |
|
---|
251 | VectorsQTQueryPipe *pipe;
|
---|
252 | };
|
---|
253 |
|
---|
254 | class EmptyQTQuery : public Dialog::EmptyQuery {
|
---|
255 | public:
|
---|
256 | EmptyQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
257 | virtual ~EmptyQTQuery();
|
---|
258 | virtual bool handle();
|
---|
259 | private:
|
---|
260 | QBoxLayout *parent;
|
---|
261 | QBoxLayout *thisLayout;
|
---|
262 | QLabel *titleLabel;
|
---|
263 |
|
---|
264 | EmptyQTQueryPipe *pipe;
|
---|
265 | };
|
---|
266 |
|
---|
267 | class BooleanQTQuery : public Dialog::BooleanQuery {
|
---|
268 | public:
|
---|
269 | BooleanQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
270 | virtual ~BooleanQTQuery();
|
---|
271 | virtual bool handle();
|
---|
272 | private:
|
---|
273 | QBoxLayout *parent;
|
---|
274 | QBoxLayout *thisLayout;
|
---|
275 | QLabel *titleLabel;
|
---|
276 | QComboBox *booleanComboBox;
|
---|
277 |
|
---|
278 | BooleanQTQueryPipe *pipe;
|
---|
279 | };
|
---|
280 |
|
---|
281 | class ElementQTQuery : public Dialog::ElementQuery {
|
---|
282 | public:
|
---|
283 | ElementQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
284 | virtual ~ElementQTQuery();
|
---|
285 | virtual bool handle();
|
---|
286 | private:
|
---|
287 | QBoxLayout *parent;
|
---|
288 | QBoxLayout *thisLayout;
|
---|
289 | QLabel *titleLabel;
|
---|
290 | QComboBox *inputBox;
|
---|
291 |
|
---|
292 | ElementQTQueryPipe *pipe;
|
---|
293 | };
|
---|
294 |
|
---|
295 | class ElementsQTQuery : public Dialog::ElementsQuery {
|
---|
296 | public:
|
---|
297 | ElementsQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
298 | virtual ~ElementsQTQuery();
|
---|
299 | virtual bool handle();
|
---|
300 | private:
|
---|
301 | QBoxLayout *parent;
|
---|
302 | QBoxLayout *thisLayout;
|
---|
303 | QLabel *titleLabel;
|
---|
304 | QComboBox *inputBox;
|
---|
305 |
|
---|
306 | ElementsQTQueryPipe *pipe;
|
---|
307 | };
|
---|
308 |
|
---|
309 | class FileQTQuery : public Dialog::FileQuery {
|
---|
310 | public:
|
---|
311 | FileQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
312 | virtual ~FileQTQuery();
|
---|
313 | virtual bool handle();
|
---|
314 | private:
|
---|
315 | QBoxLayout *parent;
|
---|
316 | QBoxLayout *thisLayout;
|
---|
317 | QLabel *filenameLabel;
|
---|
318 | QLineEdit *filenameLineEdit;
|
---|
319 | QPushButton *filedialogButton;
|
---|
320 |
|
---|
321 | FileQTQueryPipe *pipe;
|
---|
322 | };
|
---|
323 |
|
---|
324 | private:
|
---|
325 | QBoxLayout *mainLayout;
|
---|
326 | QBoxLayout *inputLayout;
|
---|
327 | QBoxLayout *buttonLayout;
|
---|
328 | QDialogButtonBox *buttons;
|
---|
329 | };
|
---|
330 |
|
---|
331 | // All kinds of plumbing for Queries
|
---|
332 | // Plumbing needs to be outside of the class where it is needed,
|
---|
333 | // since MOC doesn't like nested classes
|
---|
334 |
|
---|
335 |
|
---|
336 | template<typename T> class QTQueryListPipe : public QWidget {
|
---|
337 | public:
|
---|
338 | QTQueryListPipe(std::vector<T> *_content, QTDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
|
---|
339 | virtual ~QTQueryListPipe();
|
---|
340 | void AddInteger();
|
---|
341 | void RemoveInteger();
|
---|
342 | void IntegerSelected();
|
---|
343 | void IntegerEntered(const QString&);
|
---|
344 |
|
---|
345 | private:
|
---|
346 | void AddValue(T item);
|
---|
347 | void RemoveRow(int row);
|
---|
348 |
|
---|
349 | std::vector<T> *content;
|
---|
350 | QTDialog *dialog;
|
---|
351 | QLineEdit *inputBox;
|
---|
352 | QListWidget *inputList;
|
---|
353 | QPushButton *AddButton;
|
---|
354 | QPushButton *RemoveButton;
|
---|
355 | };
|
---|
356 |
|
---|
357 |
|
---|
358 | class StringQTQueryPipe : public QWidget {
|
---|
359 | Q_OBJECT
|
---|
360 | public:
|
---|
361 | StringQTQueryPipe(std::string *_content, QTDialog *_dialog);
|
---|
362 | virtual ~StringQTQueryPipe();
|
---|
363 |
|
---|
364 | public slots:
|
---|
365 | void update(const QString&);
|
---|
366 |
|
---|
367 | private:
|
---|
368 | std::string *content;
|
---|
369 | QTDialog *dialog;
|
---|
370 |
|
---|
371 | };
|
---|
372 |
|
---|
373 | class IntQTQueryPipe : public QWidget {
|
---|
374 | Q_OBJECT
|
---|
375 | public:
|
---|
376 | IntQTQueryPipe(int *_content, QTDialog *_dialog);
|
---|
377 | virtual ~IntQTQueryPipe();
|
---|
378 |
|
---|
379 | public slots:
|
---|
380 | void update(int);
|
---|
381 |
|
---|
382 | private:
|
---|
383 | int *content;
|
---|
384 | QTDialog *dialog;
|
---|
385 |
|
---|
386 | };
|
---|
387 |
|
---|
388 |
|
---|
389 | class DoubleQTQueryPipe : public QWidget {
|
---|
390 | Q_OBJECT
|
---|
391 | public:
|
---|
392 | DoubleQTQueryPipe(double *_content, QTDialog *_dialog);
|
---|
393 | virtual ~DoubleQTQueryPipe();
|
---|
394 |
|
---|
395 | public slots:
|
---|
396 | void update(double);
|
---|
397 |
|
---|
398 | private:
|
---|
399 | double *content;
|
---|
400 | QTDialog *dialog;
|
---|
401 |
|
---|
402 | };
|
---|
403 |
|
---|
404 | class AtomQTQueryPipe : public QWidget {
|
---|
405 | Q_OBJECT
|
---|
406 | public:
|
---|
407 | AtomQTQueryPipe(atom **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
408 | virtual ~AtomQTQueryPipe();
|
---|
409 |
|
---|
410 | public slots:
|
---|
411 | void update(int);
|
---|
412 |
|
---|
413 | private:
|
---|
414 | atom **content;
|
---|
415 | QTDialog *dialog;
|
---|
416 | QComboBox *theBox;
|
---|
417 |
|
---|
418 | };
|
---|
419 |
|
---|
420 |
|
---|
421 | class AtomsQTQueryPipe : public QWidget {
|
---|
422 | Q_OBJECT
|
---|
423 | public:
|
---|
424 | AtomsQTQueryPipe(std::vector<atom *>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
425 | virtual ~AtomsQTQueryPipe();
|
---|
426 |
|
---|
427 | public slots:
|
---|
428 | void update(int);
|
---|
429 |
|
---|
430 | private:
|
---|
431 | std::vector<atom *>*content;
|
---|
432 | QTDialog *dialog;
|
---|
433 | QComboBox *theBox;
|
---|
434 |
|
---|
435 | };
|
---|
436 |
|
---|
437 | class MoleculeQTQueryPipe : public QWidget {
|
---|
438 | Q_OBJECT
|
---|
439 | public:
|
---|
440 | MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
441 | virtual ~MoleculeQTQueryPipe();
|
---|
442 |
|
---|
443 | public slots:
|
---|
444 | void update(int);
|
---|
445 |
|
---|
446 | private:
|
---|
447 | molecule **content;
|
---|
448 | QTDialog *dialog;
|
---|
449 | QComboBox *theBox;
|
---|
450 |
|
---|
451 | };
|
---|
452 |
|
---|
453 | class MoleculesQTQueryPipe : public QWidget {
|
---|
454 | Q_OBJECT
|
---|
455 | public:
|
---|
456 | MoleculesQTQueryPipe(std::vector<molecule *>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
457 | virtual ~MoleculesQTQueryPipe();
|
---|
458 |
|
---|
459 | public slots:
|
---|
460 | void update(int);
|
---|
461 |
|
---|
462 | private:
|
---|
463 | std::vector<molecule *>*content;
|
---|
464 | QTDialog *dialog;
|
---|
465 | QComboBox *theBox;
|
---|
466 |
|
---|
467 | };
|
---|
468 |
|
---|
469 | class VectorQTQueryPipe : public QWidget {
|
---|
470 | Q_OBJECT
|
---|
471 | public:
|
---|
472 | VectorQTQueryPipe(Vector *_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
473 | virtual ~VectorQTQueryPipe();
|
---|
474 |
|
---|
475 | public slots:
|
---|
476 | void update();
|
---|
477 |
|
---|
478 | private:
|
---|
479 | Vector *content;
|
---|
480 | QTDialog *dialog;
|
---|
481 | QComboBox *theBox;
|
---|
482 | };
|
---|
483 |
|
---|
484 | class VectorsQTQueryPipe : public QWidget {
|
---|
485 | Q_OBJECT
|
---|
486 | public:
|
---|
487 | VectorsQTQueryPipe(std::vector<Vector>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
488 | virtual ~VectorsQTQueryPipe();
|
---|
489 |
|
---|
490 | public slots:
|
---|
491 | void update();
|
---|
492 |
|
---|
493 | private:
|
---|
494 | std::vector<Vector> *content;
|
---|
495 | QTDialog *dialog;
|
---|
496 | QComboBox *theBox;
|
---|
497 | };
|
---|
498 |
|
---|
499 | class EmptyQTQueryPipe : public QWidget {
|
---|
500 | Q_OBJECT
|
---|
501 | public:
|
---|
502 | EmptyQTQueryPipe(QTDialog *_dialog, QLabel *_textLabel);
|
---|
503 | virtual ~EmptyQTQueryPipe();
|
---|
504 |
|
---|
505 | public slots:
|
---|
506 | void update();
|
---|
507 |
|
---|
508 | private:
|
---|
509 | QTDialog *dialog;
|
---|
510 | QLabel *textLabel;
|
---|
511 | };
|
---|
512 |
|
---|
513 | class BooleanQTQueryPipe : public QWidget {
|
---|
514 | Q_OBJECT
|
---|
515 | public:
|
---|
516 | BooleanQTQueryPipe(const bool *_content, QTDialog *_dialog, QComboBox *_booleanComboBox);
|
---|
517 | virtual ~BooleanQTQueryPipe();
|
---|
518 |
|
---|
519 | public slots:
|
---|
520 | void update();
|
---|
521 |
|
---|
522 | private:
|
---|
523 | const bool *content;
|
---|
524 | QTDialog *dialog;
|
---|
525 | QComboBox *booleanComboBox;
|
---|
526 | };
|
---|
527 |
|
---|
528 | class ElementQTQueryPipe : public QWidget {
|
---|
529 | Q_OBJECT
|
---|
530 | public:
|
---|
531 | ElementQTQueryPipe(const element **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
532 | virtual ~ElementQTQueryPipe();
|
---|
533 |
|
---|
534 | public slots:
|
---|
535 | void update(int);
|
---|
536 |
|
---|
537 | private:
|
---|
538 | const element **content;
|
---|
539 | QTDialog *dialog;
|
---|
540 | QComboBox *theBox;
|
---|
541 | };
|
---|
542 |
|
---|
543 | class ElementsQTQueryPipe : public QWidget {
|
---|
544 | Q_OBJECT
|
---|
545 | public:
|
---|
546 | ElementsQTQueryPipe(std::vector<const element *>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
547 | virtual ~ElementsQTQueryPipe();
|
---|
548 |
|
---|
549 | public slots:
|
---|
550 | void update(int);
|
---|
551 |
|
---|
552 | private:
|
---|
553 | std::vector<const element *>*content;
|
---|
554 | QTDialog *dialog;
|
---|
555 | QComboBox *theBox;
|
---|
556 | };
|
---|
557 |
|
---|
558 | class FileQTQueryPipe : public QWidget {
|
---|
559 | Q_OBJECT
|
---|
560 | public:
|
---|
561 | FileQTQueryPipe(boost::filesystem::path *_content, QTDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
|
---|
562 | virtual ~FileQTQueryPipe();
|
---|
563 |
|
---|
564 | public slots:
|
---|
565 | void update();
|
---|
566 | void showFileDialog();
|
---|
567 |
|
---|
568 | private:
|
---|
569 | boost::filesystem::path *content;
|
---|
570 | QTDialog *dialog;
|
---|
571 | QLineEdit *filenameLineEdit;
|
---|
572 | QPushButton *filedialogButton;
|
---|
573 | QFileDialog *theFileDialog;
|
---|
574 | };
|
---|
575 |
|
---|
576 | #endif /* QTDIALOG_HPP_ */
|
---|