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