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