Kate
#include <snippet.h>
Public Member Functions | |
Snippet () | |
~Snippet () | |
KAction * | action () |
QString | arguments () const |
virtual QVariant | data (int role=Qt::UserRole+1) const |
QString | postfix () const |
QString | prefix () const |
void | setArguments (const QString &arguments) |
void | setPostfix (const QString &postfix) |
void | setPrefix (const QString &prefix) |
void | setSnippet (const QString &snippet) |
QString | snippet () const |
Public Member Functions inherited from QStandardItem | |
QStandardItem () | |
QStandardItem (const QString &text) | |
QStandardItem (int rows, int columns) | |
QStandardItem (const QIcon &icon, const QString &text) | |
virtual | ~QStandardItem () |
QString | accessibleDescription () const |
QString | accessibleText () const |
void | appendColumn (const QList< QStandardItem * > &items) |
void | appendRow (const QList< QStandardItem * > &items) |
void | appendRow (QStandardItem *item) |
void | appendRows (const QList< QStandardItem * > &items) |
QBrush | background () const |
Qt::CheckState | checkState () const |
QStandardItem * | child (int row, int column) const |
virtual QStandardItem * | clone () const |
int | column () const |
int | columnCount () const |
Qt::ItemFlags | flags () const |
QFont | font () const |
QBrush | foreground () const |
bool | hasChildren () const |
QIcon | icon () const |
QModelIndex | index () const |
void | insertColumn (int column, const QList< QStandardItem * > &items) |
void | insertColumns (int column, int count) |
void | insertRow (int row, QStandardItem *item) |
void | insertRow (int row, const QList< QStandardItem * > &items) |
void | insertRows (int row, const QList< QStandardItem * > &items) |
void | insertRows (int row, int count) |
bool | isCheckable () const |
bool | isDragEnabled () const |
bool | isDropEnabled () const |
bool | isEditable () const |
bool | isEnabled () const |
bool | isSelectable () const |
bool | isTristate () const |
QStandardItemModel * | model () const |
virtual bool | operator< (const QStandardItem &other) const |
QStandardItem * | parent () const |
virtual void | read (QDataStream &in) |
void | removeColumn (int column) |
void | removeColumns (int column, int count) |
void | removeRow (int row) |
void | removeRows (int row, int count) |
int | row () const |
int | rowCount () const |
void | setAccessibleDescription (const QString &accessibleDescription) |
void | setAccessibleText (const QString &accessibleText) |
void | setBackground (const QBrush &brush) |
void | setCheckable (bool checkable) |
void | setCheckState (Qt::CheckState state) |
void | setChild (int row, int column, QStandardItem *item) |
void | setChild (int row, QStandardItem *item) |
void | setColumnCount (int columns) |
virtual void | setData (const QVariant &value, int role) |
void | setDragEnabled (bool dragEnabled) |
void | setDropEnabled (bool dropEnabled) |
void | setEditable (bool editable) |
void | setEnabled (bool enabled) |
void | setFlags (QFlags< Qt::ItemFlag > flags) |
void | setFont (const QFont &font) |
void | setForeground (const QBrush &brush) |
void | setIcon (const QIcon &icon) |
void | setRowCount (int rows) |
void | setSelectable (bool selectable) |
void | setSizeHint (const QSize &size) |
void | setStatusTip (const QString &statusTip) |
void | setText (const QString &text) |
void | setTextAlignment (QFlags< Qt::AlignmentFlag > alignment) |
void | setToolTip (const QString &toolTip) |
void | setTristate (bool tristate) |
void | setWhatsThis (const QString &whatsThis) |
QSize | sizeHint () const |
void | sortChildren (int column, Qt::SortOrder order) |
QString | statusTip () const |
QStandardItem * | takeChild (int row, int column) |
QList< QStandardItem * > | takeColumn (int column) |
QList< QStandardItem * > | takeRow (int row) |
QString | text () const |
Qt::Alignment | textAlignment () const |
QString | toolTip () const |
virtual int | type () const |
QString | whatsThis () const |
virtual void | write (QDataStream &out) const |
Additional Inherited Members | |
Protected Member Functions inherited from QStandardItem | |
QStandardItem (const QStandardItem &other) | |
void | emitDataChanged () |
QStandardItem & | operator= (const QStandardItem &other) |
Detailed Description
One object of this class represents a single snippet.
Multiple snippets are stored in one repository (XML-file).
To access the snippet's name (which should also be used for matching during code completion) use QStandardItem::text()
.
Constructor & Destructor Documentation
Snippet::Snippet | ( | ) |
Construct an empty snippet.
Definition at line 36 of file snippet.cpp.
Snippet::~Snippet | ( | ) |
Definition at line 42 of file snippet.cpp.
Member Function Documentation
KAction * Snippet::action | ( | ) |
Action to trigger insertion of this snippet.
TODO: this is quite ugly, or is it? if someone knows how to do it better, please refactor
Definition at line 87 of file snippet.cpp.
QString Snippet::arguments | ( | ) | const |
Returns the display arguments of this snippet.
Definition at line 77 of file snippet.cpp.
|
virtual |
TODO: make the selected items also "disalbed" so the toggle action is seen directly
Reimplemented from QStandardItem.
Definition at line 106 of file snippet.cpp.
QString Snippet::postfix | ( | ) | const |
Returns the display postfix of this snippet.
Definition at line 67 of file snippet.cpp.
QString Snippet::prefix | ( | ) | const |
Returns the display prefix of this snippet.
Definition at line 57 of file snippet.cpp.
void Snippet::setArguments | ( | const QString & | arguments | ) |
Sets the display arguments of this snippet.
Definition at line 82 of file snippet.cpp.
void Snippet::setPostfix | ( | const QString & | postfix | ) |
Sets the display postfix of this snippet.
Definition at line 72 of file snippet.cpp.
void Snippet::setPrefix | ( | const QString & | prefix | ) |
Sets the display prefix of this snippet.
Definition at line 62 of file snippet.cpp.
void Snippet::setSnippet | ( | const QString & | snippet | ) |
Sets the actual contents of this snippet.
Definition at line 52 of file snippet.cpp.
QString Snippet::snippet | ( | ) | const |
Returns the actual contents of this snippet.
Definition at line 47 of file snippet.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.