F:/KPlato/koffice/libs/kotext/KoTextShapeData.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002  * Copyright (C) 2006 Thomas Zander <zander@kde.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KOTEXTSHAPEDATA_H
00021 #define KOTEXTSHAPEDATA_H
00022 
00023 #include <KoShapeUserData.h>
00024 
00025 #include <koffice_export.h>
00026 
00027 class QTextDocument;
00028 class QTextCursor;
00029 
00038 class KOTEXT_EXPORT KoTextShapeData : public KoShapeUserData {
00039     Q_OBJECT
00040 public:
00042     KoTextShapeData();
00043     ~KoTextShapeData();
00044 
00051     void setDocument(QTextDocument *document, bool transferOwnership = true);
00053     QTextDocument *document();
00054 
00058     double documentOffset() const { return m_offset; }
00064     void setDocumentOffset(double offset) { m_offset = offset; }
00065 
00066     int position() const { return m_position; }
00067     void setPosition(int position) { m_position = position; }
00068     int endPosition() const { return m_endPosition; }
00069     void setEndPosition(int position) { m_endPosition = position; }
00070 
00072     void faul() { m_dirty = true; }
00074     void wipe() { m_dirty = false; }
00076     bool isDirty() const { return m_dirty; }
00077 
00078 signals:
00085     void relayout();
00086 
00087 private:
00088     friend class KoTextShape;
00089     void fireResizeEvent() { emit relayout(); }
00090 
00091 private:
00092     QTextDocument *m_document;
00093     bool m_ownsDocument, m_dirty;
00094     double m_offset;
00095     int m_position, m_endPosition;
00096 };
00097 
00098 #endif

Généré le Wed Nov 22 23:41:10 2006 pour KPlato par  doxygen 1.5.1-p1