00001 #ifndef ADAPTIVITREE_H 00002 #define ADAPTIVITREE_H 00003 00004 #include <QtGui/QMainWindow> 00005 #include "ui_adaptivitree.h" 00006 #include "ui_resultDialog.h" 00007 #include "ui_winnerDialog.h" 00008 #include "ui_newDialog.h" 00009 00010 #include <QFileDialog> 00011 #include <QDialog> 00012 #include <QKeyEvent> 00013 #include <QString> 00014 #include <QStringList> 00015 00016 00017 #include "xmlReader.h" 00018 #include "xmlWriter.h" 00019 #include <iostream> 00020 00032 class AdaptiviTree : public QMainWindow 00033 { 00034 Q_OBJECT 00035 00036 public: 00037 00038 AdaptiviTree(QWidget *parent = 0, Qt::WFlags flags = 0); 00039 ~AdaptiviTree(); 00043 QString filename; 00044 00045 00046 protected: 00047 void keyPressEvent(QKeyEvent* event); 00048 00049 private: 00051 Ui::AdaptiviTree ui; 00053 Ui::ResultDialog resultUI; 00055 Ui::WinnerDialog winnerUI; 00057 Ui::NewDialog newUI; 00058 QDialog* dialogResult; 00059 QDialog* dialogWinner; 00060 QDialog* dialogNew; 00064 QVector<QLineEdit*> teamInput; 00068 int comboBoxValue; 00072 int sliderAction; 00073 //int mouseValue; 00074 00075 00076 void init(void); 00080 void updateDisplay(Game* game); 00086 void clearDisplay(void); 00090 void editGameResult(Game* game); 00094 void displayWinner(void); 00095 void setSliderStep(int value); 00099 void exampleTournament(void); 00100 00101 private slots: 00102 void openFileDialog(void); 00103 void sliderValueChanged(int value); 00104 void setSliderAction(int action); 00105 void saveFileDialog(void); 00106 void newTournament(void); 00107 void comboBoxValueChanged(QString value); 00108 //void getMouseValue(int value); 00109 }; 00110 00111 #endif // ADAPTIVITREE_H