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
globals.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 GLOBALS_H
5#define GLOBALS_H
6
7#include <QString>
8
9const QString &settingsPrefix();
10QString settingPath(const char *path);
11
12#endif // GLOBALS_H
int main(int argc, char *argv[])
[2]
Definition buffer.cpp:77
QString context() const
MessageItem * findMessage(const QString &sourcetext, const QString &comment) const
int finishedDangerCount() const
int unfinishedCount() const
int finishedCount() const
int unfinishedDangerCount() const
bool isObsolete() const
int messageCount() const
ContextItem(const QString &context)
QString fullContext() const
QString comment() const
int nonobsoleteCount() const
bool isFinished() const
MessageItem * messageItem(int i) const
int message() const
DataIndex(int context, int message)
int context() const
bool isValid() const
bool isValid() const
MessageItem * current() const
DataModelIterator(DataModel *model, int contextNo=0, int messageNo=0)
void languageChanged()
int getSrcChars() const
void modifiedChanged()
bool load(const QString &fileName, bool *langGuessed, QWidget *parent)
const QList< bool > & countRefNeeds() const
bool save(QWidget *parent)
QLocale::Territory territory() const
static QString prettifyFileName(const QString &fn)
void doCharCounting(const QString &text, int &trW, int &trC, int &trCS)
static QString prettifyPlainFileName(const QString &fn)
QLocale::Language sourceLanguage() const
bool saveAs(const QString &newFileName, QWidget *parent)
ContextItem * contextItem(int index) const
int getSrcWords() const
bool isWritable() const
MessageItem * messageItem(const DataIndex &index) const
bool isWellMergeable(const DataModel *other) const
void setModified(bool dirty)
ContextItem * findContext(const QString &context) const
void updateStatistics()
bool setLanguageAndTerritory(QLocale::Language lang, QLocale::Territory territory)
const QString & localizedLanguage() const
void setSourceLanguageAndTerritory(QLocale::Language lang, QLocale::Territory territory)
int getSrcCharsSpc() const
MessageItem * findMessage(const QString &context, const QString &sourcetext, const QString &comment) const
bool isEmpty() const
const QStringList & numerusForms() const
QLocale::Language language() const
void progressChanged(int finishedCount, int oldFinishedCount)
bool release(const QString &fileName, bool verbose, bool ignoreUnfinished, TranslatorSaveMode mode, QWidget *parent)
int messageCount() const
void setWritable(bool writable)
bool isModified() const
QStringList normalizedTranslations(const MessageItem &m) const
int contextCount() const
QLocale::Territory sourceTerritory() const
QString srcFileName(bool pretty=false) const
QRegularExpression & getRegExp()
Definition finddialog.h:27
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.
static QString friendlyString(const QString &str)
void readConfig()
void setTranslation(const QString &translation)
QString comment() const
bool danger() const
MessageItem(const TranslatorMessage &message)
bool compare(const QString &findText, bool matchSubstring, Qt::CaseSensitivity cs) const
bool isFinished() const
QString context() const
QString text() const
QString extraComment() const
const TranslatorMessage & message() const
void setDanger(bool danger)
QString translatorComment() const
QString pluralText() const
void setTranslations(const QStringList &translations)
void setTranslatorComment(const QString &cmt)
QString translation() const
QString id() const
QStringList translations() const
QString fileName() const
bool isUnfinished() const
TranslatorMessage::Type type() const
int lineNumber() const
void setType(TranslatorMessage::Type type)
bool isObsolete() const
QModelIndex modelIndex(const MultiDataIndex &index)
QModelIndex parent(const QModelIndex &index) const override
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.
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.
MessageModel(QObject *parent, MultiDataModel *data)
MultiDataIndex dataIndex(const QModelIndex &index, int model) const
MultiDataIndex dataIndex(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
MultiDataIndex(int model, int context, int message)
bool operator==(const MultiDataIndex &other) const
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 save(int model, QWidget *parent)
bool release(int model, const QString &fileName, bool verbose, bool ignoreUnfinished, TranslatorSaveMode mode, QWidget *parent)
QStringList srcFileNames(bool pretty=false) const
bool isModified(int model) const
void append(DataModel *dm, bool readWrite)
MessageItem * messageItem(const MultiDataIndex &index, int model) const
void setModified(int model, bool dirty)
DataModel * model(int i)
MultiContextItem * findContext(const QString &context) const
QLocale::Language sourceLanguage(int model) const
bool isModified() const
void allModelsDeleted()
QString condensedSrcFileNames(bool pretty=false) const
static QString condenseFileNames(const QStringList &names)
QBrush brushForModel(int model) const
int isFileLoaded(const QString &name) const
QLocale::Language language(int model) const
void languageChanged(int model)
void setTranslation(const MultiDataIndex &index, const QString &translation)
int messageCount() const
static QStringList prettifyFileNames(const QStringList &names)
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
void contextDataChanged(const MultiDataIndex &index)
int contextCount() const
void modifiedChanged(bool)
MultiContextItem * multiContextItem(int ctxIdx) const
void translationChanged(const MultiDataIndex &index)
void statsChanged(const StatisticalData &newStats)
QString srcFileName(int model, bool pretty=false) const
MessageItem * messageItem(const MultiDataIndex &index) const
void setFinished(const MultiDataIndex &index, bool finished)
bool saveAs(int model, const QString &newFileName, QWidget *parent)
void messageDataChanged(const MultiDataIndex &index)
bool isWellMergeable(const DataModel *dm) const
void moveModel(int oldPos, int newPos)
void close(int model)
int findContextIndex(const QString &context) const
void modelDeleted(int model)
void multiContextDataChanged(const MultiDataIndex &index)
QLocale::Language sourceLanguage() const
Definition phrase.h:74
void append(Phrase *phrase)
Definition phrase.cpp:269
QLocale::Territory territory() const
Definition phrase.h:72
QLocale::Language language() const
Definition phrase.h:71
QString friendlyPhraseBookName() const
Definition phrase.cpp:300
bool isModified() const
Definition phrase.h:68
void setSourceLanguageAndTerritory(QLocale::Language lang, QLocale::Territory territory)
Definition phrase.cpp:186
bool load(const QString &fileName, bool *langGuessed)
Definition phrase.cpp:195
void listChanged()
QList< Phrase * > phrases() const
Definition phrase.h:63
void setLanguageAndTerritory(QLocale::Language lang, QLocale::Territory territory)
Definition phrase.cpp:177
QLocale::Territory sourceTerritory() const
Definition phrase.h:75
QString fileName() const
Definition phrase.h:66
bool save(const QString &fileName)
Definition phrase.cpp:237
void remove(Phrase *phrase)
Definition phrase.cpp:277
void setPhraseBook(PhraseBook *book)
Definition phrase.h:36
PhraseBook * phraseBook() const
Definition phrase.h:35
void setDefinition(const QString &nd)
Definition phrase.cpp:64
void setSource(const QString &ns)
Definition phrase.cpp:46
QString definition() const
Definition phrase.h:31
QString target() const
Definition phrase.h:29
int shortcut() const
Definition phrase.h:33
Phrase()
Definition phrase.cpp:28
Candidate candidate() const
Definition phrase.h:34
Phrase(const QString &source, const QString &target, const QString &definition, PhraseBook *phraseBook)
Definition phrase.cpp:39
Phrase(const QString &source, const QString &target, const QString &definition, const Candidate &candidate, int sc=-1)
Definition phrase.cpp:33
void setTarget(const QString &nt)
Definition phrase.cpp:55
QString source() const
Definition phrase.h:27
int getSimilarityScore(const QString &strCandidate)
Definition simtexth.cpp:152
StringSimilarityMatcher(const QString &stringToMatch)
Definition simtexth.cpp:146
QString settingPath(const char *path)
Definition globals.cpp:14
Combined button and popup list for selecting options.
bool operator==(const Phrase &p, const Phrase &q)
Definition phrase.cpp:73
bool operator!=(const Phrase &p, const Phrase &q)
Definition phrase.h:48
static int getSimilarityScore(const QString &str1, const QString &str2)
Definition simtexth.h:77
QList< Candidate > CandidateList
Definition simtexth.h:37
const int textSimilarityThreshold
Definition simtexth.h:7
bool operator!=(const Candidate &c, const Candidate &d)
Definition simtexth.h:33
CandidateList similarTextHeuristicCandidates(const Translator *tor, const QString &text, int maxCandidates)
Definition simtexth.cpp:161
bool operator==(const Candidate &c, const Candidate &d)
Definition simtexth.h:29
QString source
Definition simtexth.h:24
Candidate(const QString &c, const QString &s, const QString &d, const QString &t)
Definition simtexth.h:19
Candidate()
Definition simtexth.h:18
QString translation
Definition simtexth.h:26
QString disambiguation
Definition simtexth.h:25
QString context
Definition simtexth.h:23
quint8 b[52]
Definition simtexth.h:49
CoMatrix()
Definition simtexth.h:42
CoMatrix(const QString &str)
Definition simtexth.cpp:103
quint32 w[13]
Definition simtexth.h:50
int getNumEditable() const
bool isObsolete() const
int messageCount() const
ContextItem * contextItem(int model) const
int getNumFinished() const
MultiContextItem(int oldCount, ContextItem *ctx, bool writable)
int findMessageById(const QString &id) const
MessageItem * messageItem(int model, int msgIdx) const
MultiMessageItem * multiMessageItem(int msgIdx) const
QString context() const
QString comment() const
int firstNonobsoleteMessageIndex(int msgIdx) const
int findMessage(const QString &sourcetext, const QString &comment) const
QString id() const
bool isObsolete() const
QString comment() const
int countUnfinished() const
QString text() const
MultiMessageItem(const MessageItem *m)
bool isEmpty() const
int countEditable() const
int countNonobsolete() const
QString pluralText() const
bool isUnfinished() const
TranslatorSaveMode