SequenceDialog.h
Go to the documentation of this file.00001 #ifndef SEQUENCE_DIALOG_H
00002 #define SEQUENCE_DIALOG_H
00003
00004 #include <qdialog.h>
00005 #include <qevent.h>
00006 #include <qhbox.h>
00007 #include <qhgroupbox.h>
00008 #include <qlabel.h>
00009 #include <qlayout.h>
00010 #include <qlineedit.h>
00011 #include <qmessagebox.h>
00012 #include <qpushbutton.h>
00013 #include <qvaluestack.h>
00014 #include <qvbox.h>
00015 #include <qvgroupbox.h>
00016 #include "Preferences.h"
00017 #include "Sequence.h"
00018
00019 class SequenceDialog : public QDialog {
00020
00021 Q_OBJECT
00022
00023 public:
00024
00025 SequenceDialog( Preferences* prefs, QWidget* parent );
00026 ~SequenceDialog();
00027
00028 Sequence getSequence() const;
00029
00030 public slots:
00031
00032 protected slots:
00033
00034 virtual void accept();
00035
00036 private slots:
00037
00038 virtual bool eventFilter( QObject* obj, QEvent* evt );
00039
00040 void addSequenceItem( const QString& itemStr );
00041 void addSequenceMark();
00042 void addGroupMark();
00043 void removeLastToken();
00044
00045 private:
00046
00047 void init();
00048 void setUnionButtonsEnabled( bool isEnabled );
00049 bool isItemUsed( const Sequence::Item& item ) const;
00050 bool areItemsLeft() const;
00051 void setItemButtonsEnabled( bool isEnabled );
00052
00053 Preferences* prefs;
00054
00055 Sequence sequence;
00056
00057 QValueStack<Sequence::Item> items;
00058 Sequence::ItemList currGroup;
00059
00060 QVBoxLayout* mainLayout;
00061
00062 QHBox* sequencePanel;
00063
00064 QVGroupBox* quizPanelWrapper;
00065 QVBox* quizPanel;
00066
00067 QHBox* quizTopPanel;
00068 QVBox* quizTopLeftPanel;
00069 QVGroupBox* quizImagePanel;
00070 QPushButton* quizImageButton;
00071
00072 QHGroupBox* quizFirstLangPanel;
00073 QHBox* quizFirstLangPanelWrapper;
00074 QLabel* quizFirstLangLabel;
00075 QPushButton* quizFirstLangTermButton;
00076
00077 QHGroupBox* quizTestLangPanel;
00078 QHBox* quizTestLangPanelWrapper;
00079 QVBox* quizTestLangLabelsPanel;
00080 QVBox* quizTestLangButtonsPanel;;
00081
00082 QLabel* quizTestLangAltLabel;
00083 QLabel* quizTestLangTermLabel;
00084 QPushButton* quizTestLangAltButton;
00085 QPushButton* quizTestLangTermButton;
00086
00087 QVBox* quizCommentBox;
00088 QLabel* quizCommentLabel;
00089 QPushButton* quizCommentButton;
00090
00091 QVBox* sequencePanelButtons;
00092 QPushButton* addSequenceMarkButton;
00093 QPushButton* addGroupMarkButton;
00094 QPushButton* removeLastMarkButton;
00095
00096 QHBox* sequenceLinePanel;
00097 QLabel* sequenceLineLabel;
00098 QLineEdit* sequenceLineLineEdit;
00099
00100 };
00101
00102 #endif