00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * ( at your option ) any later version. * 00007 * * 00008 **************************************************************************/ 00009 00010 #include <qmainwindow.h> 00011 00012 class QLabel; 00013 class QVBox; 00014 class QPopupMenu; 00015 class QMenuBar; 00016 class QHBox; 00017 class QPushButton; 00018 class QLineEdit; 00019 class QAction; 00020 class QVBoxLayout; 00021 class QActionGroup; 00022 class DingWidget; 00023 class QTextBrowser; 00024 class QComboBox; 00025 class DingWidget; 00026 00027 class ODict : public QMainWindow 00028 { 00029 Q_OBJECT 00030 00031 public: 00032 ODict(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00033 QVBox *vbox; 00034 QTextBrowser *browser_top, 00035 *browser_bottom; 00036 DingWidget *ding; 00037 static QString appName() { return QString::fromLatin1("odict"); } 00038 private: 00039 QPopupMenu *help, *settings, *parameter; 00040 QMenuBar *menu; 00041 QHBox *hbox; 00042 QLineEdit *query_le; 00043 QComboBox *query_co; 00044 QPushButton *ok_button; 00045 00046 QVBoxLayout *vbox_layout; 00047 00048 QAction *setting_a, *setting_b; 00049 00050 void setupMenus(); 00051 00052 bool casesens, completewords; 00053 00054 void loadConfig(); 00055 void saveConfig(); 00056 00057 QString activated_name; 00058 QLabel *bottom_name, 00059 *top_name; 00060 00061 QString top_name_content, bottom_name_content; 00062 00063 void lookupLanguageNames( QString ); 00064 00065 private slots: 00066 void slotStartQuery(); 00067 void slotSettings(); 00068 void slotSetParameter( int ); 00069 void slotMethodChanged( const QString& ); 00070 };
1.4.2