File indexing completed on 2024-04-14 14:31:55

0001 /*
0002  * Copyright 1999 by Martin R. Jones <mjones@kde.org>
0003  * Copyright 2010 by Stefan Böhmann <kde@hilefoks.org>
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 2 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0018  */
0019 #ifndef AMORTHEMEMANAGER_H
0020 #define AMORTHEMEMANAGER_H
0021 
0022 #include <QHash>
0023 #include <QSize>
0024 #include <QSettings>
0025 
0026 class KConfig;
0027 class AmorAnimation;
0028 typedef QList<AmorAnimation*> AmorAnimationGroup;
0029 
0030 
0031 class AmorThemeManager
0032 {
0033     public:
0034         AmorThemeManager();
0035         virtual ~AmorThemeManager();
0036 
0037         bool setTheme(const QString &file);
0038         bool readGroup(const QString &seq);
0039         bool isStatic() const;
0040 
0041         AmorAnimation *random(const QString &group);
0042 
0043         QSize maximumSize() const;
0044 
0045     protected:
0046         QString mPath;
0047         QSettings *mConfig;
0048         QSize mMaximumSize;                              // The largest pixmap used
0049         QHash<QString, AmorAnimationGroup> mAnimations;  // list of animation groups
0050         bool mStatic;                                    // static image
0051 };
0052 
0053 
0054 #endif
0055 
0056 // kate: word-wrap off; encoding utf-8; indent-width 4; tab-width 4; line-numbers on; mixed-indent off; remove-trailing-space-save on; replace-tabs-save on; replace-tabs on; space-indent on;
0057 // vim:set spell et sw=4 ts=4 nowrap cino=l1,cs,U1: