00001 //-*- C++ -*- 00002 /* 00003 Phrasehunter - index and query text corpora 00004 Copyright (C) 2006 Torsten Marek (shlomme@gmx.de) & 00005 Armin Schmidt (armin.sch@gmail.com) 00006 00007 This program is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 as published by the Free Software Foundation; either version 2 00010 of the License, or (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef PHSEARCHIMPL_H 00023 #define PHSEARCHIMPL_H PHSEARCHIMPL_H 00024 00025 #include <QtGui/QMainWindow> 00026 #include <QtGui/QTableWidgetItem> 00027 00028 #include "ui_phrasehunter-qt4.h" 00029 00030 #include "phrasehunter/ph_types.h" 00031 00032 //! Class that sets up the GUI and is responible for opening a corpus. 00033 class PhSearchImpl : public QMainWindow, Ui::phMainWindow 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 PhSearchImpl(); 00039 ~PhSearchImpl(); 00040 00041 public slots: 00042 void fileOpen(); 00043 void fileExit(); 00044 void helpAbout(); 00045 void openDocument(PhraseHunter::DocID, PhraseHunter::IdxPos, size_t); 00046 void openOptionsWidget(); 00047 void newSearchTab(); 00048 void closeTab(); 00049 void hideStatistics(); 00050 00051 private: 00052 void deleteCorpus(); 00053 void setupTabIcons(); 00054 void setupConnections(); 00055 00056 PhraseHunter::CorpusManager* m_corpus; 00057 }; 00058 00059 #endif // PHSEARCHIMPL_H