File indexing completed on 2024-05-05 17:04:28
0001 /* This file is part of the KDE project 0002 0003 Copyright (C) 2008 Johannes Simon <Johannes.simon@gmail.com> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License version 2 as published by the Free Software Foundation. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 0021 #ifndef SIMPLETEXT_H 0022 #define SIMPLETEXT_H 0023 0024 0025 #include <KoShape.h> 0026 0027 0028 /** 0029 * Interface for the SimpleTextShape plugin, originally written for Karbon 0030 * 0031 * Use this pure virtual class instead of using SimpleTextShape directly 0032 * to avoid unnecessary dependencies of your code, as all plugins are optional. 0033 */ 0034 class SimpleTextShapeInterface : public KoShape 0035 { 0036 public: 0037 0038 /// Sets the text to display 0039 virtual void setText( const QString & text ) = 0; 0040 0041 /// Returns the text content 0042 virtual QString text() const = 0; 0043 0044 virtual ~SimpleTextShapeInterface() {}; 0045 0046 /** 0047 * Sets the font used for drawing 0048 * Note that it is expected that the font has its point size set 0049 * in postscript points. 0050 */ 0051 virtual void setFont( const QFont & font ) = 0; 0052 0053 /// Returns the font 0054 virtual QFont font() const = 0; 0055 }; 0056 0057 #endif 0058