krita

kis_annotation.h

00001 /* 
00002  * This file is part of the KDE project
00003  * 
00004  * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef _KIS_ANNOTATION_H_
00022 #define _KIS_ANNOTATION_H_
00023 
00024 #include <ksharedptr.h>
00025 #include "kis_shared_ptr_vector.h"
00026 
00027 #include <qstring.h>
00028 #include <qcstring.h>
00029 #include <qmemarray.h>
00030 
00043 class KisAnnotation : public KShared {
00044 
00045 
00046 public:
00047 
00055     KisAnnotation(const QString & type, const QString & description, const QByteArray & data)
00056         : m_type(type),
00057           m_description(description),
00058           m_annotation(data) {};
00059 
00063     QString & type() {return m_type;};
00064 
00069     QString & description() {return m_description;};
00070 
00074     QByteArray & annotation() { return m_annotation;};
00075 
00076 private:
00077 
00078     QString m_type;
00079     QString m_description;
00080     QByteArray m_annotation;
00081 
00082 };
00083 
00084 typedef KSharedPtr<KisAnnotation> KisAnnotationSP;
00085 typedef KisSharedPtrVector<KisAnnotation> vKisAnnotationSP;
00086 typedef vKisAnnotationSP::iterator vKisAnnotationSP_it;
00087 typedef vKisAnnotationSP::const_iterator vKisAnnotationSP_cit;
00088 
00089 #endif // _KIS_ANNOTATION_H_
KDE Home | KDE Accessibility Home | Description of Access Keys