File indexing completed on 2024-05-12 13:00:15
0001 /* This file is part of the KDE project 0002 0003 SPDX-FileCopyrightText: 2008 Johannes Simon <Johannes.simon@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 0009 #ifndef SIMPLETEXT_H 0010 #define SIMPLETEXT_H 0011 0012 0013 #include <KoShape.h> 0014 0015 0016 /** 0017 * Interface for the SimpleTextShape plugin, originally written for Karbon 0018 * 0019 * Use this pure virtual class instead of using SimpleTextShape directly 0020 * to avoid unnecessary dependencies of your code, as all plugins are optional. 0021 */ 0022 class SimpleTextShapeInterface : public KoShape 0023 { 0024 public: 0025 0026 /// Sets the text to display 0027 virtual void setText( const QString & text ) = 0; 0028 0029 /// Returns the text content 0030 virtual QString text() const = 0; 0031 0032 virtual ~SimpleTextShapeInterface() {}; 0033 0034 /** 0035 * Sets the font used for drawing 0036 * Note that it is expected that the font has its point size set 0037 * in postscript points. 0038 */ 0039 virtual void setFont( const QFont & font ) = 0; 0040 0041 /// Returns the font 0042 virtual QFont font() const = 0; 0043 }; 0044 0045 #endif 0046