9#include <QtCore/QLocale>
10#include <QtCore/QTimer>
12#include <QtWidgets/QFrame>
13#include <QtWidgets/QScrollArea>
49 int activeModel()
const {
return (m_editors.size() != 1) ? m_currentModel : 0; }
64#ifndef QT_NO_CLIPBOARD
74#ifndef QT_NO_CLIPBOARD
90 void editorDestroyed();
91 void selectionChanged(QTextEdit *);
92 void resetHoverSelection();
93 void emitTranslationChanged(QTextEdit *);
94 void emitTranslatorCommentChanged(QTextEdit *);
95#ifndef QT_NO_CLIPBOARD
96 void updateCanPaste();
97 void clipboardChanged();
99 void messageModelAppended();
100 void messageModelDeleted(
int model);
101 void allModelsDeleted();
102 void setTargetLanguage(
int model);
103 void reallyFixTabOrder();
106 void setupEditorPage();
107 void setEditingEnabled(
int model,
bool enabled);
108 bool focusNextUnfinished(
int start);
109 void resetSelection();
110 void grabFocus(QWidget *widget);
111 void trackFocus(QWidget *widget);
112 void activeModelAndNumerus(
int *model,
int *numerus)
const;
113 QTextEdit *activeTranslation()
const;
114 QTextEdit *activeOr1stTranslation()
const;
115 QTextEdit *activeTransComment()
const;
116 QTextEdit *activeEditor()
const;
117 QTextEdit *activeOr1stEditor()
const;
119 int activeTranslationNumerus()
const;
120 QStringList translations(
int model)
const;
121 void updateBeginFromSource();
122 void updateUndoRedo();
123#ifndef QT_NO_CLIPBOARD
124 void updateCanCutCopy();
126 void addPluralForm(
int model,
const QString &label,
bool writable);
128 QPalette paletteForModel(
int model)
const;
129 void applyFontSize();
135 int m_currentNumerus;
137 bool m_lengthVariants;
145 bool m_clipboardEmpty;
146 bool m_visualizeWhitespace;
148 QTextEdit *m_selectionHolder;
149 QWidget *m_focusWidget;
150 QBoxLayout *m_layout;
154 QList<MessageEditorData> m_editors;
156 QTimer m_tabOrderTimer;
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 addError(int model, const ErrorType type, const QString &arg=QString())
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 closeEvent(QCloseEvent *event) override
[21]
bool openFiles(const QStringList &names, bool readWrite=true)
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 setLengthVariants(bool on)
void redoAvailable(bool avail)
void cutAvailable(bool avail)
void undoAvailable(bool avail)
void translatorCommentChanged(const QString &comment)
void setVisualizeWhitespace(bool value)
void setEditorFocusForModel(int model)
void setTranslation(int latestModel, const QString &translation)
void setNumerusTranslation(int model, const QString &translation, int numerus)
void pasteAvailable(bool avail)
void setFontSize(const float fontSize)
void setUnfinishedEditorFocus()
bool focusNextUnfinished()
void activeModelChanged(int model)
void copyAvailable(bool avail)
void setNumerusForms(int model, const QStringList &numerusForms)
void showMessage(const MultiDataIndex &index)
void beginFromSourceAvailable(bool enable)
bool eventFilter(QObject *, QEvent *) override
const TranslatorMessage & message() const
TranslatorMessage::Type type() const
MultiDataIndex(int model, int context, int message)
bool operator!=(const MultiDataIndex &other) 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)
void languageChanged(int model)
int getNumFinished() const
void setDanger(const MultiDataIndex &index, bool danger)
bool isModelWritable(int model) const
MultiMessageItem * multiMessageItem(const MultiDataIndex &index) const
int getNumEditable() 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 multiContextDataChanged(const MultiDataIndex &index)
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 setDataModel(DataModel *model)
void setPhraseBook(PhraseBook *phraseBook)
bool isTranslated() const
Combined button and popup list for selecting options.
static QString leadingWhitespace(const QString &str)
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
QList< FormMultiWidget * > transTexts
FormWidget * transCommentText
int firstNonobsoleteMessageIndex(int msgIdx) const
bool isUnfinished() const
OpenedFile(DataModel *_dataModel, bool _readWrite, bool _langGuessed)
TranslatableEntryType type
QTreeWidgetItem * treeWidgetItem
QListWidgetItem * listWidgetItem
QTableWidgetItem * tableWidgetItem