lokalize
tmview.cpp
Go to the documentation of this file.
193 connect(m_browser,SIGNAL(textInsertRequested(QString)),this,SIGNAL(textInsertRequested(QString)));
196 // connect(KGlobalSettings::self(),,SIGNAL(kdisplayPaletteChanged()),this,SLOT(slotPaletteChanged()));
239 connect(j,SIGNAL(done(ThreadWeaver::Job*)),this,SLOT(slotCacheSuggestions(ThreadWeaver::Job*)));
246 connect(m_seq,SIGNAL(done(ThreadWeaver::Job*)),this,SLOT(slotBatchSelectDone(ThreadWeaver::Job*)));
376 connect(m_currentSelectJob,SIGNAL(done(ThreadWeaver::Job*)),this,SLOT(slotSuggestionsCame(ThreadWeaver::Job*)));
427 if (projectID!=dbName && dbFilesModel.m_configurations.value(dbName).targetLangCode==catalog.targetLangCode())
465 QTextBlockFormat blockFormatAlternate; blockFormatAlternate.setBackground(QPalette().alternateBase());
485 result.replace("{KBABELADD}","<font style=\"background-color:"%Settings::addColor().name()%";color:black\">");
487 result.replace("{KBABELDEL}","<font style=\"background-color:"%Settings::delColor().name()%";color:black\">");
495 cur.movePosition(QTextCursor::PreviousCharacter,QTextCursor::MoveAnchor,cur.position()-sourceStartPos);
555 //int block1=m_browser->cursorForPosition(m_browser->viewport()->mapFromGlobal(helpEvent->globalPos())).blockNumber();
556 QMap<int,int>::iterator block =m_entryPositions.lowerBound(m_browser->cursorForPosition(m_browser->viewport()->mapFromGlobal(helpEvent->globalPos())).anchor());
563 QString tooltip=i18nc("@info:tooltip","File: %1<br />Addition date: %2",file, tmEntry.date.toString(Qt::ISODate));
565 tooltip+=i18nc("@info:tooltip on TM entry continues","<br />Last change date: %1", tmEntry.changeDate.toString(Qt::ISODate));
567 tooltip+=i18nc("@info:tooltip on TM entry continues","<br />Last change author: %1", tmEntry.changeAuthor);
570 tooltip+=i18nc("@info:tooltip on TM entry continues","<br />Is not present in the file anymore");
595 KMessageBox::Yes==KMessageBox::questionYesNo(this, i18n("<html>Do you really want to remove this entry:<br/><i>%1</i><br/>from translation memory %2?</html>", Qt::escape(e.target.string), e.dbName),
669 QRegExp rxAdd("<font style=\"background-color:[^>]*" % Settings::addColor().name() % "[^>]*\">([^>]*)</font>");
670 QRegExp rxDel("<font style=\"background-color:[^>]*" % Settings::delColor().name() % "[^>]*\">([^>]*)</font>");
817 kWarning()<<"BEGIN HANDLING. replacing"<<target.string.left(oldMarkup.size())<<"with"<<newMarkup;
920 // kWarning()<<"(d.diffIndex.at(d.old2DiffClean.at(pos-1))=='+')"<<(d.diffIndex.at(d.old2DiffClean.at(pos-1))=='+');
void customContextMenuRequested(const QPoint &pos)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
int position() const
Definition: dbfilesmodel.h:39
void clear()
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
int scanRecursive(const QList< QUrl > &urls, const QString &dbName)
wrapper. returns gross number of jobs started
Definition: tmscanapi.cpp:92
QString cap(int nth) const
CatalogString targetWithTags(const DocPosition &pos) const
Definition: catalog.cpp:211
QString & append(QChar ch)
Type type() const
const QMimeData * mimeData() const
QString toString(Qt::DateFormat format) const
static int nextPlacableIn(const QString &old, int start, QString &cap)
helper function: searches to th nearest rxNum or ABBR clears rxNum if ABBR is found before rxNum ...
Definition: tmview.cpp:612
static void push(Catalog *catalog, const DocPosition &pos, bool approved)
Definition: cmd.cpp:182
void insertHtml(const QString &html)
char at(int i) const
void setMinimal(bool minimal)
void beginMacro(const QString &text)
int lastIndexOf(char ch, int from) const
QVariant data() const
QMap< QString, TMConfig > m_configurations
Definition: dbfilesmodel.h:102
const T & at(int i) const
void mouseDoubleClickEvent(QMouseEvent *event)
Definition: tmview.cpp:136
int size() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: dbfilesmodel.cpp:203
void slotNewEntryDisplayed(const DocPosition &pos=DocPosition())
Definition: tmview.cpp:356
Definition: jobs.h:130
T & first()
void insertContent(QTextCursor &cursor, const CatalogString &catStr, const CatalogString &refStr, bool insertText)
Definition: xlifftextedit.cpp:344
bool exists() const
QString & remove(int position, int n)
void clear()
void chop(int n)
void showText(const QPoint &pos, const QString &text, QWidget *w)
int anchor() const
virtual int rowCount(const QModelIndex &parent) const
bool movePosition(MoveOperation operation, MoveMode mode, int n)
int size() 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()
void setPattern(const QString &pattern)
Definition: jobs.h:229
int matchedLength() const
int indexIn(const QString &str, int offset, CaretMode caretMode) const
void textInsertRequested(const QString &)
void slotSuggestionsCame(ThreadWeaver::Job *)
Definition: tmview.cpp:391
Definition: tmentry.h:35
const char * name() const
int indexOf(char ch, int from) const
void setMapping(QObject *sender, int id)
void insertBlock()
void append(const T &value)
bool removeTargetSubstring(Catalog *catalog, DocPosition pos, int delStart, int delLen)
Definition: cmd.cpp:364
int toInt(bool *ok) const
bool isNull() const
void setUpdatesEnabled(bool enable)
const QPoint & globalPos() const
QByteArray & prepend(char ch)
bool isEmpty() const
void setObjectName(const QString &name)
bool isEmpty() const
TMView(QWidget *, Catalog *, const QVector< KAction * > &)
Definition: tmview.cpp:146
int removeAll(const T &value)
void setBackground(const QBrush &brush)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QPoint pos() const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
void deleteLater()
iterator end()
SelectJob * initSelectJob(Catalog *, DocPosition pos, QString db=QString(), int opt=Enqueue)
Definition: jobs.cpp:1084
void adaptCatalogString(CatalogString &target, const CatalogString &ref)
prepares
Definition: catalogstring.cpp:271
iterator lowerBound(const Key &key)
Definition: tmview.h:113
void setAcceptDrops(bool on)
QByteArray & append(char ch)
iterator end()
void reserve(int size)
Definition: jobs.h:173
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void setWidget(QWidget *widget)
void setFontWeight(int weight)
QString & replace(int position, int n, QChar after)
const QChar * unicode() const
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
T takeLast()
void fileOpenRequested(const KUrl &path, const QString &str, const QString &ctxt)
void refreshRequested()
QList< QUrl > urls() const
void endMacro()
QString escape(const QString &plain)
bool isEmpty() const
CatalogString sourceWithTags(const DocPosition &pos) const
Definition: catalog.cpp:203
const QChar at(int position) const
void setWindowTitle(const QString &)
bool contains(char ch) const
void reserve(int size)
QString left(int n) const
void start()
This class represents a catalog It uses CatalogStorage interface to work with catalogs in different f...
Definition: catalog.h:74
void replace(int position, int len, const QString &str)
Definition: catalogstring.h:142
void setCharFormat(const QTextCharFormat &format)
iterator insert(const Key &key, const T &value)
void setToolTip(const QString &)
void textInsertRequested(const QString &)
int size() 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: jobs.h:257
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:44
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 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:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.