chalk

kis_annotation.h
1/*
2 * This file is part of the KDE project
3 *
4 * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef _KIS_ANNOTATION_H_
22#define _KIS_ANNOTATION_H_
23
24#include <ksharedptr.h>
25#include "kis_shared_ptr_vector.h"
26
27#include <tqstring.h>
28#include <tqcstring.h>
29#include <tqmemarray.h>
30
43class KisAnnotation : public TDEShared {
44
45
46public:
47
55 KisAnnotation(const TQString & type, const TQString & description, const TQByteArray & data)
56 : m_type(type),
57 m_description(description),
58 m_annotation(data) {};
59
63 TQString & type() {return m_type;};
64
69 TQString & description() {return m_description;};
70
74 TQByteArray & annotation() { return m_annotation;};
75
76private:
77
78 TQString m_type;
79 TQString m_description;
80 TQByteArray m_annotation;
81
82};
83
84typedef TDESharedPtr<KisAnnotation> KisAnnotationSP;
86typedef vKisAnnotationSP::iterator vKisAnnotationSP_it;
87typedef vKisAnnotationSP::const_iterator vKisAnnotationSP_cit;
88
89#endif // _KIS_ANNOTATION_H_
An data extension mechanism for Chalk.
TQString & description()
KisAnnotation(const TQString &type, const TQString &description, const TQByteArray &data)
Creates a new annotation object.
TQString & type()
TQByteArray & annotation()
TQValueVector does not always destroy an element when it is erased.