QCodeEdit
2.2
|
Definition of the QSnippetInsertionCommand class. More...
#include "qsnippet.h"
#include "qsnippetpatternloader.h"
#include "qeditor.h"
#include "qdocument.h"
#include "qdocumentcursor.h"
#include "qdocumentcommand.h"
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 |
Defines | |
#define | Q_SNIPPET(T) |
Definition of the QSnippetInsertionCommand class.
#define Q_SNIPPET | ( | T | ) |
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: \