[d3a5ea] | 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"
|
---|
[cef1d7] | 12 | #include <QtGui/QDialog>
|
---|
[6f5dfe] | 13 | #include <QtGui/QFileDialog>
|
---|
| 14 |
|
---|
| 15 | #include <boost/filesystem.hpp>
|
---|
[d3a5ea] | 16 |
|
---|
| 17 | class QBoxLayout;
|
---|
| 18 | class QLabel;
|
---|
| 19 | class QSpinBox;
|
---|
[b8d1aeb] | 20 | class QDoubleSpinBox;
|
---|
[d3a5ea] | 21 | class QLineEdit;
|
---|
[7cd6e7] | 22 | class QListWidget;
|
---|
[d3a5ea] | 23 | class QComboBox;
|
---|
| 24 | class QDialogButtonBox;
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | // Forward declarations for plumbing
|
---|
[7cd6e7] | 28 | template<typename T> class QTQueryListPipe;
|
---|
[ee62e4] | 29 | class BooleanQTQueryPipe;
|
---|
[d3a5ea] | 30 | class StringQTQueryPipe;
|
---|
[7cd6e7] | 31 | class StringsQTQueryPipe;
|
---|
[d3a5ea] | 32 | class IntQTQueryPipe;
|
---|
[b8d1aeb] | 33 | class DoubleQTQueryPipe;
|
---|
[7cd6e7] | 34 | class DoublesQTQueryPipe;
|
---|
| 35 | class AtomQTQueryPipe;
|
---|
| 36 | class AtomsQTQueryPipe;
|
---|
[d3a5ea] | 37 | class MoleculeQTQueryPipe;
|
---|
[7cd6e7] | 38 | class MoleculesQTQueryPipe;
|
---|
[9d457d] | 39 | class EmptyQTQueryPipe;
|
---|
[cbf01e] | 40 | class ElementQTQueryPipe;
|
---|
[7cd6e7] | 41 | class ElementsQTQueryPipe;
|
---|
| 42 | class VectorQTQueryPipe;
|
---|
| 43 | class VectorsQTQueryPipe;
|
---|
[6f5dfe] | 44 | class FileQTQueryPipe;
|
---|
[d3a5ea] | 45 |
|
---|
| 46 | class QTDialog : public QDialog, public Dialog
|
---|
| 47 | {
|
---|
| 48 | Q_OBJECT
|
---|
| 49 | public:
|
---|
| 50 | QTDialog();
|
---|
| 51 | virtual ~QTDialog();
|
---|
| 52 |
|
---|
[257c77] | 53 | virtual void queryEmpty(const char*, std::string);
|
---|
[3731b4] | 54 | virtual void queryBoolean(const char *, std::string = "");
|
---|
| 55 | virtual void queryInt(const char *,std::string = "");
|
---|
[7cd6e7] | 56 | virtual void queryInts(const char *,std::string = "");
|
---|
[3731b4] | 57 | virtual void queryDouble(const char*,std::string = "");
|
---|
[7cd6e7] | 58 | virtual void queryDoubles(const char*,std::string = "");
|
---|
[3731b4] | 59 | virtual void queryString(const char*,std::string = "");
|
---|
| 60 | virtual void queryStrings(const char*,std::string = "");
|
---|
| 61 | virtual void queryAtom(const char*,std::string = "");
|
---|
[7cd6e7] | 62 | virtual void queryAtoms(const char*,std::string = "");
|
---|
[3731b4] | 63 | virtual void queryMolecule(const char*,std::string = "");
|
---|
[7cd6e7] | 64 | virtual void queryMolecules(const char*,std::string = "");
|
---|
[3731b4] | 65 | virtual void queryVector(const char*,bool,std::string = "");
|
---|
[7cd6e7] | 66 | virtual void queryVectors(const char*,bool,std::string = "");
|
---|
[3731b4] | 67 | virtual void queryBox(const char*, std::string = "");
|
---|
| 68 | virtual void queryElement(const char*,std::string = "");
|
---|
[7cd6e7] | 69 | virtual void queryElements(const char*,std::string = "");
|
---|
[6f5dfe] | 70 | virtual void queryFile(const char*,std::string = "");
|
---|
[d3a5ea] | 71 |
|
---|
| 72 | virtual bool display();
|
---|
| 73 |
|
---|
| 74 | virtual void update();
|
---|
| 75 |
|
---|
| 76 | protected:
|
---|
| 77 | class IntQTQuery : public Dialog::IntQuery {
|
---|
| 78 | public:
|
---|
[3731b4] | 79 | IntQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 80 | virtual ~IntQTQuery();
|
---|
[d3a5ea] | 81 | virtual bool handle();
|
---|
| 82 | private:
|
---|
| 83 | QBoxLayout *parent;
|
---|
| 84 | QBoxLayout *thisLayout;
|
---|
| 85 | QLabel *titleLabel;
|
---|
| 86 | QSpinBox *inputBox;
|
---|
| 87 |
|
---|
| 88 | IntQTQueryPipe *pipe;
|
---|
| 89 | };
|
---|
| 90 |
|
---|
[7cd6e7] | 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 |
|
---|
[b8d1aeb] | 108 | class DoubleQTQuery : public Dialog::DoubleQuery {
|
---|
| 109 | public:
|
---|
[3731b4] | 110 | DoubleQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 111 | virtual ~DoubleQTQuery();
|
---|
[b8d1aeb] | 112 | virtual bool handle();
|
---|
| 113 | private:
|
---|
| 114 | QBoxLayout *parent;
|
---|
| 115 | QBoxLayout *thisLayout;
|
---|
| 116 | QLabel *titleLabel;
|
---|
| 117 | QDoubleSpinBox *inputBox;
|
---|
| 118 |
|
---|
| 119 | DoubleQTQueryPipe *pipe;
|
---|
| 120 | };
|
---|
| 121 |
|
---|
[7cd6e7] | 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 |
|
---|
[d3a5ea] | 136 | class StringQTQuery : public Dialog::StringQuery {
|
---|
| 137 | public:
|
---|
[3731b4] | 138 | StringQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 139 | virtual ~StringQTQuery();
|
---|
[d3a5ea] | 140 | virtual bool handle();
|
---|
| 141 | private:
|
---|
| 142 | QBoxLayout *parent;
|
---|
| 143 | QBoxLayout *thisLayout;
|
---|
[cd8e55] | 144 | QLabel *titleLabel;
|
---|
| 145 | QLineEdit *inputBox;
|
---|
| 146 |
|
---|
| 147 | StringQTQueryPipe *pipe;
|
---|
| 148 | };
|
---|
| 149 |
|
---|
| 150 | class StringsQTQuery : public Dialog::StringsQuery {
|
---|
| 151 | public:
|
---|
[3731b4] | 152 | StringsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cd8e55] | 153 | virtual ~StringsQTQuery();
|
---|
| 154 | virtual bool handle();
|
---|
| 155 | private:
|
---|
| 156 | QBoxLayout *parent;
|
---|
[d3a5ea] | 157 | QBoxLayout *thisLayout;
|
---|
| 158 | QLabel *titleLabel;
|
---|
| 159 | QLineEdit *inputBox;
|
---|
| 160 |
|
---|
[7cd6e7] | 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;
|
---|
[d3a5ea] | 190 | };
|
---|
| 191 |
|
---|
| 192 | class MoleculeQTQuery : public Dialog::MoleculeQuery {
|
---|
| 193 | public:
|
---|
[3731b4] | 194 | MoleculeQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 195 | virtual ~MoleculeQTQuery();
|
---|
[d3a5ea] | 196 | virtual bool handle();
|
---|
| 197 | private:
|
---|
| 198 | QBoxLayout *parent;
|
---|
| 199 | QBoxLayout *thisLayout;
|
---|
| 200 | QLabel *titleLabel;
|
---|
| 201 | QComboBox *inputBox;
|
---|
| 202 |
|
---|
| 203 | MoleculeQTQueryPipe *pipe;
|
---|
| 204 | };
|
---|
| 205 |
|
---|
[7cd6e7] | 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 |
|
---|
[b8d1aeb] | 220 | class VectorQTQuery : public Dialog::VectorQuery {
|
---|
| 221 | public:
|
---|
[3731b4] | 222 | VectorQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
|
---|
[cbf01e] | 223 | virtual ~VectorQTQuery();
|
---|
[b8d1aeb] | 224 | virtual bool handle();
|
---|
| 225 | private:
|
---|
| 226 | QBoxLayout *parent;
|
---|
| 227 | QBoxLayout *mainLayout;
|
---|
| 228 | QLabel *titleLabel;
|
---|
| 229 | QBoxLayout *subLayout;
|
---|
[7cd6e7] | 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;
|
---|
[b8d1aeb] | 250 |
|
---|
[7cd6e7] | 251 | VectorsQTQueryPipe *pipe;
|
---|
[b8d1aeb] | 252 | };
|
---|
| 253 |
|
---|
[9d457d] | 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 |
|
---|
[ee62e4] | 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 |
|
---|
[cbf01e] | 281 | class ElementQTQuery : public Dialog::ElementQuery {
|
---|
| 282 | public:
|
---|
[3731b4] | 283 | ElementQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
[cbf01e] | 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 |
|
---|
[7cd6e7] | 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 |
|
---|
[6f5dfe] | 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;
|
---|
[f001ca] | 317 | QLabel *filenameLabel;
|
---|
[6f5dfe] | 318 | QLineEdit *filenameLineEdit;
|
---|
| 319 | QPushButton *filedialogButton;
|
---|
| 320 |
|
---|
| 321 | FileQTQueryPipe *pipe;
|
---|
| 322 | };
|
---|
| 323 |
|
---|
[d3a5ea] | 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 |
|
---|
[7cd6e7] | 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 |
|
---|
[d3a5ea] | 358 | class StringQTQueryPipe : public QWidget {
|
---|
| 359 | Q_OBJECT
|
---|
| 360 | public:
|
---|
| 361 | StringQTQueryPipe(std::string *_content, QTDialog *_dialog);
|
---|
[cbf01e] | 362 | virtual ~StringQTQueryPipe();
|
---|
[d3a5ea] | 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);
|
---|
[cbf01e] | 377 | virtual ~IntQTQueryPipe();
|
---|
[d3a5ea] | 378 |
|
---|
| 379 | public slots:
|
---|
| 380 | void update(int);
|
---|
| 381 |
|
---|
| 382 | private:
|
---|
| 383 | int *content;
|
---|
| 384 | QTDialog *dialog;
|
---|
| 385 |
|
---|
| 386 | };
|
---|
| 387 |
|
---|
[7cd6e7] | 388 |
|
---|
[b8d1aeb] | 389 | class DoubleQTQueryPipe : public QWidget {
|
---|
| 390 | Q_OBJECT
|
---|
| 391 | public:
|
---|
| 392 | DoubleQTQueryPipe(double *_content, QTDialog *_dialog);
|
---|
[cbf01e] | 393 | virtual ~DoubleQTQueryPipe();
|
---|
[b8d1aeb] | 394 |
|
---|
| 395 | public slots:
|
---|
| 396 | void update(double);
|
---|
| 397 |
|
---|
| 398 | private:
|
---|
| 399 | double *content;
|
---|
| 400 | QTDialog *dialog;
|
---|
| 401 |
|
---|
| 402 | };
|
---|
[d3a5ea] | 403 |
|
---|
[7cd6e7] | 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 |
|
---|
[d3a5ea] | 437 | class MoleculeQTQueryPipe : public QWidget {
|
---|
| 438 | Q_OBJECT
|
---|
| 439 | public:
|
---|
[257c77] | 440 | MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[cbf01e] | 441 | virtual ~MoleculeQTQueryPipe();
|
---|
[d3a5ea] | 442 |
|
---|
| 443 | public slots:
|
---|
| 444 | void update(int);
|
---|
| 445 |
|
---|
| 446 | private:
|
---|
| 447 | molecule **content;
|
---|
| 448 | QTDialog *dialog;
|
---|
| 449 | QComboBox *theBox;
|
---|
| 450 |
|
---|
| 451 | };
|
---|
[cbf01e] | 452 |
|
---|
[7cd6e7] | 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 |
|
---|
[9d457d] | 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 |
|
---|
[ee62e4] | 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 |
|
---|
[cbf01e] | 528 | class ElementQTQueryPipe : public QWidget {
|
---|
| 529 | Q_OBJECT
|
---|
| 530 | public:
|
---|
[e5c0a1] | 531 | ElementQTQueryPipe(const element **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[cbf01e] | 532 | virtual ~ElementQTQueryPipe();
|
---|
| 533 |
|
---|
| 534 | public slots:
|
---|
| 535 | void update(int);
|
---|
| 536 |
|
---|
| 537 | private:
|
---|
[e5c0a1] | 538 | const element **content;
|
---|
[7cd6e7] | 539 | QTDialog *dialog;
|
---|
| 540 | QComboBox *theBox;
|
---|
| 541 | };
|
---|
| 542 |
|
---|
| 543 | class ElementsQTQueryPipe : public QWidget {
|
---|
| 544 | Q_OBJECT
|
---|
| 545 | public:
|
---|
[e5c0a1] | 546 | ElementsQTQueryPipe(std::vector<const element *>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[7cd6e7] | 547 | virtual ~ElementsQTQueryPipe();
|
---|
| 548 |
|
---|
| 549 | public slots:
|
---|
| 550 | void update(int);
|
---|
| 551 |
|
---|
| 552 | private:
|
---|
[e5c0a1] | 553 | std::vector<const element *>*content;
|
---|
[cbf01e] | 554 | QTDialog *dialog;
|
---|
| 555 | QComboBox *theBox;
|
---|
| 556 | };
|
---|
[6f5dfe] | 557 |
|
---|
| 558 | class FileQTQueryPipe : public QWidget {
|
---|
| 559 | Q_OBJECT
|
---|
| 560 | public:
|
---|
[f001ca] | 561 | FileQTQueryPipe(boost::filesystem::path *_content, QTDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
|
---|
[6f5dfe] | 562 | virtual ~FileQTQueryPipe();
|
---|
| 563 |
|
---|
| 564 | public slots:
|
---|
| 565 | void update();
|
---|
| 566 | void showFileDialog();
|
---|
| 567 |
|
---|
| 568 | private:
|
---|
[f001ca] | 569 | boost::filesystem::path *content;
|
---|
[6f5dfe] | 570 | QTDialog *dialog;
|
---|
| 571 | QLineEdit *filenameLineEdit;
|
---|
| 572 | QPushButton *filedialogButton;
|
---|
| 573 | QFileDialog *theFileDialog;
|
---|
| 574 | };
|
---|
| 575 |
|
---|
[d3a5ea] | 576 | #endif /* QTDIALOG_HPP_ */
|
---|