/* * QtQuery.hpp * * Created on: Nov 8, 2010 * Author: heber */ #ifndef QTQUERY_HPP_ #define QTQUERY_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "Qt4/QtDialog.hpp" class QHBoxLayout; class QBoxLayout; class QDialogButtonBox; class QLabel; class QSpinBox; class QDoubleSpinBox; class QLineEdit; class QListWidget; class QPushButton; class QTableWidget; class QTextEdit; class QComboBox; // Forward declarations for plumbing template class QtQueryListPipe; class AtomQtQueryPipe; class AtomsQtQueryPipe; class BooleanQtQueryPipe; class BoxQtQueryPipe; class DoubleQtQueryPipe; class DoublesQtQueryPipe; class ElementQtQueryPipe; class ElementsQtQueryPipe; class EmptyQtQueryPipe; class FileQtQueryPipe; class IntQtQueryPipe; class MoleculeQtQueryPipe; class MoleculesQtQueryPipe; class StringQtQueryPipe; class StringsQtQueryPipe; class UnsignedIntQtQueryPipe; class UnsignedIntsQtQueryPipe; class VectorQtQueryPipe; class VectorsQtQueryPipe; class RandomNumberDistribution_ParametersQtQueryPipe; class QtDialog::AtomQtQuery : public Dialog::AtomQuery { public: AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~AtomQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *inputBox; AtomQtQueryPipe *pipe; }; class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery { public: AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~AtomsQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QLabel *inputLabel; QListWidget *inputList; AtomsQtQueryPipe *pipe; }; class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery { public: BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog); virtual ~BooleanQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *booleanComboBox; BooleanQtQueryPipe *pipe; }; class QtDialog::BoxQtQuery : public Dialog::BoxQuery { public: BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~BoxQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QTableWidget *inputTable; BoxQtQueryPipe *pipe; }; class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery { public: DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~DoubleQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QDoubleSpinBox *inputBox; DoubleQtQueryPipe *pipe; }; class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery { public: DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~DoublesQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QDoubleSpinBox *inputBox; QtQueryListPipe *pipe; }; class QtDialog::ElementQtQuery : public Dialog::ElementQuery { public: ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog); virtual ~ElementQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *inputBox; ElementQtQueryPipe *pipe; }; class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery { public: ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog); virtual ~ElementsQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *inputBox; ElementsQtQueryPipe *pipe; }; class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery { public: EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog); virtual ~EmptyQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; EmptyQtQueryPipe *pipe; }; class QtDialog::FileQtQuery : public Dialog::FileQuery { public: FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog); virtual ~FileQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *filenameLabel; QLineEdit *filenameLineEdit; QPushButton *filedialogButton; FileQtQueryPipe *pipe; }; class QtDialog::IntQtQuery : public Dialog::IntQuery { public: IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~IntQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QSpinBox *inputBox; IntQtQueryPipe *pipe; }; class QtDialog::IntsQtQuery : public Dialog::IntsQuery { public: IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~IntsQtQuery(); virtual bool handle(); void IntegerEntered(const QString&); void IntegerSelected(); void AddInteger(); void RemoveInteger(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QtQueryListPipe *pipe; }; class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery { public: MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~MoleculeQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *inputBox; MoleculeQtQueryPipe *pipe; }; class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery { public: MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~MoleculesQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QComboBox *inputBox; MoleculesQtQueryPipe *pipe; }; class QtDialog::StringQtQuery : public Dialog::StringQuery { public: StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~StringQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QLineEdit *inputBox; StringQtQueryPipe *pipe; }; class QtDialog::StringsQtQuery : public Dialog::StringsQuery { public: StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog); virtual ~StringsQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QLineEdit *inputBox; QtQueryListPipe *pipe; }; class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery { public: UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~UnsignedIntQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QSpinBox *inputBox; UnsignedIntQtQueryPipe *pipe; }; class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery { public: UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog); virtual ~UnsignedIntsQtQuery(); virtual bool handle(); void IntegerEntered(const QString&); void IntegerSelected(); void AddInteger(); void RemoveInteger(); private: QBoxLayout *parent; QBoxLayout *thisLayout; QLabel *titleLabel; QtQueryListPipe *pipe; }; class QtDialog::VectorQtQuery : public Dialog::VectorQuery { public: VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *); virtual ~VectorQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *mainLayout; QLabel *titleLabel; QBoxLayout *subLayout; QBoxLayout *coordLayout; QLabel *coordLabel; QDoubleSpinBox *coordInput; VectorQtQueryPipe *pipe; }; class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery { public: VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *); virtual ~VectorsQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QBoxLayout *mainLayout; QLabel *titleLabel; QBoxLayout *subLayout; QBoxLayout *coordLayout; QLabel *coordLabel; QDoubleSpinBox *coordInput; VectorsQtQueryPipe *pipe; }; class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery { public: RandomNumberDistribution_ParametersQtQuery(std::string title,QBoxLayout *,QtDialog *); virtual ~RandomNumberDistribution_ParametersQtQuery(); virtual bool handle(); private: QBoxLayout *parent; QHBoxLayout *thisLayout; QLabel *titleLabel; QTextEdit *inputBox; QPushButton *okButton; RandomNumberDistribution_ParametersQtQueryPipe *pipe; }; #endif /* QTQUERY_HPP_ */