| [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&);
 | 
|---|
 | 308 | 
 | 
|---|
| [308aa4] | 309 | private:
 | 
|---|
 | 310 |   QBoxLayout *parent;
 | 
|---|
 | 311 |   QBoxLayout *thisLayout;
 | 
|---|
 | 312 |   QLabel *titleLabel;
 | 
|---|
 | 313 |   QLineEdit *inputBox;
 | 
|---|
| [7dfd07] | 314 |   Dialog *dialog;
 | 
|---|
| [308aa4] | 315 | };
 | 
|---|
 | 316 | 
 | 
|---|
| [852ea3] | 317 | class QtDialog::StringsQtQuery : public QWidget, public QtQuery<std::vector<std::string> >, public QtQueryList<std::string> {
 | 
|---|
| [7c9921] | 318 |   Q_OBJECT
 | 
|---|
| [308aa4] | 319 | public:
 | 
|---|
| [7dfd07] | 320 |   StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
 | 
|---|
| [308aa4] | 321 |   virtual ~StringsQtQuery();
 | 
|---|
| [7c9921] | 322 | 
 | 
|---|
| [7b8a8e] | 323 |   virtual void onSubUpdate();
 | 
|---|
 | 324 | 
 | 
|---|
| [7c9921] | 325 | public slots:
 | 
|---|
| [7b8a8e] | 326 |   void onAddElement();
 | 
|---|
 | 327 |   void onRemoveElement();
 | 
|---|
 | 328 |   void onElementSelected();
 | 
|---|
| [7c9921] | 329 | 
 | 
|---|
| [308aa4] | 330 | private:
 | 
|---|
| [7b8a8e] | 331 |   StringQtQuery *subQuery;
 | 
|---|
| [308aa4] | 332 | };
 | 
|---|
 | 333 | 
 | 
|---|
| [852ea3] | 334 | class QtDialog::UnsignedIntQtQuery : public QWidget, public QtQuery<unsigned int> {
 | 
|---|
| [7c9921] | 335 |   Q_OBJECT
 | 
|---|
| [838cd0] | 336 | public:
 | 
|---|
| [7dfd07] | 337 |   UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
 | 
|---|
| [838cd0] | 338 |   virtual ~UnsignedIntQtQuery();
 | 
|---|
| [7c9921] | 339 | 
 | 
|---|
 | 340 | public slots:
 | 
|---|
| [a2aa2f] | 341 |   void onUpdate(int);
 | 
|---|
| [7c9921] | 342 | 
 | 
|---|
| [838cd0] | 343 | private:
 | 
|---|
 | 344 |   QBoxLayout *parent;
 | 
|---|
 | 345 |   QBoxLayout *thisLayout;
 | 
|---|
 | 346 |   QLabel *titleLabel;
 | 
|---|
 | 347 |   QSpinBox *inputBox;
 | 
|---|
| [7dfd07] | 348 |   Dialog *dialog;
 | 
|---|
| [838cd0] | 349 | };
 | 
|---|
 | 350 | 
 | 
|---|
| [852ea3] | 351 | class QtDialog::UnsignedIntsQtQuery : public QWidget, public QtQuery<std::vector<unsigned int> >, public QtQueryList<unsigned int> {
 | 
|---|
| [7c9921] | 352 |   Q_OBJECT
 | 
|---|
| [12948c] | 353 | public:
 | 
|---|
| [a2aa2f] | 354 |   UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
 | 
|---|
| [12948c] | 355 |   virtual ~UnsignedIntsQtQuery();
 | 
|---|
| [a2aa2f] | 356 | 
 | 
|---|
 | 357 |   virtual void onSubUpdate();
 | 
|---|
| [7c9921] | 358 | 
 | 
|---|
 | 359 | public slots:
 | 
|---|
| [a2aa2f] | 360 |   void onAddElement();
 | 
|---|
 | 361 |   void onRemoveElement();
 | 
|---|
 | 362 |   void onElementSelected();
 | 
|---|
| [7c9921] | 363 | 
 | 
|---|
| [12948c] | 364 | private:
 | 
|---|
| [a2aa2f] | 365 |   UnsignedIntQtQuery *subQuery;
 | 
|---|
| [12948c] | 366 | };
 | 
|---|
 | 367 | 
 | 
