lib

KoPictureKey.h
1/* This file is part of the KDE project
2 Copyright (c) 2001 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2002, 2004 Nicolas GOUTTE <goutte@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20#ifndef __koPictureKey_h__
21#define __koPictureKey_h__
22
23#include <tqstring.h>
24#include <tqdatetime.h>
25#include <koffice_export.h>
30
31class TQDomElement;
32
33namespace KoPictureType
34{
44 const int formatVersionTQPicture=-1;
45
46 enum Type
47 {
48 TypeUnknown = 0,
49 TypeImage,
50 TypeEps,
51 TypeClipart,
52 TypeWmf
53 };
54}
55
75class KOFFICEUI_EXPORT KoPictureKey
76{
77public:
82
90 KoPictureKey( const TQString &fn, const TQDateTime &mod );
91
96 KoPictureKey( const TQString &fn );
97
101 KoPictureKey( const KoPictureKey &key );
102
106 KoPictureKey &operator=( const KoPictureKey &key );
107
111 bool operator==( const KoPictureKey &key ) const;
112
117 bool operator<( const KoPictureKey &key ) const;
118
122 TQString toString() const;
123
127 void saveAttributes( TQDomElement &elem ) const;
128
132 void loadAttributes( const TQDomElement &elem );
133
137 TQString filename() const { return m_filename; }
138
142 TQDateTime lastModified() const { return m_lastModified; }
143
147 void setKeyFromFile (const TQString& filename);
148
149protected:
150 TQString m_filename;
151 TQDateTime m_lastModified;
152};
153
154#endif /* __koPictureKey_h__ */
bool operator==(const KoPictureKey &key) const
Comparison operator.
KoPictureKey()
Default constructor.
TQString toString() const
Convert this key into a string representation of it.
void saveAttributes(TQDomElement &elem) const
Save this key in XML (as KOffice 1.3).
void loadAttributes(const TQDomElement &elem)
Load this key from XML (as KOffice 1.3).
bool operator<(const KoPictureKey &key) const
Comparison operator.
TQString filename() const
First part of the key: the filename.
TQDateTime lastModified() const
Second part of the key: the modification date.
KoPictureKey & operator=(const KoPictureKey &key)
Assignment operator.