File indexing completed on 2024-06-16 03:56:47
0001 /* 0002 * Copyright (C) 2010 Parker Coates <coates@kde.org> 0003 * 0004 * This program is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU General Public License as 0006 * published by the Free Software Foundation; either version 2 of 0007 * the License, or (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU General Public License 0015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0016 * 0017 */ 0018 0019 #ifndef KCARDTHEME_H 0020 #define KCARDTHEME_H 0021 0022 // own 0023 #include "libkcardgame_export.h" 0024 // Qt 0025 #include <QDateTime> 0026 #include <QList> 0027 #include <QMetaType> 0028 #include <QSharedDataPointer> 0029 0030 class KCardThemePrivate; 0031 0032 class LIBKCARDGAME_EXPORT KCardTheme 0033 { 0034 public: 0035 static QList<KCardTheme> findAll(); 0036 static QList<KCardTheme> findAllWithFeatures(const QSet<QString> &neededFeatures); 0037 0038 KCardTheme(); 0039 explicit KCardTheme(const QString &dirName); 0040 KCardTheme(const KCardTheme &other); 0041 ~KCardTheme(); 0042 0043 KCardTheme &operator=(const KCardTheme &other); 0044 0045 bool isValid() const; 0046 QString dirName() const; 0047 QString displayName() const; 0048 QString desktopFilePath() const; 0049 QString graphicsFilePath() const; 0050 QDateTime lastModified() const; 0051 QSet<QString> supportedFeatures() const; 0052 0053 bool operator==(const KCardTheme &theme) const; 0054 bool operator!=(const KCardTheme &theme) const; 0055 0056 private: 0057 QSharedDataPointer<const KCardThemePrivate> d; 0058 }; 0059 0060 Q_DECLARE_METATYPE(KCardTheme) 0061 0062 #endif