|---|
| [852ea3] | 368 | class QtDialog::VectorQtQuery : public QWidget, public QtQuery<Vector> {
 | 
|---|
| [7c9921] | 369 |   Q_OBJECT
 | 
|---|
| [308aa4] | 370 | public:
 | 
|---|
| [7dfd07] | 371 |   VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
 | 
|---|
| [308aa4] | 372 |   virtual ~VectorQtQuery();
 | 
|---|
| [7c9921] | 373 | 
 | 
|---|
 | 374 | public slots:
 | 
|---|
 | 375 |   void onUpdateX(double);
 | 
|---|
 | 376 |   void onUpdateY(double);
 | 
|---|
 | 377 |   void onUpdateZ(double);
 | 
|---|
 | 378 | 
 | 
|---|
| [308aa4] | 379 | private:
 | 
|---|
 | 380 |   QBoxLayout *parent;
 | 
|---|
 | 381 |   QBoxLayout *mainLayout;
 | 
|---|
 | 382 |   QLabel *titleLabel;
 | 
|---|
 | 383 |   QBoxLayout *subLayout;
 | 
|---|
 | 384 |   QBoxLayout *coordLayout;
 | 
|---|
 | 385 |   QLabel *coordLabel;
 | 
|---|
| [a14fe3] | 386 |   QDoubleSpinBox *coordInputX;
 | 
|---|
 | 387 |   QDoubleSpinBox *coordInputY;
 | 
|---|
 | 388 |   QDoubleSpinBox *coordInputZ;
 | 
|---|
| [7dfd07] | 389 |   Dialog *dialog;
 | 
|---|
| [308aa4] | 390 | };
 | 
|---|
 | 391 | 
 | 
|---|
| [852ea3] | 392 | class QtDialog::VectorsQtQuery : public QWidget, public QtQuery<std::vector<Vector> >, public QtQueryList<Vector> {
 | 
|---|
| [7c9921] | 393 |   Q_OBJECT
 | 
|---|
| [308aa4] | 394 | public:
 | 
|---|
| [f84992] | 395 |   VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
 | 
|---|
| [308aa4] | 396 |   virtual ~VectorsQtQuery();
 | 
|---|
| [7c9921] | 397 | 
 | 
|---|
| [f84992] | 398 |   virtual void onSubUpdate();
 | 
|---|
 | 399 | 
 | 
|---|
| [7c9921] | 400 | public slots:
 | 
|---|
| [f84992] | 401 |   void onAddElement();
 | 
|---|
 | 402 |   void onRemoveElement();
 | 
|---|
 | 403 |   void onElementSelected();
 | 
|---|
| [7c9921] | 404 | 
 | 
|---|
| [308aa4] | 405 | private:
 | 
|---|
| [f84992] | 406 |   VectorQtQuery *subQuery;
 | 
|---|
| [308aa4] | 407 | };
 | 
|---|
 | 408 | 
 | 
|---|
| [852ea3] | 409 | class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public QtQuery<RandomNumberDistribution_Parameters> {
 | 
|---|
| [7c9921] | 410 |   Q_OBJECT
 | 
|---|
| [0275ad] | 411 | public:
 | 
|---|
| [7dfd07] | 412 |   RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
 | 
|---|
| [0275ad] | 413 |   virtual ~RandomNumberDistribution_ParametersQtQuery();
 | 
|---|
| [7c9921] | 414 | 
 | 
|---|
 | 415 | public slots:
 | 
|---|
 | 416 |   void onUpdate();
 | 
|---|
 | 417 | 
 | 
|---|
| [0275ad] | 418 | private:
 | 
|---|
 | 419 |   QBoxLayout *parent;
 | 
|---|
 | 420 |   QHBoxLayout *thisLayout;
 | 
|---|
 | 421 |   QLabel *titleLabel;
 | 
|---|
 | 422 |   QTextEdit *inputBox;
 | 
|---|
 | 423 |   QPushButton *okButton;
 | 
|---|
| [7dfd07] | 424 |   Dialog *dialog;
 | 
|---|
| [0275ad] | 425 | };
 | 
|---|
 | 426 | 
 | 
|---|
| [308aa4] | 427 | #endif /* QTQUERY_HPP_ */
 | 
|---|