Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
formpreviewview.h
Go to the documentation of this file.
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 FORMPREVIEWVIEW_H
5#define FORMPREVIEWVIEW_H
6
7#include <private/quiloader_p.h>
8
9#include <QtCore/QHash>
10#include <QtCore/QList>
11
12#include <QtWidgets/QMainWindow>
13
15
16class MultiDataModel;
17class FormFrame;
18class MessageItem;
19
20class QComboBox;
21class QListWidgetItem;
22class QGridLayout;
23class QMdiArea;
24class QMdiSubWindow;
25class QToolBox;
26class QTableWidgetItem;
27class QTreeWidgetItem;
28
41
44 union {
46 QComboBox *comboBox;
48 QToolBox *toolBox;
49 QListWidgetItem *listWidgetItem;
50 QTableWidgetItem *tableWidgetItem;
51 QTreeWidgetItem *treeWidgetItem;
52 } target;
53 union {
54 char *name;
55 int index;
56 struct {
57 short index; // Known to be below 1000
58 short column;
59 } treeIndex;
60 } prop;
61};
62
63typedef QHash<QUiTranslatableStringValue, QList<TranslatableEntry> > TargetsHash;
64
66{
68public:
70
71 void setSourceContext(int model, MessageItem *messageItem);
72
73private:
74 QString m_currentFileName;
75 QMdiArea *m_mdiArea;
76 QMdiSubWindow *m_mdiSubWindow;
77 QWidget *m_form;
78 TargetsHash m_targets;
79 QList<TranslatableEntry> m_highlights;
80 MultiDataModel *m_dataModel;
81
82 QString m_lastFormName;
83 QString m_lastClassName;
84 int m_lastModel;
85};
86
87QT_END_NAMESPACE
88
89#endif // FORMPREVIEWVIEW_H
void setPhraseBooks(const QList< PhraseBook * > &phrasebooks, int modelIndex)
CheckableListModel(QObject *parent=0)
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
ContextItemDelegate(QObject *parent, MultiDataModel *model)
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
This pure abstract function must be reimplemented if you want to provide custom rendering.
void updateStatistics()
void addError(int model, const ErrorType type, const QString &arg=QString())
QString firstError()
void clear()
ErrorsView(MultiDataModel *dataModel, QWidget *parent=0)
FocusWatcher(MessageEditor *msgedit, QObject *parent)
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
void setSourceContext(int model, MessageItem *messageItem)
void closeEvent(QCloseEvent *event) override
[21]
bool openFiles(const QStringList &names, bool readWrite=true)
~MainWindow() override
void writeConfig()
static RecentFiles & recentFiles()
bool eventFilter(QObject *obj, QEvent *ev) override
Filters events if this object has been installed as an event filter for the watched object.
void readConfig()
int activeModel() const
void setEditorFocusForModel(int model)
void setUnfinishedEditorFocus()
bool focusNextUnfinished()
void activeModelChanged(int model)
void showMessage(const MultiDataIndex &index)
bool danger() const
bool isFinished() const
const TranslatorMessage & message() const
TranslatorMessage::Type type() const
bool isObsolete() const
MultiDataIndex(int model, int context, int message)
void setModel(int model)
bool isValid() const
int message() const
int model() const
bool operator!=(const MultiDataIndex &other) const
int context() const
MultiDataModelIterator(MultiDataModel *model, int modelNo, int contextNo=0, int messageNo=0)
MessageItem * current() const
bool isModified(int model) const
MessageItem * messageItem(const MultiDataIndex &index, int model) const
void setModified(int model, bool dirty)
DataModel * model(int i)
bool isModified() const
void languageChanged(int model)
int messageCount() const
int getNumFinished() const
void setDanger(const MultiDataIndex &index, bool danger)
int modelCount() const
bool isModelWritable(int model) const
MultiMessageItem * multiMessageItem(const MultiDataIndex &index) const
int getNumEditable() const
int contextCount() const
MultiContextItem * multiContextItem(int ctxIdx) const
void translationChanged(const MultiDataIndex &index)
MessageItem * messageItem(const MultiDataIndex &index) const
void setFinished(const MultiDataIndex &index, bool finished)
void messageDataChanged(const MultiDataIndex &index)
void close(int model)
void multiContextDataChanged(const MultiDataIndex &index)
bool isModified() const
Definition phrase.h:68
void listChanged()
void update()
void setCurrentMessageFromGuess(int modelIndex, const Candidate &cand)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
\reimp
SortedContextsModel(QObject *parent, MultiDataModel *model)
SortedMessagesModel(QObject *parent, MultiDataModel *model)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
\reimp
void setPhraseBook(PhraseBook *phraseBook)
bool isTranslated() const
TranslatableEntryType
@ TranslatableTabPageWhatsThis
@ TranslatableTableWidgetItem
@ TranslatableListWidgetItem
@ TranslatableTreeWidgetItem
@ TranslatableComboBoxItem
@ TranslatableTabPageToolTip
@ TranslatableToolItemToolTip
@ TranslatableProperty
@ TranslatableToolItemText
@ TranslatableTabPageText
Combined button and popup list for selecting options.
static QString leadingWhitespace(const QString &str)
Ending
@ End_Colon
@ End_None
@ End_Interrobang
@ End_Ellipsis
@ End_FullStop
static Ending ending(QString str, QLocale::Language lang)
static bool hasFormPreview(const QString &fileName)
static QString trailingWhitespace(const QString &str)
static QString fileFilters(bool allFirst)
static const QVariant & pxObsolete()
static bool haveMnemonic(const QString &str)
static QT_BEGIN_NAMESPACE const int MessageMS
int firstNonobsoleteMessageIndex(int msgIdx) const
bool isUnfinished() const
OpenedFile(DataModel *_dataModel, bool _readWrite, bool _langGuessed)
DataModel * dataModel
TranslatableEntryType type
QTreeWidgetItem * treeWidgetItem
QListWidgetItem * listWidgetItem
QTabWidget * tabWidget
QTableWidgetItem * tableWidgetItem