From dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:21 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- interfaces/tdetexteditor/variableinterface.h | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 interfaces/tdetexteditor/variableinterface.h (limited to 'interfaces/tdetexteditor/variableinterface.h') diff --git a/interfaces/tdetexteditor/variableinterface.h b/interfaces/tdetexteditor/variableinterface.h new file mode 100644 index 000000000..31310a43c --- /dev/null +++ b/interfaces/tdetexteditor/variableinterface.h @@ -0,0 +1,72 @@ +/* + 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. + + --- + Copyright (C) 2004, Anders Lund +*/ +#ifndef _KTEXTEDITOR_VARIABLE_INTERFACE_H_ +#define _KTEXTEDITOR_VARIABLE_INTERFACE_H_ + +#include + +class TQString; + +namespace KTextEditor { + +/** + * This interface is designed to provide access to "document variables", + * for example variables defined in files like "kate: variable value;" + * or the emacs style "-*- variable: value -*-". + * + * The purpose is to allow KTE plugins to use variables. + * A document implementing this interface should return values for variable + * that it does not otherwise know how to use, since they could be of interrest + * to plugins. A document implementing this interface must emit the variableChanged() + * signal whenever a variable is set that it will return a value for. + * + * @short KTextEditor interface to Document Variables + */ +class KTEXTEDITOR_EXPORT VariableInterface +{ + public: + VariableInterface(); + virtual ~VariableInterface(); + + unsigned int variableInterfaceNumber(); + + /** + * @return the value of the variable @p name, or an empty string if the + * variable is not set or has no value. + */ + virtual TQString variable( const TQString &name ) const = 0; + + // + // signals!! + // + public: + /** + * Signal: emitted when a variable is set + */ + virtual void variableChanged( const TQString &variable, const TQString &value ) = 0; + + private: + static unsigned int globalVariableInterfaceNumber; + unsigned int myVariableInterfaceNumber; +}; + + +KTEXTEDITOR_EXPORT VariableInterface *variableInterface( class Document * ); +} // namespace KTextEditor +#endif //_KTEXTEDITOR_VARIABLE_INTERFACE_H_ -- cgit v1.2.1