diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-10-28 16:38:01 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-11-07 14:08:25 +0100 |
commit | 7becc6264997609497135ec1b3eb18505d8e3305 (patch) | |
tree | c295516b0276a3ce99e0fa7390b6bf834ef83c35 /examples/linguist/i18n/mainwindow.h | |
parent | d95fbac8b41ba23269353e33e42a55e27f8d3b5f (diff) |
Move i18n example to qttools
Move i18n example out of qtbase, into qttools. Improve by
- removing hard-coded .qm files and .qrc file. Instead, use
CMake / qmake API.
- Add target language in .ts files
- Make file names match the locale (no->nb, jp->ja)
- Using QLocale::uiLanguages() instead of QLocale::system.name()
Change-Id: Ie7d496f38dd13078afab76eca3f7cff13ca27b68
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples/linguist/i18n/mainwindow.h')
-rw-r--r-- | examples/linguist/i18n/mainwindow.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/linguist/i18n/mainwindow.h b/examples/linguist/i18n/mainwindow.h new file mode 100644 index 000000000..93b75fd27 --- /dev/null +++ b/examples/linguist/i18n/mainwindow.h @@ -0,0 +1,39 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> + +QT_BEGIN_NAMESPACE +class QAction; +class QGroupBox; +class QLabel; +class QListWidget; +class QMenu; +class QRadioButton; +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + +private: + void createGroupBox(); + + QWidget *centralWidget; + QLabel *label; + QGroupBox *groupBox; + QListWidget *listWidget; + QRadioButton *perspectiveRadioButton; + QRadioButton *isometricRadioButton; + QRadioButton *obliqueRadioButton; + QMenu *fileMenu; + QAction *exitAction; +}; + +#endif // MAINWINDOW_H |