-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDictMainWindow.h
96 lines (69 loc) · 2.03 KB
/
DictMainWindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#ifndef DICTMAINWINDOW_H
#define DICTMAINWINDOW_H
#include <QMainWindow>
#include <QWidget>
#include <QMouseEvent>
#include "MyDictList.h"
#include "CreatWordListDB.h"
#include "QSystemTrayIcon"
#include "SpeakMgr.h"
#include "ConfigFile.h"
namespace Ui {
class DictMainWindow;
}
class DictMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit DictMainWindow(QWidget *parent = 0);
~DictMainWindow();
private slots:
void on_action_Add_triggered();
void on_action_Delete_triggered();
void on_action_Config_triggered();
void on_action_Mini_triggered();
void on_action_quit_triggered();
void on_action_NomWindow_triggered();
void on_action_Max_triggered();
void on_action_Qt_triggered();
void on_action_About_triggered();
void on_DictComboBox_currentIndexChanged(const QString &dictname);
void on_WordLineEdit_textChanged(const QString &word);
void on_action_AddToNewWord_triggered();
void on_WordTableView_clicked(const QModelIndex &index);
void trayiconActivated(QSystemTrayIcon::ActivationReason reason);
void on_WordTableView_customContextMenuRequested(const QPoint &pos);
void on_action_Speak_triggered();
void setButtonState();
void on_ExpComboBox_currentIndexChanged(int index);
////////////////////////////////////////////////////////
//ĬÈÏÓû§Ñ¡ÔñºÍ¸ü¸Ä
void userSelect();
protected:
void dictListShow();
private:
Ui::DictMainWindow *ui;
QSystemTrayIcon *trayIcon;
QAction *minimizeAction;
QAction *restoreAction;
QAction *quitAction;
QMenu *trayIconMenu;
/////////////////////////////////
//
ConfigFile *speakConfig;
/////////////////////////////////
//
MyDictList *MyDictListDB;
QString defaultUser;
//////////////////////////////
//
QString currDictPath;
QString currDictName;
CreatWordListDB *myDict;
CreatWordListDB *myBook;
QSqlTableModel *model;
//////////////////////////////
//
SpeakMgr *speakMgr;
};
#endif // DICTMAINWINDOW_H