KWin
coverbling.h
Go to the documentation of this file.00001 /* 00002 * Copyright (C) 2008 Rivo Laks <rivolaks@hot.ee> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef COVERBLING_H 00019 #define COVERBLING_H 00020 00021 #include <kgllib/glwidget.h> 00022 00023 namespace KGLLib 00024 { 00025 class Texture; 00026 } 00027 00028 00029 class CoverBling : public KGLLib::GLWidget 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 CoverBling(); 00035 ~CoverBling(); 00036 00037 protected: 00038 class Cover 00039 { 00040 public: 00041 KGLLib::Texture* tex; 00042 }; 00043 00044 void initializeGL(); 00045 void render(); 00046 void renderCover(const Cover& c, bool reflection); 00047 void renderCovers(bool reflection); 00048 00049 virtual void keyPressEvent(QKeyEvent* e); 00050 00051 private: 00052 QVector<Cover> covers; 00053 float current; 00054 float currentTarget; 00055 00056 }; 00057 00058 #endif
KDE 4.2 API Reference