1 /*
2  *  Copyright (C) 2010 Parker Coates <coates@kde.org>
3  *
4  *  This program is free software; you can redistribute it and/or
5  *  modify it under the terms of the GNU General Public License as
6  *  published by the Free Software Foundation; either version 2 of
7  *  the License, or (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18 
19 #ifndef KCARDTHEME_H
20 #define KCARDTHEME_H
21 
22 // own
23 #include "libkcardgame_export.h"
24 // Qt
25 #include <QDateTime>
26 #include <QList>
27 #include <QMetaType>
28 #include <QSharedDataPointer>
29 
30 class KCardThemePrivate;
31 
32 class LIBKCARDGAME_EXPORT KCardTheme
33 {
34 public:
35     static QList<KCardTheme> findAll();
36     static QList<KCardTheme> findAllWithFeatures( const QSet<QString> & neededFeatures );
37 
38     KCardTheme();
39     explicit KCardTheme( const QString & dirName );
40     KCardTheme( const KCardTheme & other );
41     ~KCardTheme();
42 
43     KCardTheme & operator=( const KCardTheme & other );
44 
45     bool isValid() const;
46     QString dirName() const;
47     QString displayName() const;
48     QString desktopFilePath() const;
49     QString graphicsFilePath() const;
50     QDateTime lastModified() const;
51     QSet<QString> supportedFeatures() const;
52 
53     bool operator==( const KCardTheme &theme ) const;
54     bool operator!=( const KCardTheme &theme ) const;
55 
56 private:
57     QSharedDataPointer<const KCardThemePrivate> d;
58 };
59 
60 Q_DECLARE_METATYPE( KCardTheme )
61 
62 #endif
63