• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

Public Member Functions | List of all members
Snippet Class Reference

#include <snippet.h>

Inheritance diagram for Snippet:
Inheritance graph
[legend]

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().

Author
Robert Gruber rgrub.nosp@m.er@u.nosp@m.sers..nosp@m.sour.nosp@m.cefor.nosp@m.ge.n.nosp@m.et
Milian Wolff mail@.nosp@m.mili.nosp@m.anw.d.nosp@m.e

Definition at line 42 of file snippet.h.

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.

QVariant Snippet::data ( int  role = Qt::UserRole + 1) const
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:
  • snippet.h
  • snippet.cpp
This file is part of the KDE documentation.
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.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal