WordTree
MainWindow.h
00001 /*
00002  * header file for MainWindow class
00003  * written by: christian moellinger <ch.moellinger@gmail.com>
00004  * 03/2011 - 06/2011 Project "InfoVis: Word Tree"
00005  */
00006 
00007 #ifndef MAINWINDOW_H
00008 #define MAINWINDOW_H
00009 
00010 #include <QMainWindow>
00011 
00012 class SearchHistory;
00013 class WTTreeVisualizer;
00014 
00015 namespace Ui {
00016     class MainWindow;
00017 }
00018 
00019 class MainWindow : public QMainWindow
00020 {
00021     Q_OBJECT
00022 
00023 public:
00024     /*! \name Constructor / Destructor */
00025     //@{
00026         /// Constructor
00027         explicit MainWindow(QWidget *parent = 0);
00028 
00029         /// Destructor
00030         ~MainWindow();
00031     //@}
00032 
00033     /*! \name Setter */
00034     //@{
00035         /// sets the search history window
00036         void SetSearchHistoryWindow(SearchHistory *pSearchHistory);
00037     //@}
00038 
00039 protected:
00040     /*! \name Overrided events */
00041     //@{
00042         /// handles close event
00043         void closeEvent(QCloseEvent *event);
00044     //@}
00045 
00046 private slots:
00047     /*! \name public slots */
00048     //@{
00049         /// provides opening dialog and loads a file
00050         void LoadFile();
00051 
00052         /// searches for a phrase and visualizes the word tree
00053         void Search(QString search_phrase);
00054 
00055         /// handles changes in the search box (and sometimes, calls Search() )
00056         void HandleSearchBoxValueChanged(QString sValue);
00057 
00058         /// handles clicking on the tree
00059         void HandleClickOnTree(int iX, int iY, bool bControlPressed);
00060 
00061         /// handles clicking on "create word tree" button
00062         void ForceSearch();
00063 
00064         /*
00065         /// handles clicking on "enable opengl"
00066         void HandleEnableOpenGL();
00067 
00068         /// handles clicking on "disable opengl"
00069         void HandleDisableOpenGL();
00070         */
00071 
00072         /// quits the program
00073         void Quit();
00074     //@}
00075 
00076 private:
00077     /*! \name Member variables */
00078     //@{
00079         /// the ui
00080         Ui::MainWindow *ui;
00081 
00082         /// ptr to the search history window
00083         SearchHistory *m_pSearchHistory;
00084 
00085         /// ptr to the tree visualizer
00086         WTTreeVisualizer *m_pTreeVisualizer;
00087     //@}
00088 };
00089 
00090 #endif // MAINWINDOW_H
 All Data Structures Functions Variables