summaryrefslogtreecommitdiffstats
path: root/client/imageholder.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:28:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-24 02:28:08 +0000
commitf9c5bc16e192997a25a9547b4173551bab70630a (patch)
treea701b520cf924c8588305b6e6fdd0748070bd542 /client/imageholder.h
downloadtwin-style-crystal-f9c5bc16e192997a25a9547b4173551bab70630a.tar.gz
twin-style-crystal-f9c5bc16e192997a25a9547b4173551bab70630a.zip
Added KDE3 version of kwin Crystal style
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kwin-style-crystal@1095345 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'client/imageholder.h')
-rw-r--r--client/imageholder.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/client/imageholder.h b/client/imageholder.h
new file mode 100644
index 0000000..b88ac87
--- /dev/null
+++ b/client/imageholder.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * Copyright (C) 2006 by Sascha Hlusiak *
+ * Spam84@gmx.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+
+#ifndef _IMAGEHOLDER_INCLUDED_
+#define _IMAGEHOLDER_INCLUDED_
+
+
+#include <kwinmodule.h>
+#include "myrootpixmap.h"
+
+struct WND_CONFIG;
+
+class QImageHolder:public QObject
+{
+ Q_OBJECT
+public:
+ QImageHolder(QImage act,QImage inact);
+ virtual ~QImageHolder();
+
+ void Init();
+ QPixmap *image(bool active) { Init(); return active?img_active:img_inactive; }
+ void repaint(bool force);
+
+ void setUserdefinedPictures(QImage act,QImage inact);
+
+private:
+ bool initialized;
+ KMyRootPixmap *rootpixmap;
+ QPixmap *img_active,*img_inactive;
+ bool userdefinedActive,userdefinedInactive;
+
+ QPixmap* ApplyEffect(QImage &src,WND_CONFIG* cfg,QColorGroup colorgroup);
+
+public slots:
+ void BackgroundUpdated(const QImage *);
+ void handleDesktopChanged(int desk);
+ void CheckSanity();
+
+signals:
+ void repaintNeeded();
+};
+
+
+#endif