1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef BATCHTRANSLATIONDIALOG_H
5#define BATCHTRANSLATIONDIALOG_H
6
7#include "ui_batchtranslation.h"
8#include "phrase.h"
9
10#include <QtWidgets/QDialog>
11#include <QtGui/QStandardItemModel>
12
13QT_BEGIN_NAMESPACE
14
15class MultiDataModel;
16
17class CheckableListModel : public QStandardItemModel
18{
19public:
20 CheckableListModel(QObject *parent = 0);
21 Qt::ItemFlags flags(const QModelIndex &index) const override;
22};
23
24class BatchTranslationDialog : public QDialog
25{
26 Q_OBJECT
27public:
28 BatchTranslationDialog(MultiDataModel *model, QWidget *w = 0);
29 void setPhraseBooks(const QList<PhraseBook *> &phrasebooks, int modelIndex);
30
31signals:
32 void finished();
33
34private slots:
35 void startTranslation();
36 void movePhraseBookUp();
37 void movePhraseBookDown();
38
39private:
40 Ui::BatchTranslationDialog m_ui;
41 CheckableListModel m_model;
42 MultiDataModel *m_dataModel;
43 QList<PhraseBook *> m_phrasebooks;
44 int m_modelIndex;
45};
46
47QT_END_NAMESPACE
48
49#endif // BATCHTRANSLATIONDIALOG_H
50

source code of qttools/src/linguist/linguist/batchtranslationdialog.h