QCodeEdit  2.2
Classes | Macros
qsnippet_p.h File Reference

Definition of the QSnippetInsertionCommand class. More...

#include "qsnippet.h"
#include "qsnippetpatternloader.h"
#include "qeditor.h"
#include "qdocument.h"
#include "qdocumentcursor.h"
#include "qdocumentcommand.h"
Include dependency graph for qsnippet_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QSnippetInsertionCommand
class  QCE::Snippets::PlainText
class  QCE::Snippets::Simple
struct  QCE::Snippets::Simple::Anchor
struct  QCE::Snippets::Simple::PlaceHolder

Macros

#define Q_SNIPPET(T)

Detailed Description

Definition of the QSnippetInsertionCommand class.


Macro Definition Documentation

#define Q_SNIPPET (   T)
Value:
friend class Loader; \
public: \
class Loader : public QSnippetPatternLoader \
{ \
public: \
virtual QString type() const { return ""#T; } \
virtual QSnippet* loadSnippet(const QString& pattern) const \
{ \
T *snip = new T(this); \
snip->m_pattern = pattern; \
bool ok = reloadSnippet(snip, pattern); \
if ( !ok ) { delete snip; snip = 0; } \
return snip; \
} \
virtual bool reloadSnippet(QSnippet* snip, const QString& pattern) const \
{ return T::loadSnippet(snip, pattern); } \
}; \
inline T(const QSnippetPatternLoader *pl) : QSnippet(pl) {} \
private: \