-
Notifications
You must be signed in to change notification settings - Fork 10
/
dictionaryimportform.h
54 lines (43 loc) · 1.55 KB
/
dictionaryimportform.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
/*
** Copyright 2007-2013, 2017-2018 Sólyom Zoltán
** This file is part of zkanji, a free software released under the terms of the
** GNU General Public License version 3. See the file LICENSE for details.
**/
#ifndef DICTIONARYIMPORTFORM_H
#define DICTIONARYIMPORTFORM_H
#include <QPushButton>
#include "dialogwindow.h"
#include "zdictionariesmodel.h"
namespace Ui {
class DictionaryImportForm;
}
class Dictionary;
class WordGroup;
class KanjiGroup;
class DictionaryImportForm : public DialogWindow
{
Q_OBJECT
public:
DictionaryImportForm(QWidget *parent = nullptr);
virtual ~DictionaryImportForm();
bool exec(Dictionary *dict);
// The name of the dictionary that was selected by the user.
QString dictionaryName() const;
// Whether the user requested a full dictionary import.
bool fullImport() const;
// Returns the word group selected in the word group tree when it's appropriate. Returns
// null when full import is selected, or the check box for word groups is unchecked.
WordGroup* selectedWordGroup() const;
// Returns the kanji group selected in the kanji group tree when it's appropriate. Returns
// null when full import is selected, or the check box for kanji groups is unchecked.
KanjiGroup* selectedKanjiGroup() const;
public slots:
void optionChanged();
void on_dictCBox_currentTextChanged(const QString &text);
private:
void translateTexts();
Ui::DictionaryImportForm *ui;
DictionariesProxyModel *dictmodel;
typedef DialogWindow base;
};
#endif // DICTIONARYIMPORTFORM_H