OTHER: rewrite Skin.cpp's image handler functions
I plan to further update it to a completely iterator based approach and add archive support (through freebsd's libarchive library). The old code would have had very bad performance for some archives, as every file was searched seperately in a directory. Now, a directory is only scanned once. There also should be no additional performance cost for the string comparisons, as the old code used roughly the same amount of string comparisons
This commit is contained in:
parent
ebbcea80b9
commit
0e0adba890
2 changed files with 507 additions and 427 deletions
|
|
@ -25,7 +25,7 @@
|
|||
#include <QIcon>
|
||||
#include <QPixmap>
|
||||
|
||||
class QDir;
|
||||
class QIODevice;
|
||||
|
||||
typedef QList <QPixmap> QPixmapList;
|
||||
typedef QMap <int, QPixmap> PixmapMap;
|
||||
|
|
@ -69,19 +69,24 @@ class Skin : public QObject
|
|||
void setSizes ();
|
||||
void setPositions ();
|
||||
|
||||
bool setSkin (const QString& name);
|
||||
// Methods to handle the files of a skin
|
||||
bool handle_main (const QPixmap &);
|
||||
bool handle_titlebar (const QPixmap &);
|
||||
bool handle_posbar (const QPixmap &);
|
||||
bool handle_volume (const QPixmap &);
|
||||
bool handle_balance (const QPixmap &);
|
||||
bool handle_cbuttons (const QPixmap &);
|
||||
bool handle_monoster (const QPixmap &);
|
||||
bool handle_playpaus (const QPixmap &);
|
||||
bool handle_shufrep (const QPixmap &);
|
||||
bool handle_text (const QPixmap &);
|
||||
bool handle_numbers (const QPixmap &);
|
||||
bool handle_eqmain (const QPixmap &);
|
||||
bool handle_eq_ex (const QPixmap &);
|
||||
bool handle_pledit (const QPixmap &);
|
||||
bool handle_pledit_txt (QIODevice *);
|
||||
|
||||
const QPixmap getPixmap (const QString& file);
|
||||
bool BuildLetterMap (void);
|
||||
bool BuildButtons (void);
|
||||
bool BuildToggleButtons (void);
|
||||
bool BuildTitleBar (void);
|
||||
bool BuildSliders (void);
|
||||
bool BuildOther (void);
|
||||
bool BuildNumbers (void);
|
||||
bool BuildPlaylist (void);
|
||||
bool ParsePLEdit (void);
|
||||
bool BuildEqualizer (void);
|
||||
bool setSkin (const QString& name);
|
||||
|
||||
bool m_valid;
|
||||
QString m_skinname;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue