SearchDialog.h

Go to the documentation of this file.
00001 #ifndef SEARCH_DIALOG_H
00002 #define SEARCH_DIALOG_H
00003 
00004 #include <iostream.h>
00005 #include <qdialog.h>
00006 #include <qfontmetrics.h>
00007 #include <qheader.h>
00008 #include <qhbox.h>
00009 #include <qlabel.h>
00010 #include <qlayout.h>
00011 #include <qlineedit.h>
00012 #include <qlistview.h>
00013 #include <qpushbutton.h>
00014 #include <qvbox.h>
00015 #include "Controller.h"
00016 #include "HistoryField.h"
00017 #include "ResultListItem.h"
00018 #include "SmartListView.h"
00019 #include "TermDialog.h"
00020 #include "TranslationSelectionDialog.h"
00021 
00022 class SearchDialog : public QDialog {
00023 
00024     Q_OBJECT
00025     
00026 public:
00027 
00028     SearchDialog( QWidget* parent, Controller* controller );
00029     ~SearchDialog();
00030 
00031 public slots:
00032 
00033     void show();
00034     void updateFonts();
00035     void retranslateUi();
00036     void setDigraphEnabled( bool isDigraphEnabled );
00037 
00038 signals:
00039 
00040     void showTermRequested( const TermKey& termKey );
00041     void termsRemoved();
00042 
00043 private slots:
00044 
00045     void search();
00046     void reset();
00047     void goResultVocab();
00048     void editResultTerm();
00049     void removeResultTerms();
00050     void updateUi();
00051     
00052 private:
00053 
00054     void init();
00055     uint getSelectedTermCount() const;
00056     void doRemoveTerms( bool allowSelectTrans = true, bool confirmBeforeRemove = true );
00057 
00058     Controller*             controller;
00059 
00060     QVBoxLayout*            mainLayout;
00061 
00062     QHBox*                  queryPanel;
00063 
00064     HistoryField*           queryField;
00065     QPushButton*            searchButton;
00066     QPushButton*            resetButton;
00067 
00068     QHBox*                  resultsHeaderPanel;
00069     
00070     QLabel*                 resultsHeaderLabel;
00071     QWidget*                resultsHeaderFiller;
00072     QLabel*                 resultsCounterLabel;
00073 
00074     SmartListView*          resultsListView;
00075 
00076     QHBox*                  resultsButtonsPanel;
00077     QPushButton*            goResultVocabButton;
00078     QPushButton*            editResultTermButton;
00079     QPushButton*            removeResultTermButton;
00080 
00081 };
00082 
00083 #endif

Generated on Sun Mar 1 17:30:47 2009 for toMOTko by  doxygen 1.5.6