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