-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdictionaryeditor.h
More file actions
37 lines (30 loc) · 832 Bytes
/
dictionaryeditor.h
File metadata and controls
37 lines (30 loc) · 832 Bytes
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
#ifndef DICTIONARYEDITOR_H
#define DICTIONARYEDITOR_H
#include <QWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QButtonGroup>
namespace Ui {
class DictionaryEditor;
}
class DictionaryEditor : public QWidget
{
Q_OBJECT
public:
explicit DictionaryEditor(QWidget *parent = nullptr);
~DictionaryEditor();
void resetDefEdit();
private:
Ui::DictionaryEditor *ui;
std::vector<std::pair<QLineEdit*, QPushButton*>> defEditGroup;
std::vector<std::pair<QLineEdit*, QPushButton*>> exampleEditGroup;
QButtonGroup *rmEditBtnGroup;
void addNewDefEdit();
void addNewExEdit();
void removeEdit(int i);
void removeExample(int i);
signals:
void addNewWord(const QString&, std::vector<std::pair<QString, QString> >);
void resetDictionary();
};
#endif // DICTIONARYEDITOR_H