lokalize
alttransview.cpp
Go to the documentation of this file.
85 connect(m_browser,SIGNAL(textInsertRequested(QString)),this,SIGNAL(textInsertRequested(QString)));
95 if(event->mimeData()->hasUrls() && Catalog::extIsSupported(event->mimeData()->urls().first().path()))
178 QTextBlockFormat blockFormatAlternate; blockFormatAlternate.setBackground(QPalette().alternateBase());
194 QString result=Qt::escape(userVisibleWordDiff(entry.source.string, source.string,Project::instance()->accel(),Project::instance()->markup()));
198 result.replace("{KBABELADD}","<font style=\"background-color:"+Settings::addColor().name()+";color:black\">");
200 result.replace("{KBABELDEL}","<font style=\"background-color:"+Settings::delColor().name()+";color:black\">");
254 QString tooltip=i18nc("@info:tooltip","<p>Sometimes, if source text is changed, its translation becomes deprecated and is either marked as <emphasis>needing review</emphasis> (i.e. looses approval status), "
255 "or (only in case of XLIFF file) moved to the <emphasis>alternate translations</emphasis> section accompanying the unit.</p>"
256 "<p>This toolview also shows the difference between current source string and the previous source string, so that you can easily see which changes should be applied to existing translation to make it reflect current source.</p>"
258 "<p>Drop translation file onto this toolview to use it as a source for additional alternate translations.</p>"
264 int block1=m_browser->cursorForPosition(m_browser->viewport()->mapFromGlobal(helpEvent->globalPos())).blockNumber();
265 int block=*m_entryPositions.lowerBound(m_browser->cursorForPosition(m_browser->viewport()->mapFromGlobal(helpEvent->globalPos())).anchor());
290 tmEntry.diff=userVisibleWordDiff(m_entries.at(i).source.string, source.string,Project::instance()->accel(),Project::instance()->markup());
void addAlternateTranslation(int entry, const QString &, bool temp=true)
Definition: alttransview.cpp:116
CatalogString targetWithTags(const DocPosition &pos) const
Definition: catalog.cpp:211
QVector< AltTrans > altTrans(const DocPosition &pos) const
Definition: catalog.cpp:272
Type type() const
const QMimeData * mimeData() const
void insertHtml(const QString &html)
void beginMacro(const QString &text)
QString userVisibleWordDiff(const QString &str1ForMatching, const QString &str2ForMatching, const QString &accel, const QString &markup, int options)
Definition: diff.cpp:408
int size() const
void textInsertRequested(const QString &)
AltTransView(QWidget *, Catalog *, const QVector< KAction * > &)
Definition: alttransview.cpp:48
void insertContent(QTextCursor &cursor, const CatalogString &catStr, const CatalogString &refStr, bool insertText)
Definition: xlifftextedit.cpp:344
void clear()
void attachAltTrans(int entry, const AltTrans &trans)
Definition: catalog.cpp:267
void showText(const QPoint &pos, const QString &text, QWidget *w)
int anchor() const
CatalogString targetAdapted(const TMEntry &entry, const CatalogString &ref)
this tries some black magic naturally, there are many assumptions that might not always be true ...
Definition: tmview.cpp:660
void clear()
Definition: tmentry.h:35
const char * name() const
void setMapping(QObject *sender, int id)
QString canonicalFilePath() const
void insertBlock()
bool removeTargetSubstring(Catalog *catalog, DocPosition pos, int delStart, int delLen)
Definition: cmd.cpp:364
const QPoint & globalPos() const
void insertText(const QString &text)
void setObjectName(const QString &name)
bool isEmpty() const
void setBackground(const QBrush &brush)
void hide()
void slotNewEntryDisplayed(const DocPosition &)
Definition: alttransview.cpp:140
iterator lowerBound(const Key &key)
void setAcceptDrops(bool on)
bool exists() const
void setWidget(QWidget *widget)
void setFontWeight(int weight)
QString & replace(int position, int n, QChar after)
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:128
const T & at(int i) const
void insertCatalogString(Catalog *catalog, DocPosition pos, const CatalogString &catStr, int start)
Definition: cmd.cpp:421
bool hasUrls() const
QList< QUrl > urls() const
void endMacro()
QString escape(const QString &plain)
bool isEmpty() const
CatalogString sourceWithTags(const DocPosition &pos) const
Definition: catalog.cpp:203
void setWindowTitle(const QString &)
void reserve(int size)
void refreshRequested()
This class represents a catalog It uses CatalogStorage interface to work with catalogs in different f...
Definition: catalog.h:74
iterator insert(const Key &key, const T &value)
void show()
bool isEmpty() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int size() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
virtual bool event(QEvent *event)
Definition: alttrans.h:30
QFuture< T > mapped(const Sequence &sequence, MapFunction function)
singleShot
void attachAltTransFile(const QString &)
Definition: alttransview.cpp:109
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.