Skin class now emits a signal when a skin has (hopefully) been loaded.
Widgets interested in such events handle the signal and update their pixmaps accordingly.
This commit is contained in:
parent
1b1cf78647
commit
9fb1376afe
15 changed files with 391 additions and 273 deletions
29
Skin.h
29
Skin.h
|
@ -18,17 +18,8 @@ class Skin : public QWidget
|
|||
Skin(string m_skinname);
|
||||
~Skin();
|
||||
|
||||
QPixmap *Pixmap (string file);
|
||||
void Parse (string file);
|
||||
void BuildLetterMap (void);
|
||||
void BuildButtons (void);
|
||||
void BuildToggleButtons (void);
|
||||
void BuildTitleBar (void);
|
||||
void BuildSliders (void);
|
||||
void BuildOther (void);
|
||||
void BuildNumbers (void);
|
||||
void Skin::ParsePLEdit (void);
|
||||
|
||||
void setSkin (QString name);
|
||||
|
||||
const QPixmap getItem (uint part) const { return m_items->value(part); }
|
||||
const QPixmap getVol (uint p) const { return m_volume_bar->value(p); }
|
||||
const QPixmap getBal (uint p) const { return m_balance->value(p); }
|
||||
|
@ -157,7 +148,18 @@ class Skin : public QWidget
|
|||
PIC_STOP,
|
||||
};
|
||||
private:
|
||||
QPixmap *Skin::GetPixmap (string file);
|
||||
QPixmap *Skin::getPixmap (string file);
|
||||
void Parse (string file);
|
||||
void BuildLetterMap (void);
|
||||
void BuildButtons (void);
|
||||
void BuildToggleButtons (void);
|
||||
void BuildTitleBar (void);
|
||||
void BuildSliders (void);
|
||||
void BuildOther (void);
|
||||
void BuildNumbers (void);
|
||||
void ParsePLEdit (void);
|
||||
|
||||
|
||||
string m_skinname;
|
||||
QString m_path;
|
||||
|
||||
|
@ -169,6 +171,9 @@ class Skin : public QWidget
|
|||
|
||||
QHash<QByteArray, QByteArray> *m_pledit_txt;
|
||||
QList<QPixmap *> m_buttons;
|
||||
|
||||
signals:
|
||||
void skinChanged (Skin *skin);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue