-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathayikoption.h
86 lines (69 loc) · 1.85 KB
/
ayikoption.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
#ifndef AYIKOPTION_H
#define AYIKOPTION_H
#include <QtGui>
#include "starrating.h"
#include "ayikrating.h"
#include "ayikdb.h"
#include "tableview.h"
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QMainWindow>
class AyikOption : public QMainWindow
{
Q_OBJECT
public:
AyikOption();
static AyikOption* getInstance();
void init();
void postInit();
int getMessageFrequency();
QString getTag();
QString getRating();
QString getRatingOperator();
void showHelp();
private:
static AyikOption* instance;
QTabWidget* tabs;
QGroupBox* group_freq;
QStringList freqLevels;
QComboBox* cmb_freq;
QGroupBox* group_tag;
QString tagAllWords;
QLineEdit *lineedit_tag;
QListWidget *tagslist;
QPushButton *btn_tag_select;
QGroupBox* group_src_hist;
QStringList ratingLevels;
AyikRating* rating;
QComboBox *cmb_rating_oper;
QPushButton* btn_add_file;
QPushButton* btn_delete_word;
QPushButton* btn_delete_all;
QPushButton* btn_update_meaning;
QLineEdit* lineedit_word_filter;
QStringList tableHeaders;
TableView* tableview;
QTextEdit* txt_meaning;
bool txt_meaning_changed;
AyikWord currword;
QSqlDatabase db;
private:
void createActions();
void reloadTagList();
protected:
void closeEvent(QCloseEvent *event);
private slots:
void slot_add_file();
void slot_delete_word();
void slot_delete_all();
void slot_update_meaning();
void slot_word_selected(const QModelIndex ¤t,const QModelIndex &previous);
void slot_txt_meaning_changed();
void slot_filterTextChanged(const QString& text);
void slot_chooseTag();
void slot_tagChosen(QListWidgetItem * item);
};
#endif // AYIKOPTION_H