[308aa4] | 1 | /*
|
---|
| 2 | * QtQuery.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Nov 8, 2010
|
---|
| 5 | * Author: heber
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef QTQUERY_HPP_
|
---|
| 9 | #define QTQUERY_HPP_
|
---|
| 10 |
|
---|
[56f73b] | 11 | // include config.h
|
---|
| 12 | #ifdef HAVE_CONFIG_H
|
---|
| 13 | #include <config.h>
|
---|
| 14 | #endif
|
---|
| 15 |
|
---|
| 16 |
|
---|
[7c9921] | 17 | #include <Qt/qwidget.h>
|
---|
[308aa4] | 18 | #include "Qt4/QtDialog.hpp"
|
---|
[f10b0c] | 19 | #include "Parameters/Parameter.hpp"
|
---|
[7b8a8e] | 20 | #include "QtQueryList.hpp"
|
---|
[308aa4] | 21 |
|
---|
[0275ad] | 22 | class QHBoxLayout;
|
---|
[a5ddf0] | 23 | class QBoxLayout;
|
---|
| 24 | class QDialogButtonBox;
|
---|
| 25 | class QLabel;
|
---|
| 26 | class QSpinBox;
|
---|
| 27 | class QDoubleSpinBox;
|
---|
| 28 | class QLineEdit;
|
---|
| 29 | class QListWidget;
|
---|
[0275ad] | 30 | class QPushButton;
|
---|
[a5ddf0] | 31 | class QTableWidget;
|
---|
[0275ad] | 32 | class QTextEdit;
|
---|
[a5ddf0] | 33 | class QComboBox;
|
---|
[85b112] | 34 | class QCheckBox;
|
---|
[7c9921] | 35 | class QFileDialog;
|
---|
[a5ddf0] | 36 |
|
---|
[852ea3] | 37 | template<class T>
|
---|
| 38 | class QtQuery : public Dialog::TQuery<T>
|
---|
| 39 | {
|
---|
| 40 | public:
|
---|
| 41 | QtQuery(Parameter<T> &_param, std::string title, std::string _description = "") :
|
---|
| 42 | Dialog::TQuery<T>(_param, title, _description) {}
|
---|
| 43 | // QtQueries are interactive - no need for handle().
|
---|
| 44 | virtual bool handle(){ return true; }
|
---|
| 45 | };
|
---|
| 46 |
|
---|
| 47 | class QtDialog::AtomQtQuery : public QWidget, public QtQuery<const atom *> {
|
---|
[7c9921] | 48 | Q_OBJECT
|
---|
[308aa4] | 49 | public:
|
---|
[7dfd07] | 50 | AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 51 | virtual ~AtomQtQuery();
|
---|
[7c9921] | 52 |
|
---|
| 53 | public slots:
|
---|
| 54 | void onUpdate(int);
|
---|
| 55 |
|
---|
[308aa4] | 56 | private:
|
---|
| 57 | QBoxLayout *parent;
|
---|
| 58 | QBoxLayout *thisLayout;
|
---|
| 59 | QLabel *titleLabel;
|
---|
| 60 | QComboBox *inputBox;
|
---|
[7dfd07] | 61 | Dialog *dialog;
|
---|
[308aa4] | 62 | };
|
---|
| 63 |
|
---|
[852ea3] | 64 | class QtDialog::AtomsQtQuery : public QWidget, public QtQuery<std::vector<const atom *> >, public QtQueryList<const atom *> {
|
---|
[7c9921] | 65 | Q_OBJECT
|
---|
[308aa4] | 66 | public:
|
---|
[7dfd07] | 67 | AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 68 | virtual ~AtomsQtQuery();
|
---|
[7c9921] | 69 |
|
---|
[2f4e81] | 70 | virtual void onSubUpdate();
|
---|
| 71 |
|
---|
[7c9921] | 72 | public slots:
|
---|
[2f4e81] | 73 | void onAddElement();
|
---|
| 74 | void onRemoveElement();
|
---|
| 75 | void onElementSelected();
|
---|
[7c9921] | 76 |
|
---|
[308aa4] | 77 | private:
|
---|
[2f4e81] | 78 | AtomQtQuery *subQuery;
|
---|
[308aa4] | 79 | };
|
---|
| 80 |
|
---|
[852ea3] | 81 | class QtDialog::BooleanQtQuery : public QWidget, public QtQuery<bool> {
|
---|
[7c9921] | 82 | Q_OBJECT
|
---|
[308aa4] | 83 | public:
|
---|
[7dfd07] | 84 | BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
|
---|
[308aa4] | 85 | virtual ~BooleanQtQuery();
|
---|
[7c9921] | 86 |
|
---|
| 87 | public slots:
|
---|
| 88 | void onUpdate(int);
|
---|
| 89 |
|
---|
[308aa4] | 90 | private:
|
---|
| 91 | QBoxLayout *parent;
|
---|
| 92 | QBoxLayout *thisLayout;
|
---|
| 93 | QLabel *titleLabel;
|
---|
[85b112] | 94 | QCheckBox *booleanCheckBox;
|
---|
[7dfd07] | 95 | Dialog *dialog;
|
---|
[308aa4] | 96 | };
|
---|
| 97 |
|
---|
[852ea3] | 98 | class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public QtQuery<RealSpaceMatrix> {
|
---|
[7c9921] | 99 | Q_OBJECT
|
---|
[308aa4] | 100 | public:
|
---|
[7dfd07] | 101 | RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[7d9416] | 102 | virtual ~RealSpaceMatrixQtQuery();
|
---|
[7c9921] | 103 |
|
---|
| 104 | public slots:
|
---|
| 105 | void onUpdate(int, int);
|
---|
| 106 |
|
---|
[308aa4] | 107 | private:
|
---|
| 108 | QBoxLayout *parent;
|
---|
| 109 | QBoxLayout *thisLayout;
|
---|
| 110 | QLabel *titleLabel;
|
---|
| 111 | QTableWidget *inputTable;
|
---|
[7dfd07] | 112 | Dialog *dialog;
|
---|
[308aa4] | 113 | };
|
---|
| 114 |
|
---|
[852ea3] | 115 | class QtDialog::DoubleQtQuery : public QWidget, public QtQuery<double> {
|
---|
[7c9921] | 116 | Q_OBJECT
|
---|
[308aa4] | 117 | public:
|
---|
[7dfd07] | 118 | DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 119 | virtual ~DoubleQtQuery();
|
---|
[7c9921] | 120 |
|
---|
| 121 | public slots:
|
---|
| 122 | void onUpdate(double);
|
---|
| 123 |
|
---|
[308aa4] | 124 | private:
|
---|
| 125 | QBoxLayout *parent;
|
---|
| 126 | QBoxLayout *thisLayout;
|
---|
| 127 | QLabel *titleLabel;
|
---|
| 128 | QDoubleSpinBox *inputBox;
|
---|
[7dfd07] | 129 | Dialog *dialog;
|
---|
[308aa4] | 130 | };
|
---|
| 131 |
|
---|
[852ea3] | 132 | class QtDialog::DoublesQtQuery : public QWidget, public QtQuery<std::vector<double> >, public QtQueryList<double> {
|
---|
[7c9921] | 133 | Q_OBJECT
|
---|
[308aa4] | 134 | public:
|
---|
[7e8e79] | 135 | DoublesQtQuery(Parameter<std::vector<double> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 136 | virtual ~DoublesQtQuery();
|
---|
[7c9921] | 137 |
|
---|
[7e8e79] | 138 | virtual void onSubUpdate();
|
---|
| 139 |
|
---|
[7c9921] | 140 | public slots:
|
---|
[7e8e79] | 141 | void onAddElement();
|
---|
| 142 | void onRemoveElement();
|
---|
| 143 | void onElementSelected();
|
---|
[7c9921] | 144 |
|
---|
[308aa4] | 145 | private:
|
---|
[7e8e79] | 146 | DoubleQtQuery *subQuery;
|
---|
[308aa4] | 147 | };
|
---|
| 148 |
|
---|
[852ea3] | 149 | class QtDialog::ElementQtQuery : public QWidget, public QtQuery<const element *> {
|
---|
[7c9921] | 150 | Q_OBJECT
|
---|
[308aa4] | 151 | public:
|
---|
[7dfd07] | 152 | ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
|
---|
[308aa4] | 153 | virtual ~ElementQtQuery();
|
---|
[7c9921] | 154 |
|
---|
| 155 | public slots:
|
---|
| 156 | void onUpdate(int);
|
---|
| 157 |
|
---|
[308aa4] | 158 | private:
|
---|
| 159 | QBoxLayout *parent;
|
---|
| 160 | QBoxLayout *thisLayout;
|
---|
| 161 | QLabel *titleLabel;
|
---|
| 162 | QComboBox *inputBox;
|
---|
[7dfd07] | 163 | Dialog *dialog;
|
---|
[308aa4] | 164 | };
|
---|
| 165 |
|
---|
[852ea3] | 166 | class QtDialog::ElementsQtQuery : public QWidget, public QtQuery<std::vector<const element *> >, public QtQueryList<const element *> {
|
---|
[7c9921] | 167 | Q_OBJECT
|
---|
[308aa4] | 168 | public:
|
---|
[572701] | 169 | ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 170 | virtual ~ElementsQtQuery();
|
---|
[7c9921] | 171 |
|
---|
[572701] | 172 | virtual void onSubUpdate();
|
---|
| 173 |
|
---|
[7c9921] | 174 | public slots:
|
---|
[572701] | 175 | void onAddElement();
|
---|
| 176 | void onRemoveElement();
|
---|
| 177 | void onElementSelected();
|
---|
[7c9921] | 178 |
|
---|
[308aa4] | 179 | private:
|
---|
[572701] | 180 | ElementQtQuery *subQuery;
|
---|
[308aa4] | 181 | };
|
---|
| 182 |
|
---|
| 183 | class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery {
|
---|
| 184 | public:
|
---|
[7dfd07] | 185 | EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog);
|
---|
[308aa4] | 186 | virtual ~EmptyQtQuery();
|
---|
| 187 | virtual bool handle();
|
---|
| 188 | private:
|
---|
| 189 | QBoxLayout *parent;
|
---|
| 190 | QBoxLayout *thisLayout;
|
---|
| 191 | QLabel *titleLabel;
|
---|
[7dfd07] | 192 | Dialog *dialog;
|
---|
[308aa4] | 193 | };
|
---|
| 194 |
|
---|
[852ea3] | 195 | class QtDialog::FileQtQuery : public QWidget, public QtQuery<boost::filesystem::path> {
|
---|
[7c9921] | 196 | Q_OBJECT
|
---|
[308aa4] | 197 | public:
|
---|
[7dfd07] | 198 | FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
|
---|
[308aa4] | 199 | virtual ~FileQtQuery();
|
---|
[7c9921] | 200 |
|
---|
| 201 | public slots:
|
---|
| 202 | void onUpdate();
|
---|
| 203 | void showFileDialog();
|
---|
| 204 |
|
---|
[308aa4] | 205 | private:
|
---|
| 206 | QBoxLayout *parent;
|
---|
| 207 | QBoxLayout *thisLayout;
|
---|
| 208 | QLabel *filenameLabel;
|
---|
| 209 | QLineEdit *filenameLineEdit;
|
---|
| 210 | QPushButton *filedialogButton;
|
---|
[7c9921] | 211 | QFileDialog *theFileDialog;
|
---|
[7dfd07] | 212 | Dialog *dialog;
|
---|
[308aa4] | 213 | };
|
---|
| 214 |
|
---|
[852ea3] | 215 | class QtDialog::FilesQtQuery : public QWidget, public QtQuery<std::vector<boost::filesystem::path> >, public QtQueryList<boost::filesystem::path> {
|
---|
[7c9921] | 216 | Q_OBJECT
|
---|
[2c5765] | 217 | public:
|
---|
[324403] | 218 | FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[2c5765] | 219 | virtual ~FilesQtQuery();
|
---|
[324403] | 220 |
|
---|
| 221 | virtual void onSubUpdate();
|
---|
[7c9921] | 222 |
|
---|
| 223 | public slots:
|
---|
[324403] | 224 | void onAddElement();
|
---|
| 225 | void onRemoveElement();
|
---|
| 226 | void onElementSelected();
|
---|
[7c9921] | 227 |
|
---|
[2c5765] | 228 | private:
|
---|
[324403] | 229 | FileQtQuery *subQuery;
|
---|
[2c5765] | 230 | };
|
---|
| 231 |
|
---|
[852ea3] | 232 | class QtDialog::IntQtQuery : public QWidget, public QtQuery<int> {
|
---|
[7c9921] | 233 | Q_OBJECT
|
---|
[308aa4] | 234 | public:
|
---|
[7dfd07] | 235 | IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 236 | virtual ~IntQtQuery();
|
---|
[7c9921] | 237 |
|
---|
| 238 | public slots:
|
---|
| 239 | void onUpdate(int);
|
---|
| 240 |
|
---|
[308aa4] | 241 | private:
|
---|
| 242 | QBoxLayout *parent;
|
---|
| 243 | QBoxLayout *thisLayout;
|
---|
| 244 | QLabel *titleLabel;
|
---|
| 245 | QSpinBox *inputBox;
|
---|
[7dfd07] | 246 | Dialog *dialog;
|
---|
[308aa4] | 247 | };
|
---|
| 248 |
|
---|
[852ea3] | 249 | class QtDialog::IntsQtQuery : public QWidget, public QtQuery<std::vector<int> >, public QtQueryList<int> {
|
---|
[7c9921] | 250 | Q_OBJECT
|
---|
[308aa4] | 251 | public:
|
---|
[26ac2d] | 252 | IntsQtQuery(Parameter<std::vector<int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 253 | virtual ~IntsQtQuery();
|
---|
[26ac2d] | 254 |
|
---|
| 255 | virtual void onSubUpdate();
|
---|
[7c9921] | 256 |
|
---|
| 257 | public slots:
|
---|
[26ac2d] | 258 | void onAddElement();
|
---|
| 259 | void onRemoveElement();
|
---|
| 260 | void onElementSelected();
|
---|
[7c9921] | 261 |
|
---|
[308aa4] | 262 | private:
|
---|
[26ac2d] | 263 | IntQtQuery *subQuery;
|
---|
[308aa4] | 264 | };
|
---|
| 265 |
|
---|
[852ea3] | 266 | class QtDialog::MoleculeQtQuery : public QWidget, public QtQuery<const molecule *> {
|
---|
[7c9921] | 267 | Q_OBJECT
|
---|
[308aa4] | 268 | public:
|
---|
[7dfd07] | 269 | MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 270 | virtual ~MoleculeQtQuery();
|
---|
[7c9921] | 271 |
|
---|
| 272 | public slots:
|
---|
| 273 | void onUpdate(int);
|
---|
| 274 |
|
---|
[308aa4] | 275 | private:
|
---|
| 276 | QBoxLayout *parent;
|
---|
| 277 | QBoxLayout *thisLayout;
|
---|
| 278 | QLabel *titleLabel;
|
---|
| 279 | QComboBox *inputBox;
|
---|
[7dfd07] | 280 | Dialog *dialog;
|
---|
[308aa4] | 281 | };
|
---|
| 282 |
|
---|
[852ea3] | 283 | class QtDialog::MoleculesQtQuery : public QWidget, public QtQuery<std::vector<const molecule *> >, public QtQueryList<const molecule *> {
|
---|
[7c9921] | 284 | Q_OBJECT
|
---|
[308aa4] | 285 | public:
|
---|
[7dfd07] | 286 | MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 287 | virtual ~MoleculesQtQuery();
|
---|
[7c9921] | 288 |
|
---|
[1ae820] | 289 | virtual void onSubUpdate();
|
---|
| 290 |
|
---|
[7c9921] | 291 | public slots:
|
---|
[1ae820] | 292 | void onAddElement();
|
---|
| 293 | void onRemoveElement();
|
---|
| 294 | void onElementSelected();
|
---|
[7c9921] | 295 |
|
---|
[308aa4] | 296 | private:
|
---|
[1ae820] | 297 | MoleculeQtQuery *subQuery;
|
---|
[308aa4] | 298 | };
|
---|
| 299 |
|
---|
[852ea3] | 300 | class QtDialog::StringQtQuery : public QWidget, public QtQuery<std::string> {
|
---|
[7c9921] | 301 | Q_OBJECT
|
---|
[308aa4] | 302 | public:
|
---|
[7dfd07] | 303 | StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 304 | virtual ~StringQtQuery();
|
---|
[7c9921] | 305 |
|
---|
| 306 | public slots:
|
---|
| 307 | void onUpdate(const QString&);
|
---|
[dbf6c7] | 308 | void onUpdateCombo(int index);
|
---|
[7c9921] | 309 |
|
---|
[308aa4] | 310 | private:
|
---|
| 311 | QBoxLayout *parent;
|
---|
| 312 | QBoxLayout *thisLayout;
|
---|
| 313 | QLabel *titleLabel;
|
---|
| 314 | QLineEdit *inputBox;
|
---|
[dbf6c7] | 315 | QComboBox *comboBox;
|
---|
[7dfd07] | 316 | Dialog *dialog;
|
---|
[308aa4] | 317 | };
|
---|
| 318 |
|
---|
[852ea3] | 319 | class QtDialog::StringsQtQuery : public QWidget, public QtQuery<std::vector<std::string> >, public QtQueryList<std::string> {
|
---|
[7c9921] | 320 | Q_OBJECT
|
---|
[308aa4] | 321 | public:
|
---|
[7dfd07] | 322 | StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 323 | virtual ~StringsQtQuery();
|
---|
[7c9921] | 324 |
|
---|
[7b8a8e] | 325 | virtual void onSubUpdate();
|
---|
| 326 |
|
---|
[7c9921] | 327 | public slots:
|
---|
[7b8a8e] | 328 | void onAddElement();
|
---|
| 329 | void onRemoveElement();
|
---|
| 330 | void onElementSelected();
|
---|
[7c9921] | 331 |
|
---|
[308aa4] | 332 | private:
|
---|
[7b8a8e] | 333 | StringQtQuery *subQuery;
|
---|
[308aa4] | 334 | };
|
---|
| 335 |
|
---|
[852ea3] | 336 | class QtDialog::UnsignedIntQtQuery : public QWidget, public QtQuery<unsigned int> {
|
---|
[7c9921] | 337 | Q_OBJECT
|
---|
[838cd0] | 338 | public:
|
---|
[7dfd07] | 339 | UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
|
---|
[838cd0] | 340 | virtual ~UnsignedIntQtQuery();
|
---|
[7c9921] | 341 |
|
---|
| 342 | public slots:
|
---|
[a2aa2f] | 343 | void onUpdate(int);
|
---|
[7c9921] | 344 |
|
---|
[838cd0] | 345 | private:
|
---|
| 346 | QBoxLayout *parent;
|
---|
| 347 | QBoxLayout *thisLayout;
|
---|
| 348 | QLabel *titleLabel;
|
---|
| 349 | QSpinBox *inputBox;
|
---|
[7dfd07] | 350 | Dialog *dialog;
|
---|
[838cd0] | 351 | };
|
---|
| 352 |
|
---|
[852ea3] | 353 | class QtDialog::UnsignedIntsQtQuery : public QWidget, public QtQuery<std::vector<unsigned int> >, public QtQueryList<unsigned int> {
|
---|
[7c9921] | 354 | Q_OBJECT
|
---|
[12948c] | 355 | public:
|
---|
[a2aa2f] | 356 | UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[12948c] | 357 | virtual ~UnsignedIntsQtQuery();
|
---|
[a2aa2f] | 358 |
|
---|
| 359 | virtual void onSubUpdate();
|
---|
[7c9921] | 360 |
|
---|
| 361 | public slots:
|
---|
[a2aa2f] | 362 | void onAddElement();
|
---|
| 363 | void onRemoveElement();
|
---|
| 364 | void onElementSelected();
|
---|
[7c9921] | 365 |
|
---|
[12948c] | 366 | private:
|
---|
[a2aa2f] | 367 | UnsignedIntQtQuery *subQuery;
|
---|
[12948c] | 368 | };
|
---|
| 369 |
|
---|
[852ea3] | 370 | class QtDialog::VectorQtQuery : public QWidget, public QtQuery<Vector> {
|
---|
[7c9921] | 371 | Q_OBJECT
|
---|
[308aa4] | 372 | public:
|
---|
[7dfd07] | 373 | VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
|
---|
[308aa4] | 374 | virtual ~VectorQtQuery();
|
---|
[7c9921] | 375 |
|
---|
| 376 | public slots:
|
---|
| 377 | void onUpdateX(double);
|
---|
| 378 | void onUpdateY(double);
|
---|
| 379 | void onUpdateZ(double);
|
---|
| 380 |
|
---|
[308aa4] | 381 | private:
|
---|
| 382 | QBoxLayout *parent;
|
---|
| 383 | QBoxLayout *mainLayout;
|
---|
| 384 | QLabel *titleLabel;
|
---|
| 385 | QBoxLayout *subLayout;
|
---|
| 386 | QBoxLayout *coordLayout;
|
---|
| 387 | QLabel *coordLabel;
|
---|
[a14fe3] | 388 | QDoubleSpinBox *coordInputX;
|
---|
| 389 | QDoubleSpinBox *coordInputY;
|
---|
| 390 | QDoubleSpinBox *coordInputZ;
|
---|
[7dfd07] | 391 | Dialog *dialog;
|
---|
[308aa4] | 392 | };
|
---|
| 393 |
|
---|
[852ea3] | 394 | class QtDialog::VectorsQtQuery : public QWidget, public QtQuery<std::vector<Vector> >, public QtQueryList<Vector> {
|
---|
[7c9921] | 395 | Q_OBJECT
|
---|
[308aa4] | 396 | public:
|
---|
[f84992] | 397 | VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 398 | virtual ~VectorsQtQuery();
|
---|
[7c9921] | 399 |
|
---|
[f84992] | 400 | virtual void onSubUpdate();
|
---|
| 401 |
|
---|
[7c9921] | 402 | public slots:
|
---|
[f84992] | 403 | void onAddElement();
|
---|
| 404 | void onRemoveElement();
|
---|
| 405 | void onElementSelected();
|
---|
[7c9921] | 406 |
|
---|
[308aa4] | 407 | private:
|
---|
[f84992] | 408 | VectorQtQuery *subQuery;
|
---|
[308aa4] | 409 | };
|
---|
| 410 |
|
---|
[852ea3] | 411 | class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public QtQuery<RandomNumberDistribution_Parameters> {
|
---|
[7c9921] | 412 | Q_OBJECT
|
---|
[0275ad] | 413 | public:
|
---|
[7dfd07] | 414 | RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
|
---|
[0275ad] | 415 | virtual ~RandomNumberDistribution_ParametersQtQuery();
|
---|
[7c9921] | 416 |
|
---|
| 417 | public slots:
|
---|
| 418 | void onUpdate();
|
---|
| 419 |
|
---|
[0275ad] | 420 | private:
|
---|
| 421 | QBoxLayout *parent;
|
---|
| 422 | QHBoxLayout *thisLayout;
|
---|
| 423 | QLabel *titleLabel;
|
---|
| 424 | QTextEdit *inputBox;
|
---|
| 425 | QPushButton *okButton;
|
---|
[7dfd07] | 426 | Dialog *dialog;
|
---|
[0275ad] | 427 | };
|
---|
| 428 |
|
---|
[308aa4] | 429 | #endif /* QTQUERY_HPP_ */
|
---|