lokalize
glossarywindow.cpp
Go to the documentation of this file.
70 void GlossaryTreeView::currentChanged(const QModelIndex& current, const QModelIndex&/* previous*/)
228 m_browser->setColumnWidth(GlossaryModel::English, m_browser->columnWidth(GlossaryModel::English)*2); //man this is HACK y
229 m_browser->setColumnWidth(GlossaryModel::Target, m_browser->columnWidth(GlossaryModel::Target)*2);
239 m_filterEdit->setToolTip(i18nc("@info:tooltip","Activated by Ctrl+L.")+" "+i18nc("@info:tooltip","Accepts regular expressions"));
253 KPushButton* restoreBtn=new KPushButton(i18nc("@action:button reloads glossary from disk","Restore from disk"),w);
254 restoreBtn->setToolTip(i18nc("@info:tooltip","Reload glossary from disk, discarding any changes"));
288 connect(ui_termEdit.addEngTerm, SIGNAL(clicked(bool)), ui_termEdit.sourceTermsView, SLOT(addTerm()));
289 connect(ui_termEdit.remEngTerm, SIGNAL(clicked(bool)), ui_termEdit.sourceTermsView, SLOT(rmTerms()));
290 connect(ui_termEdit.addTargetTerm, SIGNAL(clicked(bool)), ui_termEdit.targetTermsView, SLOT(addTerm()));
291 connect(ui_termEdit.remTargetTerm, SIGNAL(clicked(bool)), ui_termEdit.targetTermsView, SLOT(rmTerms()));
315 connect(m_browser,SIGNAL(currentChanged(QByteArray)), this,SLOT(showEntryInEditor(QByteArray)));
319 m_definitionLang->setCurrentIndex(LanguageListModel::emptyLangInstance()->sortModelRowForLangCode(m_defLang));//empty lang
322 //connect(m_targetTermsModel,SIGNAL(dataChanged(QModelIndex,QModelIndex)),m_browser,SLOT(setFocus()));
327 !glossary->changedIds.isEmpty()||!glossary->addedIds.isEmpty()||!glossary->removedIds.isEmpty());
364 m_definitionLang->setCurrentIndex(LanguageListModel::emptyLangInstance()->sortModelRowForLangCode(lang));
434 QModelIndexList items=m_proxyModel->match(m_proxyModel->index(0,0),Qt::DisplayRole,QVariant(id),1,0);
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
void setSubjectField(const QByteArray &id, const QString &lang, const QString &value)
Definition: glossary.cpp:575
Definition: glossary.h:188
void setEntry(const QByteArray &id)
Definition: glossarywindow.cpp:522
QByteArray appendRow(const QString &_english, const QString &_target)
Definition: glossary.cpp:746
void setAlternatingRowColors(bool enable)
QString subjectField(const QByteArray &id, const QString &lang=QString()) const
Definition: glossary.cpp:565
bool contains(const Key &key) const
void currentChanged(int)
Definition: glossarywindow.cpp:381
void setCurrentIndex(const QModelIndex &index)
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
Definition: glossarywindow.cpp:539
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Definition: glossarywindow.h:125
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: glossarywindow.cpp:530
bool removeRow(int row, const QModelIndex &parent)
virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits, QFlags< Qt::MatchFlag > flags) const
const T & at(int i) const
void applyEntryChange()
Definition: glossarywindow.cpp:396
bool isVisible() const
void setUniformRowHeights(bool uniform)
QString langCodeForSortModelRow(int)
Definition: languagelistmodel.cpp:124
void sortByColumn(int column, Qt::SortOrder order)
int size() const
void addWidget(QWidget *widget)
void newTermEntry(QString _english=QString(), QString _target=QString())
Definition: glossarywindow.cpp:450
void setAutoScroll(bool enable)
GlossaryTreeView(QWidget *parent=0)
Definition: glossarywindow.cpp:51
virtual int rowCount(const QModelIndex &parent) const
void rmTerm(const QByteArray &id, QString lang, int i)
Definition: glossary.cpp:455
static QByteArray modelIndexToId(const QModelIndex &item)
Definition: glossarywindow.cpp:65
bool isValid() const
int columnWidth(int column) const
Definition: glossarywindow.h:108
void setColumnWidth(int column, int width)
void showEntryInEditor(const QByteArray &id)
Definition: glossarywindow.cpp:342
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void append(const T &value)
Definition: glossary.h:187
virtual bool removeRows(int row, int count, const QModelIndex &parent)
void setFocus()
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
void setTabOrder(QWidget *first, QWidget *second)
bool isEmpty() const
QWidget * focusWidget()
int row() const
void setDynamicSortFilter(bool enable)
void setAllColumnsShowFocus(bool enable)
void hide()
void setColumnHidden(int column, bool hide)
void setTerm(const QByteArray &id, QString lang, int i, const QString &term)
Definition: glossary.cpp:421
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)
QStringList terms(const QByteArray &id, const QString &lang) const
Definition: glossary.cpp:337
void setSortingEnabled(bool enable)
QAbstractItemModel * sourceModel() const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
void insert(int i, const T &value)
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
QModelIndex sibling(int row, int column) const
virtual void setModel(QAbstractItemModel *model)
static LanguageListModel * emptyLangInstance()
Definition: languagelistmodel.cpp:56
Definition: glossary.h:189
void show()
QAbstractItemModel * model() const
QModelIndex currentIndex() const
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
Definition: glossarywindow.cpp:70
QString definition(const QByteArray &id, const QString &lang=QString()) const
Definition: glossary.cpp:570
QString toString() const
void selectEntry(const QByteArray &id)
Definition: glossarywindow.cpp:430
void setFilterKeyColumn(int column)
void setItemsExpandable(bool enable)
void setStringList(const QStringList &strings)
void setDefinition(const QByteArray &id, const QString &lang, const QString &value)
Definition: glossary.cpp:580
GlossaryWindow(QWidget *parent=0)
Definition: glossarywindow.cpp:207
void showDefinitionForLang(int)
Definition: glossarywindow.cpp:389
const T value(const Key &key) const
typedef ItemFlags
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.