00001 #ifndef __WASKIN__ 00002 #define __WASKIN__ 00003 00004 #include <qobject.h> 00005 #include <qimage.h> 00006 #include <qpixmap.h> 00007 #include "zipextract.h" 00008 00009 00010 class ControlPanel; 00011 class GButton; 00012 class GTextView; 00013 class GSlider; 00014 00015 class WASkin : public QObject 00016 { 00017 Q_OBJECT 00018 public: 00019 WASkin(ControlPanel *); 00020 WASkin(QString, QString, ControlPanel *); 00021 00022 void setMainWidget(QWidget &); 00023 void setControlButtons(GButton &, GButton &, GButton &, GButton &, GButton &, GButton &); 00024 void setOptionButtons(GButton &, GButton &, GButton &, GButton &); 00025 void setTextView(GTextView &, GTextView &, GTextView &); 00026 void setSliders(GSlider &, GSlider &, GSlider &); 00027 void setTitleButtons(GButton &, GButton &, GButton &); 00028 00029 QPixmap & getState(int); 00030 QPixmap & getNumber(int); 00031 00032 inline QSize getSize(void) const { return imageMain.size(); } 00033 inline QString getName(void) const { return name; } 00034 00035 public slots: 00036 void apply(void); 00037 void unload(void); 00038 00039 private: 00040 static bool isTransparent(QRgb p); 00041 00042 private: 00043 QString name; 00044 ZipExtract file; 00045 ControlPanel * panel; 00046 QPixmap imageMain; 00047 QPixmap imageButtons; 00048 QPixmap imageOption; 00049 QPixmap imageText; 00050 QPixmap imageVolume; 00051 QPixmap imageBalance; 00052 QPixmap imagePlayPaus; 00053 QPixmap imageNumbers; 00054 QPixmap imagePosition; 00055 QPixmap imageTitlebar; 00056 unsigned numbers; 00057 }; 00058 00059 #endif