templateinterface.h
/* This file is part of the KDE libraries
Copyright (C) 2004 Joseph Wenninger <jowenn@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __ktexteditor_templateinterface_h__
#define __ktexteditor_templateinterface_h__
#include <qstring.h>
#include <qmap.h>
#include <qwidget.h>
#include <kdelibs_export.h>
namespace KTextEditor
{
class Document;
class KTEXTEDITOR_EXPORT TemplateInterface //should be named AbstractTemplateInterface, but for consistency with the other classes it is not (for the 3.x release series)
{
friend class PrivateTemplateInterface;
public:
TemplateInterface();
virtual ~TemplateInterface();
static bool expandMacros( QMap<QString, QString> &initialValues, QWidget *parentWindow );
uint templateInterfaceNumber () const;
protected:
void setTemplateInterfaceDCOPSuffix (const QCString &suffix);
public:
bool insertTemplateText ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0);
protected:
virtual bool insertTemplateTextImplementation ( uint line, uint column, const QString &templateString, const QMap<QString,QString> &initialValues, QWidget *parentWindow=0 )=0;
private:
class PrivateTemplateInterface *d;
static uint globalTemplateInterfaceNumber;
uint myTemplateInterfaceNumber;
};
KTEXTEDITOR_EXPORT TemplateInterface *templateInterface (Document *doc);
}
#endif
KTextEditor::TemplateInterface
This is an interface for inserting template strings with user editable fields into a document...
Definition: templateinterface.h:37
KTextEditor::Document
The main class representing a text document.
Definition: document.h:31

KDE Home | KDE Accessibility Home | Description of Access Keys