parley
vocabularyview.cpp
Go to the documentation of this file.
63 setEditTriggers(QAbstractItemView::AnyKeyPressed | QAbstractItemView::EditKeyPressed | QAbstractItemView::DoubleClicked);
122 m_pasteAction = KStandardAction::paste(this, SLOT(slotEditPaste()), parent->actionCollection());
128 m_selectAllAction = KStandardAction::selectAll(this, SLOT(selectAll()), parent->actionCollection());
133 m_clearSelectionAction = KStandardAction::deselect(this, SLOT(clearSelection()), parent->actionCollection());
140 parent->actionCollection()->addAction("show_vocabulary_columns_dialog", vocabularyColumnsDialogAction);
143 vocabularyColumnsDialogAction->setWhatsThis(i18n("Toggle display of individual vocabulary columns"));
148 connect(vocabularyColumnsDialogAction, SIGNAL(triggered(bool)), this, SLOT(slotShowVocabularyColumnsDialog()));
158 connect(selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
163 void VocabularyView::slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous)
251 del = KMessageBox::Continue == KMessageBox::warningContinueCancel(this, i18np("Do you really want to delete the selected entry?", "Do you really want to delete the selected %1 entries?", rows.count()), i18n("Delete"), KStandardGuiItem::del());
312 m_model->appendEntry(new KEduVocExpression(line.split(QRegExp("[\t;]"), QString::KeepEmptyParts)));
368 connect(m_spellDialog, SIGNAL(misspelling(const QString&, int)), this, SLOT(misspelling(const QString&, int)));
369 connect(m_spellDialog, SIGNAL(replace(const QString&, int, const QString&)), this, SLOT(spellingReplace(const QString&, int, const QString&)));
385 KNotification::event(KNotification::Warning, i18nc("@title of a popup", "No Spell Checker Available"), i18nc("@popupmessage", "Either the language set up is incorrect or no spellchecker was installed for this locale: %1.", locale));
436 void VocabularyView::spellingReplace(const QString & oldWord, int start, const QString & newWord)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
void slotShowVocabularyColumnsDialog()
Show the vocabulary columns dialog to enable or disable the columns in the view.
Definition: vocabularyview.cpp:348
Show options to enable/disable the columns for each language of the current document.
Definition: vocabularycolumnsdialog.h:40
virtual void reset()
KEduVocExpression expression
Definition: vocabularymimedata.h:37
Type type() const
void setAlternatingRowColors(bool enable)
void setSeparator(bool b)
QModelIndex currentIndex() const
const QMimeData * mimeData(Mode mode) const
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
QModelIndexList getSelectedIndexes() const
Definition: vocabularyview.cpp:446
QItemSelectionModel * selectionModel() const
void resizeColumnsToContents()
void addAction(QAction *action)
void setWordWrap(bool on)
Definition: vocabularyfilter.h:26
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
void setDocument(KEduVocDocument *doc)
Definition: vocabularydelegate.cpp:327
Definition: vocabularymodel.h:34
Definition: documentsettings.h:9
void setSortingEnabled(bool enable)
VocabularyView(EditorWindow *parent)
Definition: vocabularyview.cpp:54
T value() const
bool hasText() const
const_iterator insert(const T &value)
void setFrameStyle(int style)
virtual int rowCount(const QModelIndex &parent) const
int size() const
T value(int i) const
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)=0
bool isValid() const
void append(const T &value)
void saveColumnVisibility() const
Save column visibility settings.
Definition: vocabularyview.cpp:204
virtual void setModel(QAbstractItemModel *model)
QModelIndex appendEntry(KEduVocExpression *expression=0)
Definition: vocabularyfilter.cpp:36
void installEventFilter(QObject *filterObj)
static int columnType(int column)
Returns the type of the column specified.
Definition: vocabularymodel.cpp:315
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
bool isEmpty() const
QModelIndexList selectedIndexes() const
void setItemDelegate(QAbstractItemDelegate *delegate)
int row() const
bool hasSelection() const
virtual int columnCount(const QModelIndex &parent) const
void setEditTriggers(QFlags< QAbstractItemView::EditTrigger > triggers)
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void setColumnHidden(int column, bool hide)
virtual bool eventFilter(QObject *watched, QEvent *event)
void deleteSelectedEntries(bool askConfirmation=true)
Delete the currently selected entries.
Definition: vocabularyview.cpp:242
virtual QVariant data(const QModelIndex &index, int role) const =0
Definition: vocabularymodel.h:50
int count() const
void setMimeData(QMimeData *src, Mode mode)
static bool smartAppend()
Get If true, when using the entry dialog, new rows will be appended as needed.
Definition: prefs.h:89
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
QLocale locale() const
Definition: languagesettings.h:10
void checkSpelling(int language)
Definition: vocabularyview.cpp:357
int key() const
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
Definition: vocabularyview.h:46
virtual bool removeRows(int row, int count, const QModelIndex &parent)
State state() const
void translationChanged(KEduVocExpression *, int)
QString text(Mode mode) const
void setTranslator(Translator *translator)
Set the translator to be used by the delegate.
Definition: vocabularyview.cpp:343
virtual QModelIndexList selectedIndexes() const
QString & replace(int position, int n, QChar after)
void setDocument(KEduVocDocument *doc)
Definition: vocabularyview.cpp:332
virtual bool event(QEvent *event)
QMap< int, WordTypeStrings > wordTypes
Definition: vocabularymimedata.h:39
bool isColumnHidden(int column) const
virtual void clear()
void setHorizontalHeader(QHeaderView *header)
QVariant data(int role) const
QList< VocabularyMimeData::MimeExpression > expressionList() const
Definition: vocabularymimedata.cpp:90
virtual void selectAll()
QByteArray saveState() const
void setResizeMode(ResizeMode mode)
virtual int columnCount(const QModelIndex &parent) const =0
static int translation(int column)
Returns which translation this column matches.
Definition: vocabularymodel.cpp:310
Definition: editor.h:50
int column() const
void edit(const QModelIndex &index)
void setCurrentIndex(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
Definition: vocabularymimedata.h:26
void setTranslator(Translator *translator)
Sets the member variable m_translator to a Translator object.
Definition: vocabularydelegate.cpp:367
QAbstractItemModel * model() const
void setFilter(VocabularyFilter *model)
Definition: vocabularyview.cpp:151
void clearSelection()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QHeaderView * horizontalHeader() const
QString toString() const
virtual QVariant data(const QModelIndex &index, int role) const
void appendChar(const QChar &c)
Append a char to the last edited entry (used to add the phonetic stuff).
Definition: vocabularyview.cpp:236
void setVisibleColumns(const QList< int > &v)
Set Visible columns in the main editor window.
Definition: documentsettings.h:44
void setDragEnabled(bool enable)
singleShot
void setHorizontalScrollMode(ScrollMode mode)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 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:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.