forked from docsteer/sacnview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtranslationdialog.h
51 lines (40 loc) · 1.12 KB
/
translationdialog.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
#ifndef TRANSLATIONDIALOG_H
#define TRANSLATIONDIALOG_H
#include <QDialog>
#include <QTranslator>
#include <QVBoxLayout>
#include <QButtonGroup>
#include <QLocale>
namespace Ui {
class TranslationDialog;
}
class TranslationDialog : public QDialog
{
Q_OBJECT
public:
/* Translation dialog/handler
*
* @arg CurrentFilename (Optional) - Fullpath to current tranlation file
* @arg VBoxLayout (Optional) - VBoxLayout to fill with checkboxes, if nullptr a dialog is created and displayed
*/
explicit TranslationDialog(const QLocale DefaultLocale, QVBoxLayout *VBoxLayout = Q_NULLPTR, QWidget *parent = Q_NULLPTR);
~TranslationDialog();
/* exec()
*
* Display dialog, if multiple options avaliabe, and block until close
*/
virtual int exec();
public:
bool LoadTranslation(const QLocale locale);
bool LoadTranslation() {
return LoadTranslation(m_locate);
}
QLocale GetSelectedLocale();
private slots:
void on_buttonBox_accepted();
private:
Ui::TranslationDialog *ui;
QButtonGroup *m_bgTranslations;
QLocale m_locate;
};
#endif // TRANSLATIONDIALOG_H