00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef OPENMS_VISUAL_DATATABLE_H
00029 #define OPENMS_VISUAL_DATATABLE_H
00030
00031 #include <OpenMS/CONCEPT/Types.h>
00032
00033
00034 #include <QtGui/QWidget>
00035
00036 class QPushButton;
00037 class QGridLayout;
00038 class QLineEdit;
00039 class QTextEdit;
00040 class QComboBox;
00041
00042 namespace OpenMS
00043 {
00050 class DataTable
00051 : public QWidget
00052 {
00053 Q_OBJECT
00054
00055 public:
00057 DataTable(bool editable, QWidget *parent =0);
00059 void addLabel(const QString &label);
00061 void addLineEdit(QLineEdit* &ptr , const QString &label);
00063 void addIntLineEdit(QLineEdit* &ptr , const QString &label);
00065 void addDoubleLineEdit(QLineEdit* &ptr , const QString &label);
00067 void addLineEditButton(const QString &labelname, QLineEdit* &ptr1, QPushButton* &ptr2, const QString &buttonlabel);
00068
00070 void addTextEdit(QTextEdit* &ptr , const QString &label);
00072 void addComboBox(QComboBox* &ptr , const QString &label);
00074 void addBooleanComboBox(QComboBox* &ptr , const QString &label);
00076 void fillComboBox(QComboBox* &ptr , const std::string* items, int item_count);
00077
00079 void addVSpacer();
00081 void addButton(QPushButton* &ptr, const QString &label);
00083 void add2Buttons(QPushButton* &ptr1, const QString &label1, QPushButton* &ptr2, const QString &label2);
00084
00086 void addSeperator();
00087
00088
00090 bool isEditable() const;
00091
00092
00093 protected:
00095 QGridLayout* mainlayout_;
00096
00098 UInt row_;
00099
00101 void addLabel_(const QString &labelName, UInt row );
00102
00103 private:
00105 bool editable_;
00106
00107 };
00108
00109
00110 }
00111 #endif