[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:
|
---|
[f130d4] | 41 | QtQuery(Parameter<T> &_param, const std::string &_title, const std::string &_description = "") :
|
---|
| 42 | Dialog::TQuery<T>(_param, _title, _description) {}
|
---|
[852ea3] | 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:
|
---|
[f130d4] | 50 | AtomQtQuery(Parameter<const atom *> &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 67 | AtomsQtQuery(Parameter<std::vector<const atom *> > &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 84 | BooleanQtQuery(Parameter<bool> &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 101 | RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 118 | DoubleQtQuery(Parameter<double> &, const std::string &_title, const std::string &_description,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:
|
---|
[f130d4] | 135 | DoublesQtQuery(Parameter<std::vector<double> > &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 152 | ElementQtQuery(Parameter<const element *> &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 169 | ElementsQtQuery(Parameter<std::vector<const element *> > &, const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 185 | EmptyQtQuery(const std::string &_title, const std::string &description, 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:
|
---|
[f130d4] | 198 | FileQtQuery(Parameter<boost::filesystem::path> &, const std::string &_title, const std::string &description, 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;
|
---|
[dae158] | 213 | std::vector<std::string> suffixes;
|
---|
| 214 | bool mustBePresent;
|
---|
[308aa4] | 215 | };
|
---|
| 216 |
|
---|
[852ea3] | 217 | class QtDialog::FilesQtQuery : public QWidget, public QtQuery<std::vector<boost::filesystem::path> >, public QtQueryList<boost::filesystem::path> {
|
---|
[7c9921] | 218 | Q_OBJECT
|
---|
[2c5765] | 219 | public:
|
---|
[f130d4] | 220 | FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[2c5765] | 221 | virtual ~FilesQtQuery();
|
---|
[324403] | 222 |
|
---|
| 223 | virtual void onSubUpdate();
|
---|
[7c9921] | 224 |
|
---|
| 225 | public slots:
|
---|
[324403] | 226 | void onAddElement();
|
---|
| 227 | void onRemoveElement();
|
---|
| 228 | void onElementSelected();
|
---|
[7c9921] | 229 |
|
---|
[2c5765] | 230 | private:
|
---|
[324403] | 231 | FileQtQuery *subQuery;
|
---|
[2c5765] | 232 | };
|
---|
| 233 |
|
---|
[852ea3] | 234 | class QtDialog::IntQtQuery : public QWidget, public QtQuery<int> {
|
---|
[7c9921] | 235 | Q_OBJECT
|
---|
[308aa4] | 236 | public:
|
---|
[f130d4] | 237 | IntQtQuery(Parameter<int> &, const std::string &_title, const std::string &description,QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 238 | virtual ~IntQtQuery();
|
---|
[7c9921] | 239 |
|
---|
| 240 | public slots:
|
---|
| 241 | void onUpdate(int);
|
---|
| 242 |
|
---|
[308aa4] | 243 | private:
|
---|
| 244 | QBoxLayout *parent;
|
---|
| 245 | QBoxLayout *thisLayout;
|
---|
| 246 | QLabel *titleLabel;
|
---|
| 247 | QSpinBox *inputBox;
|
---|
[7dfd07] | 248 | Dialog *dialog;
|
---|
[308aa4] | 249 | };
|
---|
| 250 |
|
---|
[852ea3] | 251 | class QtDialog::IntsQtQuery : public QWidget, public QtQuery<std::vector<int> >, public QtQueryList<int> {
|
---|
[7c9921] | 252 | Q_OBJECT
|
---|
[308aa4] | 253 | public:
|
---|
[f130d4] | 254 | IntsQtQuery(Parameter<std::vector<int> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 255 | virtual ~IntsQtQuery();
|
---|
[26ac2d] | 256 |
|
---|
| 257 | virtual void onSubUpdate();
|
---|
[7c9921] | 258 |
|
---|
| 259 | public slots:
|
---|
[26ac2d] | 260 | void onAddElement();
|
---|
| 261 | void onRemoveElement();
|
---|
| 262 | void onElementSelected();
|
---|
[7c9921] | 263 |
|
---|
[308aa4] | 264 | private:
|
---|
[26ac2d] | 265 | IntQtQuery *subQuery;
|
---|
[308aa4] | 266 | };
|
---|
| 267 |
|
---|
[852ea3] | 268 | class QtDialog::MoleculeQtQuery : public QWidget, public QtQuery<const molecule *> {
|
---|
[7c9921] | 269 | Q_OBJECT
|
---|
[308aa4] | 270 | public:
|
---|
[f130d4] | 271 | MoleculeQtQuery(Parameter<const molecule *> &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 272 | virtual ~MoleculeQtQuery();
|
---|
[7c9921] | 273 |
|
---|
| 274 | public slots:
|
---|
| 275 | void onUpdate(int);
|
---|
| 276 |
|
---|
[308aa4] | 277 | private:
|
---|
| 278 | QBoxLayout *parent;
|
---|
| 279 | QBoxLayout *thisLayout;
|
---|
| 280 | QLabel *titleLabel;
|
---|
| 281 | QComboBox *inputBox;
|
---|
[7dfd07] | 282 | Dialog *dialog;
|
---|
[308aa4] | 283 | };
|
---|
| 284 |
|
---|
[852ea3] | 285 | class QtDialog::MoleculesQtQuery : public QWidget, public QtQuery<std::vector<const molecule *> >, public QtQueryList<const molecule *> {
|
---|
[7c9921] | 286 | Q_OBJECT
|
---|
[308aa4] | 287 | public:
|
---|
[f130d4] | 288 | MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 289 | virtual ~MoleculesQtQuery();
|
---|
[7c9921] | 290 |
|
---|
[1ae820] | 291 | virtual void onSubUpdate();
|
---|
| 292 |
|
---|
[7c9921] | 293 | public slots:
|
---|
[1ae820] | 294 | void onAddElement();
|
---|
| 295 | void onRemoveElement();
|
---|
| 296 | void onElementSelected();
|
---|
[7c9921] | 297 |
|
---|
[308aa4] | 298 | private:
|
---|
[1ae820] | 299 | MoleculeQtQuery *subQuery;
|
---|
[308aa4] | 300 | };
|
---|
| 301 |
|
---|
[852ea3] | 302 | class QtDialog::StringQtQuery : public QWidget, public QtQuery<std::string> {
|
---|
[7c9921] | 303 | Q_OBJECT
|
---|
[308aa4] | 304 | public:
|
---|
[f130d4] | 305 | StringQtQuery(Parameter<std::string> &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 306 | virtual ~StringQtQuery();
|
---|
[7c9921] | 307 |
|
---|
| 308 | public slots:
|
---|
| 309 | void onUpdate(const QString&);
|
---|
[dbf6c7] | 310 | void onUpdateCombo(int index);
|
---|
[7c9921] | 311 |
|
---|
[308aa4] | 312 | private:
|
---|
| 313 | QBoxLayout *parent;
|
---|
| 314 | QBoxLayout *thisLayout;
|
---|
| 315 | QLabel *titleLabel;
|
---|
| 316 | QLineEdit *inputBox;
|
---|
[dbf6c7] | 317 | QComboBox *comboBox;
|
---|
[7dfd07] | 318 | Dialog *dialog;
|
---|
[308aa4] | 319 | };
|
---|
| 320 |
|
---|
[852ea3] | 321 | class QtDialog::StringsQtQuery : public QWidget, public QtQuery<std::vector<std::string> >, public QtQueryList<std::string> {
|
---|
[7c9921] | 322 | Q_OBJECT
|
---|
[308aa4] | 323 | public:
|
---|
[f130d4] | 324 | StringsQtQuery(Parameter<std::vector<std::string> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 325 | virtual ~StringsQtQuery();
|
---|
[7c9921] | 326 |
|
---|
[7b8a8e] | 327 | virtual void onSubUpdate();
|
---|
| 328 |
|
---|
[7c9921] | 329 | public slots:
|
---|
[7b8a8e] | 330 | void onAddElement();
|
---|
| 331 | void onRemoveElement();
|
---|
| 332 | void onElementSelected();
|
---|
[7c9921] | 333 |
|
---|
[308aa4] | 334 | private:
|
---|
[7b8a8e] | 335 | StringQtQuery *subQuery;
|
---|
[308aa4] | 336 | };
|
---|
| 337 |
|
---|
[852ea3] | 338 | class QtDialog::UnsignedIntQtQuery : public QWidget, public QtQuery<unsigned int> {
|
---|
[7c9921] | 339 | Q_OBJECT
|
---|
[838cd0] | 340 | public:
|
---|
[f130d4] | 341 | UnsignedIntQtQuery(Parameter<unsigned int> &, const std::string &_title, const std::string &description,QBoxLayout *_parent,Dialog *_dialog);
|
---|
[838cd0] | 342 | virtual ~UnsignedIntQtQuery();
|
---|
[7c9921] | 343 |
|
---|
| 344 | public slots:
|
---|
[a2aa2f] | 345 | void onUpdate(int);
|
---|
[7c9921] | 346 |
|
---|
[838cd0] | 347 | private:
|
---|
| 348 | QBoxLayout *parent;
|
---|
| 349 | QBoxLayout *thisLayout;
|
---|
| 350 | QLabel *titleLabel;
|
---|
| 351 | QSpinBox *inputBox;
|
---|
[7dfd07] | 352 | Dialog *dialog;
|
---|
[838cd0] | 353 | };
|
---|
| 354 |
|
---|
[852ea3] | 355 | class QtDialog::UnsignedIntsQtQuery : public QWidget, public QtQuery<std::vector<unsigned int> >, public QtQueryList<unsigned int> {
|
---|
[7c9921] | 356 | Q_OBJECT
|
---|
[12948c] | 357 | public:
|
---|
[f130d4] | 358 | UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[12948c] | 359 | virtual ~UnsignedIntsQtQuery();
|
---|
[a2aa2f] | 360 |
|
---|
| 361 | virtual void onSubUpdate();
|
---|
[7c9921] | 362 |
|
---|
| 363 | public slots:
|
---|
[a2aa2f] | 364 | void onAddElement();
|
---|
| 365 | void onRemoveElement();
|
---|
| 366 | void onElementSelected();
|
---|
[7c9921] | 367 |
|
---|
[12948c] | 368 | private:
|
---|
[a2aa2f] | 369 | UnsignedIntQtQuery *subQuery;
|
---|
[12948c] | 370 | };
|
---|
| 371 |
|
---|
[852ea3] | 372 | class QtDialog::VectorQtQuery : public QWidget, public QtQuery<Vector> {
|
---|
[7c9921] | 373 | Q_OBJECT
|
---|
[308aa4] | 374 | public:
|
---|
[f130d4] | 375 | VectorQtQuery(Parameter<Vector> &, const std::string &_title, const std::string &_description,QBoxLayout *,Dialog *);
|
---|
[308aa4] | 376 | virtual ~VectorQtQuery();
|
---|
[7c9921] | 377 |
|
---|
| 378 | public slots:
|
---|
| 379 | void onUpdateX(double);
|
---|
| 380 | void onUpdateY(double);
|
---|
| 381 | void onUpdateZ(double);
|
---|
| 382 |
|
---|
[308aa4] | 383 | private:
|
---|
| 384 | QBoxLayout *parent;
|
---|
| 385 | QBoxLayout *mainLayout;
|
---|
| 386 | QLabel *titleLabel;
|
---|
| 387 | QBoxLayout *subLayout;
|
---|
| 388 | QBoxLayout *coordLayout;
|
---|
| 389 | QLabel *coordLabel;
|
---|
[a14fe3] | 390 | QDoubleSpinBox *coordInputX;
|
---|
| 391 | QDoubleSpinBox *coordInputY;
|
---|
| 392 | QDoubleSpinBox *coordInputZ;
|
---|
[7dfd07] | 393 | Dialog *dialog;
|
---|
[308aa4] | 394 | };
|
---|
| 395 |
|
---|
[852ea3] | 396 | class QtDialog::VectorsQtQuery : public QWidget, public QtQuery<std::vector<Vector> >, public QtQueryList<Vector> {
|
---|
[7c9921] | 397 | Q_OBJECT
|
---|
[308aa4] | 398 | public:
|
---|
[f130d4] | 399 | VectorsQtQuery(Parameter<std::vector<Vector> > &, const std::string &_title, const std::string &description, QBoxLayout *_parent,Dialog *_dialog);
|
---|
[308aa4] | 400 | virtual ~VectorsQtQuery();
|
---|
[7c9921] | 401 |
|
---|
[f84992] | 402 | virtual void onSubUpdate();
|
---|
| 403 |
|
---|
[7c9921] | 404 | public slots:
|
---|
[f84992] | 405 | void onAddElement();
|
---|
| 406 | void onRemoveElement();
|
---|
| 407 | void onElementSelected();
|
---|
[7c9921] | 408 |
|
---|
[308aa4] | 409 | private:
|
---|
[f84992] | 410 | VectorQtQuery *subQuery;
|
---|
[308aa4] | 411 | };
|
---|
| 412 |
|
---|
[852ea3] | 413 | class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public QtQuery<RandomNumberDistribution_Parameters> {
|
---|
[7c9921] | 414 | Q_OBJECT
|
---|
[0275ad] | 415 | public:
|
---|
[f130d4] | 416 | RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, const std::string &_title, const std::string &_description,QBoxLayout *,Dialog *);
|
---|
[0275ad] | 417 | virtual ~RandomNumberDistribution_ParametersQtQuery();
|
---|
[7c9921] | 418 |
|
---|
| 419 | public slots:
|
---|
| 420 | void onUpdate();
|
---|
| 421 |
|
---|
[0275ad] | 422 | private:
|
---|
| 423 | QBoxLayout *parent;
|
---|
| 424 | QHBoxLayout *thisLayout;
|
---|
| 425 | QLabel *titleLabel;
|
---|
| 426 | QTextEdit *inputBox;
|
---|
| 427 | QPushButton *okButton;
|
---|
[7dfd07] | 428 | Dialog *dialog;
|
---|
[0275ad] | 429 | };
|
---|
| 430 |
|
---|
[308aa4] | 431 | #endif /* QTQUERY_HPP_ */
|
---|