[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 |
|
---|
[c96c66] | 17 | #include <map>
|
---|
| 18 | #include <set>
|
---|
| 19 | #include <vector>
|
---|
| 20 |
|
---|
[d3a5ea] | 21 | class QBoxLayout;
|
---|
| 22 | class QLabel;
|
---|
| 23 | class QSpinBox;
|
---|
[b8d1aeb] | 24 | class QDoubleSpinBox;
|
---|
[d3a5ea] | 25 | class QLineEdit;
|
---|
[7cd6e7] | 26 | class QListWidget;
|
---|
[41167c] | 27 | class QTableWidget;
|
---|
[d3a5ea] | 28 | class QComboBox;
|
---|
| 29 | class QDialogButtonBox;
|
---|
| 30 |
|
---|
[41167c] | 31 | class Matrix;
|
---|
[d3a5ea] | 32 |
|
---|
| 33 | // Forward declarations for plumbing
|
---|
[7cd6e7] | 34 | template<typename T> class QTQueryListPipe;
|
---|
[ee62e4] | 35 | class BooleanQTQueryPipe;
|
---|
[41167c] | 36 | class BoxQTQueryPipe;
|
---|
[d3a5ea] | 37 | class StringQTQueryPipe;
|
---|
[7cd6e7] | 38 | class StringsQTQueryPipe;
|
---|
[d3a5ea] | 39 | class IntQTQueryPipe;
|
---|
[b8d1aeb] | 40 | class DoubleQTQueryPipe;
|
---|
[7cd6e7] | 41 | class DoublesQTQueryPipe;
|
---|
| 42 | class AtomQTQueryPipe;
|
---|
| 43 | class AtomsQTQueryPipe;
|
---|
[d3a5ea] | 44 | class MoleculeQTQueryPipe;
|
---|
[7cd6e7] | 45 | class MoleculesQTQueryPipe;
|
---|
[9d457d] | 46 | class EmptyQTQueryPipe;
|
---|
[cbf01e] | 47 | class ElementQTQueryPipe;
|
---|
[7cd6e7] | 48 | class ElementsQTQueryPipe;
|
---|
| 49 | class VectorQTQueryPipe;
|
---|
| 50 | class VectorsQTQueryPipe;
|
---|
[6f5dfe] | 51 | class FileQTQueryPipe;
|
---|
[d3a5ea] | 52 |
|
---|
| 53 | class QTDialog : public QDialog, public Dialog
|
---|
| 54 | {
|
---|
| 55 | Q_OBJECT
|
---|
| 56 | public:
|
---|
| 57 | QTDialog();
|
---|
| 58 | virtual ~QTDialog();
|
---|
| 59 |
|
---|
[257c77] | 60 | virtual void queryEmpty(const char*, std::string);
|
---|
[3731b4] | 61 | virtual void queryBoolean(const char *, std::string = "");
|
---|
| 62 | virtual void queryInt(const char *,std::string = "");
|
---|
[7cd6e7] | 63 | virtual void queryInts(const char *,std::string = "");
|
---|
[3731b4] | 64 | virtual void queryDouble(const char*,std::string = "");
|
---|
[7cd6e7] | 65 | virtual void queryDoubles(const char*,std::string = "");
|
---|
[3731b4] | 66 | virtual void queryString(const char*,std::string = "");
|
---|
| 67 | virtual void queryStrings(const char*,std::string = "");
|
---|
| 68 | virtual void queryAtom(const char*,std::string = "");
|
---|
[7cd6e7] | 69 | virtual void queryAtoms(const char*,std::string = "");
|
---|
[3731b4] | 70 | virtual void queryMolecule(const char*,std::string = "");
|
---|
[7cd6e7] | 71 | virtual void queryMolecules(const char*,std::string = "");
|
---|
[3731b4] | 72 | virtual void queryVector(const char*,bool,std::string = "");
|
---|
[7cd6e7] | 73 | virtual void queryVectors(const char*,bool,std::string = "");
|
---|
[3731b4] | 74 | virtual void queryBox(const char*, std::string = "");
|
---|
| 75 | virtual void queryElement(const char*,std::string = "");
|
---|
[7cd6e7] | 76 | virtual void queryElements(const char*,std::string = "");
|
---|
[6f5dfe] | 77 | virtual void queryFile(const char*,std::string = "");
|
---|
[d3a5ea] | 78 |
|
---|
| 79 | virtual bool display();
|
---|
| 80 |
|
---|
| 81 | virtual void update();
|
---|
| 82 |
|
---|
| 83 | protected:
|
---|
| 84 | class IntQTQuery : public Dialog::IntQuery {
|
---|
| 85 | public:
|
---|
[3731b4] | 86 | IntQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 87 | virtual ~IntQTQuery();
|
---|
[d3a5ea] | 88 | virtual bool handle();
|
---|
| 89 | private:
|
---|
| 90 | QBoxLayout *parent;
|
---|
| 91 | QBoxLayout *thisLayout;
|
---|
| 92 | QLabel *titleLabel;
|
---|
| 93 | QSpinBox *inputBox;
|
---|
| 94 |
|
---|
| 95 | IntQTQueryPipe *pipe;
|
---|
| 96 | };
|
---|
| 97 |
|
---|
[7cd6e7] | 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 |
|
---|
[b8d1aeb] | 115 | class DoubleQTQuery : public Dialog::DoubleQuery {
|
---|
| 116 | public:
|
---|
[3731b4] | 117 | DoubleQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 118 | virtual ~DoubleQTQuery();
|
---|
[b8d1aeb] | 119 | virtual bool handle();
|
---|
| 120 | private:
|
---|
| 121 | QBoxLayout *parent;
|
---|
| 122 | QBoxLayout *thisLayout;
|
---|
| 123 | QLabel *titleLabel;
|
---|
| 124 | QDoubleSpinBox *inputBox;
|
---|
| 125 |
|
---|
| 126 | DoubleQTQueryPipe *pipe;
|
---|
| 127 | };
|
---|
| 128 |
|
---|
[7cd6e7] | 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 |
|
---|
[d3a5ea] | 143 | class StringQTQuery : public Dialog::StringQuery {
|
---|
| 144 | public:
|
---|
[3731b4] | 145 | StringQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 146 | virtual ~StringQTQuery();
|
---|
[d3a5ea] | 147 | virtual bool handle();
|
---|
| 148 | private:
|
---|
| 149 | QBoxLayout *parent;
|
---|
| 150 | QBoxLayout *thisLayout;
|
---|
[cd8e55] | 151 | QLabel *titleLabel;
|
---|
| 152 | QLineEdit *inputBox;
|
---|
| 153 |
|
---|
| 154 | StringQTQueryPipe *pipe;
|
---|
| 155 | };
|
---|
| 156 |
|
---|
| 157 | class StringsQTQuery : public Dialog::StringsQuery {
|
---|
| 158 | public:
|
---|
[3731b4] | 159 | StringsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cd8e55] | 160 | virtual ~StringsQTQuery();
|
---|
| 161 | virtual bool handle();
|
---|
| 162 | private:
|
---|
| 163 | QBoxLayout *parent;
|
---|
[d3a5ea] | 164 | QBoxLayout *thisLayout;
|
---|
| 165 | QLabel *titleLabel;
|
---|
| 166 | QLineEdit *inputBox;
|
---|
| 167 |
|
---|
[7cd6e7] | 168 | QTQueryListPipe<std::string> *pipe;
|
---|
| 169 | };
|
---|
| 170 |
|
---|
[41167c] | 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 |
|
---|
[7cd6e7] | 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;
|
---|
[d3a5ea] | 211 | };
|
---|
| 212 |
|
---|
| 213 | class MoleculeQTQuery : public Dialog::MoleculeQuery {
|
---|
| 214 | public:
|
---|
[3731b4] | 215 | MoleculeQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
|
---|
[cbf01e] | 216 | virtual ~MoleculeQTQuery();
|
---|
[d3a5ea] | 217 | virtual bool handle();
|
---|
| 218 | private:
|
---|
| 219 | QBoxLayout *parent;
|
---|
| 220 | QBoxLayout *thisLayout;
|
---|
| 221 | QLabel *titleLabel;
|
---|
| 222 | QComboBox *inputBox;
|
---|
| 223 |
|
---|
| 224 | MoleculeQTQueryPipe *pipe;
|
---|
| 225 | };
|
---|
| 226 |
|
---|
[7cd6e7] | 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 |
|
---|
[b8d1aeb] | 241 | class VectorQTQuery : public Dialog::VectorQuery {
|
---|
| 242 | public:
|
---|
[3731b4] | 243 | VectorQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
|
---|
[cbf01e] | 244 | virtual ~VectorQTQuery();
|
---|
[b8d1aeb] | 245 | virtual bool handle();
|
---|
| 246 | private:
|
---|
| 247 | QBoxLayout *parent;
|
---|
| 248 | QBoxLayout *mainLayout;
|
---|
| 249 | QLabel *titleLabel;
|
---|
| 250 | QBoxLayout *subLayout;
|
---|
[7cd6e7] | 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;
|
---|
[b8d1aeb] | 271 |
|
---|
[7cd6e7] | 272 | VectorsQTQueryPipe *pipe;
|
---|
[b8d1aeb] | 273 | };
|
---|
| 274 |
|
---|
[9d457d] | 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 |
|
---|
[ee62e4] | 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 |
|
---|
[cbf01e] | 302 | class ElementQTQuery : public Dialog::ElementQuery {
|
---|
| 303 | public:
|
---|
[3731b4] | 304 | ElementQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
|
---|
[cbf01e] | 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 |
|
---|
[7cd6e7] | 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 |
|
---|
[6f5dfe] | 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;
|
---|
[f001ca] | 338 | QLabel *filenameLabel;
|
---|
[6f5dfe] | 339 | QLineEdit *filenameLineEdit;
|
---|
| 340 | QPushButton *filedialogButton;
|
---|
| 341 |
|
---|
| 342 | FileQTQueryPipe *pipe;
|
---|
| 343 | };
|
---|
| 344 |
|
---|
[d3a5ea] | 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 |
|
---|
[7cd6e7] | 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 |
|
---|
[d3a5ea] | 379 | class StringQTQueryPipe : public QWidget {
|
---|
| 380 | Q_OBJECT
|
---|
| 381 | public:
|
---|
| 382 | StringQTQueryPipe(std::string *_content, QTDialog *_dialog);
|
---|
[cbf01e] | 383 | virtual ~StringQTQueryPipe();
|
---|
[d3a5ea] | 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);
|
---|
[cbf01e] | 398 | virtual ~IntQTQueryPipe();
|
---|
[d3a5ea] | 399 |
|
---|
| 400 | public slots:
|
---|
| 401 | void update(int);
|
---|
| 402 |
|
---|
| 403 | private:
|
---|
| 404 | int *content;
|
---|
| 405 | QTDialog *dialog;
|
---|
| 406 |
|
---|
| 407 | };
|
---|
| 408 |
|
---|
[7cd6e7] | 409 |
|
---|
[b8d1aeb] | 410 | class DoubleQTQueryPipe : public QWidget {
|
---|
| 411 | Q_OBJECT
|
---|
| 412 | public:
|
---|
| 413 | DoubleQTQueryPipe(double *_content, QTDialog *_dialog);
|
---|
[cbf01e] | 414 | virtual ~DoubleQTQueryPipe();
|
---|
[b8d1aeb] | 415 |
|
---|
| 416 | public slots:
|
---|
| 417 | void update(double);
|
---|
| 418 |
|
---|
| 419 | private:
|
---|
| 420 | double *content;
|
---|
| 421 | QTDialog *dialog;
|
---|
| 422 |
|
---|
| 423 | };
|
---|
[d3a5ea] | 424 |
|
---|
[41167c] | 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 |
|
---|
[7cd6e7] | 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:
|
---|
[c96c66] | 463 | AtomsQTQueryPipe(std::vector<atom *>*_content, QTDialog *_dialog, QListWidget *_theList);
|
---|
[7cd6e7] | 464 | virtual ~AtomsQTQueryPipe();
|
---|
| 465 |
|
---|
| 466 | public slots:
|
---|
[c96c66] | 467 | void update();
|
---|
| 468 | void add();
|
---|
| 469 | void remove();
|
---|
[7cd6e7] | 470 |
|
---|
| 471 | private:
|
---|
| 472 | std::vector<atom *>*content;
|
---|
[c96c66] | 473 | std::map<int, atom *> lookup;
|
---|
| 474 | std::set<atom *> currentList;
|
---|
[7cd6e7] | 475 | QTDialog *dialog;
|
---|
[c96c66] | 476 | QListWidget *theList;
|
---|
[7cd6e7] | 477 |
|
---|
| 478 | };
|
---|
| 479 |
|
---|
[d3a5ea] | 480 | class MoleculeQTQueryPipe : public QWidget {
|
---|
| 481 | Q_OBJECT
|
---|
| 482 | public:
|
---|
[257c77] | 483 | MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[cbf01e] | 484 | virtual ~MoleculeQTQueryPipe();
|
---|
[d3a5ea] | 485 |
|
---|
| 486 | public slots:
|
---|
| 487 | void update(int);
|
---|
| 488 |
|
---|
| 489 | private:
|
---|
| 490 | molecule **content;
|
---|
| 491 | QTDialog *dialog;
|
---|
| 492 | QComboBox *theBox;
|
---|
| 493 |
|
---|
| 494 | };
|
---|
[cbf01e] | 495 |
|
---|
[7cd6e7] | 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 |
|
---|
[9d457d] | 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 |
|
---|
[ee62e4] | 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 |
|
---|
[cbf01e] | 571 | class ElementQTQueryPipe : public QWidget {
|
---|
| 572 | Q_OBJECT
|
---|
| 573 | public:
|
---|
[e5c0a1] | 574 | ElementQTQueryPipe(const element **_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[cbf01e] | 575 | virtual ~ElementQTQueryPipe();
|
---|
| 576 |
|
---|
| 577 | public slots:
|
---|
| 578 | void update(int);
|
---|
| 579 |
|
---|
| 580 | private:
|
---|
[e5c0a1] | 581 | const element **content;
|
---|
[7cd6e7] | 582 | QTDialog *dialog;
|
---|
| 583 | QComboBox *theBox;
|
---|
| 584 | };
|
---|
| 585 |
|
---|
| 586 | class ElementsQTQueryPipe : public QWidget {
|
---|
| 587 | Q_OBJECT
|
---|
| 588 | public:
|
---|
[e5c0a1] | 589 | ElementsQTQueryPipe(std::vector<const element *>*_content, QTDialog *_dialog, QComboBox *_theBox);
|
---|
[7cd6e7] | 590 | virtual ~ElementsQTQueryPipe();
|
---|
| 591 |
|
---|
| 592 | public slots:
|
---|
| 593 | void update(int);
|
---|
| 594 |
|
---|
| 595 | private:
|
---|
[e5c0a1] | 596 | std::vector<const element *>*content;
|
---|
[cbf01e] | 597 | QTDialog *dialog;
|
---|
| 598 | QComboBox *theBox;
|
---|
| 599 | };
|
---|
[6f5dfe] | 600 |
|
---|
| 601 | class FileQTQueryPipe : public QWidget {
|
---|
| 602 | Q_OBJECT
|
---|
| 603 | public:
|
---|
[f001ca] | 604 | FileQTQueryPipe(boost::filesystem::path *_content, QTDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
|
---|
[6f5dfe] | 605 | virtual ~FileQTQueryPipe();
|
---|
| 606 |
|
---|
| 607 | public slots:
|
---|
| 608 | void update();
|
---|
| 609 | void showFileDialog();
|
---|
| 610 |
|
---|
| 611 | private:
|
---|
[f001ca] | 612 | boost::filesystem::path *content;
|
---|
[6f5dfe] | 613 | QTDialog *dialog;
|
---|
| 614 | QLineEdit *filenameLineEdit;
|
---|
| 615 | QPushButton *filedialogButton;
|
---|
| 616 | QFileDialog *theFileDialog;
|
---|
| 617 | };
|
---|
| 618 |
|
---|
[d3a5ea] | 619 | #endif /* QTDIALOG_HPP_ */
|
---|