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 |
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
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.