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
translationsettingsdialog.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 TRANSLATIONSETTINGSDIALOG_H
5#define TRANSLATIONSETTINGSDIALOG_H
6
7#include "ui_translationsettings.h"
8
9#include <QtCore/QLocale>
10#include <QtWidgets/QDialog>
11
13
14class DataModel;
15class PhraseBook;
16
18{
20
21public:
23 void setDataModel(DataModel *model);
24 void setPhraseBook(PhraseBook *phraseBook);
25
26private:
27 void showEvent(QShowEvent *e) override;
28
29private slots:
31 void on_srcCbLanguageList_currentIndexChanged(int idx);
32 void on_tgtCbLanguageList_currentIndexChanged(int idx);
33
34private:
35 Ui::TranslationSettingsDialog m_ui;
36 DataModel *m_dataModel;
37 PhraseBook *m_phraseBook;
38
39};
40
41QT_END_NAMESPACE
42
43#endif // TRANSLATIONSETTINGSDIALOG_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()
void setLengthVariants(bool on)
int activeModel() const
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
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 eventFilter(QObject *obj, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
bool isModified() const
Definition phrase.h:68
void listChanged()
QList< Phrase * > phraseList() const
Definition phrasemodel.h:24
Phrase * phrase(const QModelIndex &index) const
int rowCount(const QModelIndex &) const override
Returns the number of rows under the given parent.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets the role data for the item at index to value.
void setPhrase(const QModelIndex &indx, Phrase *ph)
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
QModelIndex addPhrase(Phrase *p)
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the index of the item in the model specified by the given row, column and parent index.
Definition phrasemodel.h:32
bool hasChildren(const QModelIndex &parent) const override
Returns {true} if parent has any children; otherwise returns {false}.
Definition phrasemodel.h:47
int columnCount(const QModelIndex &) const override
Returns the number of columns for the children of the given parent.
QModelIndex index(Phrase *const phr) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns the data for the given role and section in the header with the specified orientation.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
void removePhrase(const QModelIndex &index)
void resetNumGuesses()
void setMaxCandidates(const int max)
void mouseDoubleClickEvent(QMouseEvent *event) override
int getMaxCandidates() const
Definition phraseview.h:30
void update()
static int getDefaultMaxCandidates()
Definition phraseview.h:32
void showFewerGuessesAvailable(bool canShow)
void moreGuesses()
void setSourceText(int model, const QString &sourceText)
void fewerGuesses()
void setCurrentMessageFromGuess(int modelIndex, const Candidate &cand)
void contextMenuEvent(QContextMenuEvent *event) override
void vskip()
Definition printout.cpp:51
void setGuide(const QString &guide)
Definition printout.cpp:46
@ Emphasis
Definition printout.h:23
void setRule(Rule rule)
Definition printout.cpp:40
void addBox(int percent, const QString &text=QString(), Style style=Normal, Qt::Alignment halign=Qt::AlignLeft)
Definition printout.cpp:78
PrintOut(QPrinter *printer)
Definition printout.cpp:13
int pageNum() const
Definition printout.h:36
void flushLine(bool mayBreak=false)
Definition printout.cpp:57
@ ThinRule
Definition printout.h:22
@ ThickRule
Definition printout.h:22
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 showEvent(QShowEvent *e) 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 QT_BEGIN_NAMESPACE const int DefaultMaxCandidates
Definition phraseview.h:13
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
QList< FormMultiWidget * > transTexts
FormWidget * transCommentText
int firstNonobsoleteMessageIndex(int msgIdx) const
bool isUnfinished() const
OpenedFile(DataModel *_dataModel, bool _readWrite, bool _langGuessed)
DataModel * dataModel
QTextOption options
Definition printout.h:43
QString text
Definition printout.h:41
Box(const QRect &r, const QString &t, const QFont &f, const QTextOption &o)
Definition printout.h:45
int unfinishedMsgNoDanger
Definition statistics.h:26
int translatedMsgNoDanger
Definition statistics.h:23
int unfinishedMsgDanger
Definition statistics.h:27
int charsSpacesFinished
Definition statistics.h:19
int translatedMsgDanger
Definition statistics.h:24
int charsSpacesUnfinished
Definition statistics.h:22
TranslatableEntryType type
QTreeWidgetItem * treeWidgetItem
QListWidgetItem * listWidgetItem
QTabWidget * tabWidget
QTableWidgetItem * tableWidgetItem