Changeset 170 for smplayer/trunk/src/images.h
- Timestamp:
- Oct 9, 2014, 2:54:21 PM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 168
- Property svn:mergeinfo changed
-
smplayer/trunk/src/images.h
r165 r170 17 17 */ 18 18 19 #ifndef _IMAGES_H_20 #define _IMAGES_H_19 #ifndef IMAGES_H 20 #define IMAGES_H 21 21 22 #include <QString> 22 23 #include <QPixmap> 23 #include <QString>24 24 #include <QIcon> 25 25 26 /* Warning: don't use this until global->preferences is created! */ 26 #define USE_RESOURCES 27 #define SMCODE 28 27 29 class Images 28 30 { 29 31 30 32 public: 31 static QPixmap icon(QString name, int size=-1, bool png = true);32 static QPixmap flippedIcon(QString name, int size=-1, bool png = true);33 static void setThemesPath(const QString & folder); 34 static void setTheme(const QString & name); 33 35 34 static QPixmap resize(QPixmap *p, int size=20);35 static QPixmap flip (QPixmap *p);36 static QPixmap icon(QString name, int size=-1); 37 static QPixmap flippedIcon(QString name, int size=-1); 36 38 37 39 //! Returns the filename of the icon 38 40 static QString file(const QString & icon_name); 39 41 40 static QIcon multiIcon(QString name, QString fallback_icon); 41 42 #ifdef SMCODE 42 43 static QString styleSheet(); 43 44 static QString themesDirectory(); 45 #endif 44 46 45 47 private: 46 //! Return the filename for the icon47 static Q String filename(const QString & name, bool png);48 static QPixmap resize(QPixmap *p, int size=20); 49 static QPixmap flip(QPixmap *p); 48 50 49 //! Try to load an icon. \a icon_name is the filename of the 50 //! icon without path. Return a null pixmap if loads fails. 51 static QPixmap loadIcon(const QString & icon_name); 51 static QString current_theme; 52 static QString themes_path; 53 54 #ifdef USE_RESOURCES 55 static QString resourceFilename(); 56 static QString last_resource_loaded; 57 #endif 52 58 }; 53 59 54 60 #endif 55
Note:
See TracChangeset
for help on using the changeset viewer.