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
|
@ -53,133 +53,383 @@ Skin::Skin (Skin *other, const QString &url)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* handler methods
|
||||
*/
|
||||
|
||||
bool
|
||||
Skin::setSkin (const QString& name)
|
||||
Skin::handle_main (const QPixmap &img)
|
||||
{
|
||||
m_path = name;
|
||||
|
||||
m_items.clear();
|
||||
m_letterMap.clear();
|
||||
m_smallNumbers.clear ();
|
||||
m_numbers.clear();
|
||||
m_pledit_txt.clear();
|
||||
m_playlist.clear ();
|
||||
|
||||
if (!( BuildButtons() &&
|
||||
BuildToggleButtons() &&
|
||||
BuildTitleBar() &&
|
||||
BuildOther() &&
|
||||
BuildEqualizer () &&
|
||||
BuildLetterMap() &&
|
||||
BuildSliders() &&
|
||||
ParsePLEdit() &&
|
||||
BuildNumbers() &&
|
||||
BuildPlaylist () )) {
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
m_items[MAIN_WINDOW] = img;
|
||||
m_items[ABOUT_0] = img.copy(247, 83, 20, 25);
|
||||
m_items[ABOUT_1] = img.copy(247, 83, 20, 24);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_titlebar (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_MENU] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (9, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_MINIMIZE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (18, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (18, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_CLOSE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 18, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 18, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_SHADE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 27, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 27, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_SHADED_UNSHADE] = icon;
|
||||
|
||||
m_items[TITLEBAR_0] = img.copy(27, 0, 275, 14);
|
||||
m_items[TITLEBAR_1] = img.copy(27, 15, 275, 14);
|
||||
|
||||
m_items[STATUSBAR_0] = img.copy(27, 29, 275, 14);
|
||||
m_items[STATUSBAR_1] = img.copy(27, 29+13, 275, 14);
|
||||
|
||||
m_items[CLUTTER_ON] = img.copy(304+8*0, 0, 8, 43);
|
||||
m_items[CLUTTER_OFF] = img.copy(304+8*1, 0, 8, 43);
|
||||
|
||||
m_items[CLUTTER_O] = img.copy(304+8*0, 44, 8, 43);
|
||||
m_items[CLUTTER_A] = img.copy(304+8*1, 44, 8, 43);
|
||||
m_items[CLUTTER_I] = img.copy(304+8*2, 44, 8, 43);
|
||||
m_items[CLUTTER_D] = img.copy(304+8*3, 44, 8, 43);
|
||||
m_items[CLUTTER_V] = img.copy(304+8*4, 44, 8, 43);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_posbar (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
const int h = qMin (10, img.height ());
|
||||
m_sizes[SLIDER_POSBAR_BGS] = QSize (248, h);
|
||||
m_items[POSBAR] = img.copy (0, 0, 248, h);
|
||||
m_items[POSBAR_BTN_0] = img.copy (248, 0, 29, h);
|
||||
m_items[POSBAR_BTN_1] = img.copy (278, 0, 29, h);
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_volume (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QPixmapList list;
|
||||
for (int i = 0; i <= 27; i++) {
|
||||
list << img.copy(0, i*15, qMin (68, img.width()), 13);
|
||||
}
|
||||
m_backgrounds[SLIDER_VOLUMEBAR_BGS] = list;
|
||||
|
||||
if (img.height() > 421) {
|
||||
m_items[VOLBAR_BTN_1] = img.copy (0, 422, 14,
|
||||
qMin (11, img.height () - 422));
|
||||
m_items[VOLBAR_BTN_0] = img.copy (15, 422, 14,
|
||||
qMin (11, img.height () - 422));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const QPixmap
|
||||
Skin::getPixmap (const QString& file, const QString &path)
|
||||
{
|
||||
/* check for files in zip and check if file exists */
|
||||
|
||||
QDir dir (path);
|
||||
dir.setFilter (QDir::Files|QDir::NoDotAndDotDot);
|
||||
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
QString fname = fileInfo.fileName().toLower();
|
||||
if (fname.section(".", 0, 0) == file) {
|
||||
return QPixmap (fileInfo.filePath());
|
||||
}
|
||||
}
|
||||
|
||||
return QPixmap ();
|
||||
}
|
||||
|
||||
|
||||
const QPixmap
|
||||
Skin::getPixmap (const QString& file)
|
||||
{
|
||||
return getPixmap (file, m_path);
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::ParsePLEdit (void)
|
||||
Skin::handle_balance (const QPixmap &img)
|
||||
{
|
||||
QDir dir;
|
||||
QString path;
|
||||
|
||||
dir.setPath (m_path);
|
||||
dir.setFilter (QDir::Files|QDir::NoDotAndDotDot);
|
||||
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
if (fileInfo.fileName().toLower() == "pledit.txt") {
|
||||
path += fileInfo.filePath ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (path.isNull ()) {
|
||||
qDebug ("trasigt!");
|
||||
return false;
|
||||
}
|
||||
|
||||
QFile file (path);
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
while (!file.atEnd ()) {
|
||||
QByteArray line = file.readLine ();
|
||||
QList<QByteArray> l = line.split ('=');
|
||||
if (l.count () == 2) {
|
||||
m_pledit_txt[l[0].toLower ()] = l[1].trimmed();
|
||||
} else if (line.length() == 0) {
|
||||
break;
|
||||
}
|
||||
QPixmap p;
|
||||
QPixmapList list;
|
||||
|
||||
list << img.copy (9, 15, 38, 13);
|
||||
for (int i = 1; i < 28; i++) {
|
||||
// use p to make use of Qt implicit sharing (I think it will not
|
||||
// work if appended and prepended Images are copied seperately)
|
||||
p = img.copy(9, i*15, 38, 13);
|
||||
list.append (p);
|
||||
list.prepend (p);
|
||||
}
|
||||
m_backgrounds[SLIDER_BALANCEBAR_BGS] = list;
|
||||
|
||||
if (img.height() > 421) {
|
||||
m_items[BALANCE_BTN_1] = img.copy(0, 422, 14,
|
||||
qMin (11, img.height () - 422));
|
||||
m_items[BALANCE_BTN_0] = img.copy(15, 422, 14,
|
||||
qMin (11, img.height () - 422));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_cbuttons (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PREV] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (23, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (23, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PLAY] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (46, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (46, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PAUSE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (69, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (69, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_STOP] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (92, 0, 22, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (92, 18, 22, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_NEXT] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (114, 0, 22, 16), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (114, 16, 22, 16), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_EJECT] = icon;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::BuildEqualizer (void)
|
||||
Skin::handle_monoster (const QPixmap &img)
|
||||
{
|
||||
QPixmap img = getPixmap ("eqmain");
|
||||
// eq_ex is optional, so this Pixmap can be null. check before using it
|
||||
QPixmap imgex = getPixmap ("eq_ex");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
m_items[MONO_1] = img.copy(29, 0, 27, 12);
|
||||
m_items[MONO_0] = img.copy(29, 12, 27, 12);
|
||||
m_items[STEREO_1] = img.copy(0, 0, 29, 12);
|
||||
m_items[STEREO_0] = img.copy(0, 12, 29, 12);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_playpaus (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QPixmap part;
|
||||
QPainter painter;
|
||||
|
||||
const int h = qMin (img.height (), 9);
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 3, h, img, 36, 0, 3, h);
|
||||
painter.drawPixmap (3, 0, 8, h, img, 1, 0, 8, h);
|
||||
painter.end();
|
||||
m_items[PIC_PLAY] = part;
|
||||
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 2, h, img, 27, 0, 2, h);
|
||||
painter.drawPixmap (2, 0, 9, h, img, 9, 0, 9, h);
|
||||
painter.end();
|
||||
m_items[PIC_PAUSE] = part;
|
||||
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 2, h, img, 27, 0, 2, h);
|
||||
painter.drawPixmap (2, 0, 9, h, img, 18, 0, 9, h);
|
||||
painter.end();
|
||||
m_items[PIC_STOP] = part;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_shufrep (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy ( 0, 61, 23, 12), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (46, 61, 23, 12), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy ( 0, 73, 23, 12), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (46, 73, 23, 12), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_EQ] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (23, 61, 23, 12), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (69, 61, 23, 12), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (23, 73, 23, 12), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (69, 73, 23, 12), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_PLS] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (28, 0, 46, 15), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (28, 15, 46, 15), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (28, 30, 46, 15), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (28, 45, 46, 15), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_SHUFFLE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 0, 28, 15), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 15, 28, 15), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 30, 28, 15), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (0, 45, 28, 15), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_REPEAT] = icon;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_text (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QList<QList<QPixmap> >(letters);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
QList<QPixmap>(l);
|
||||
for (int j = 0; j < 31; j++) {
|
||||
l.append(img.copy(j*5, i*6, 5, 6));
|
||||
}
|
||||
letters.append(l);
|
||||
}
|
||||
|
||||
/* alphabet */
|
||||
for (uint i = 97; i < 123; i++) {
|
||||
m_letterMap[i] = letters[0][i-97];
|
||||
}
|
||||
|
||||
/* digits */
|
||||
for (uint i = 0; i <= 9; i++) {
|
||||
m_letterMap[i+48] = letters[1][i];
|
||||
m_smallNumbers [i] = letters[1][i];
|
||||
}
|
||||
|
||||
/* special characters */
|
||||
m_letterMap['"'] = letters[0][27];
|
||||
m_letterMap['@'] = letters[0][28];
|
||||
m_letterMap[':'] = letters[1][12];
|
||||
m_letterMap['('] = letters[1][13];
|
||||
m_letterMap[')'] = letters[1][14];
|
||||
m_letterMap['-'] = letters[1][15];
|
||||
m_letterMap['\''] = letters[1][16];
|
||||
m_letterMap['`'] = letters[1][16];
|
||||
m_letterMap['!'] = letters[1][17];
|
||||
m_letterMap['_'] = letters[1][18];
|
||||
m_letterMap['+'] = letters[1][19];
|
||||
m_letterMap['\\'] = letters[1][20];
|
||||
m_letterMap['/'] = letters[1][21];
|
||||
m_letterMap['['] = letters[1][22];
|
||||
m_letterMap[']'] = letters[1][23];
|
||||
m_letterMap['^'] = letters[1][24];
|
||||
m_letterMap['&'] = letters[1][25];
|
||||
m_letterMap['%'] = letters[1][26];
|
||||
m_letterMap['.'] = letters[1][27];
|
||||
m_letterMap[','] = letters[1][27];
|
||||
m_letterMap['='] = letters[1][28];
|
||||
m_letterMap['$'] = letters[1][29];
|
||||
m_letterMap['#'] = letters[1][30];
|
||||
|
||||
m_letterMap[229] = letters[2][0];
|
||||
m_letterMap[246] = letters[2][1];
|
||||
m_letterMap[228] = letters[2][2];
|
||||
m_letterMap['?'] = letters[2][3];
|
||||
m_letterMap['*'] = letters[2][4];
|
||||
m_letterMap[' '] = letters[2][5];
|
||||
|
||||
/* text background */
|
||||
m_items[TEXTBG] = letters[2][6];
|
||||
|
||||
m_smallNumbers[10] = letters[2][6];
|
||||
m_smallNumbers[-1] = m_smallNumbers[10]; // also add Blank to index -1
|
||||
m_smallNumbers[11] = letters[1][15];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_numbers (const QPixmap &img)
|
||||
{
|
||||
// This method handles both nums_ex and the fallback numbers
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
const int num = (img.width () >= 9 * 12) ? 12 : 11;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
m_numbers[i] = img.copy (i*9, 0, 9, qMin (13, img.height ()));
|
||||
}
|
||||
m_numbers[-1] = m_numbers[10]; // add Blank space to index -1
|
||||
|
||||
if (num < 12) {
|
||||
// We do not yet have a '-' Symbol, so we create one
|
||||
// from the '2' character and the blank as background
|
||||
QPixmap pix = m_numbers[10].copy ();
|
||||
QRect r (3, 6, 3, 1);
|
||||
QPainter painter (&pix);
|
||||
painter.drawPixmap (r, m_numbers[2], r);
|
||||
m_numbers[11] = pix;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_eqmain (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
m_items[EQ_WIN_BG] = img.copy (0, 0, 275, 116);
|
||||
|
||||
if (img.height () > 294) {
|
||||
m_items[EQ_WIN_GRAPH_BG] = img.copy (0, 294, 113, qMin (19, img.height () - 294));
|
||||
m_items[EQ_WIN_GRAPH_BG] =
|
||||
img.copy (0, 294, 113, qMin (19, img.height () - 294));
|
||||
} else {
|
||||
m_items[EQ_WIN_GRAPH_BG] = QPixmap ();
|
||||
}
|
||||
|
||||
QIcon icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy ( 0, 116, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy ( 0, 125, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_EQ_CLOSE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (254, 3, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
if (!imgex.isNull ()) {
|
||||
icon.addPixmap (imgex.copy ( 1, 38, 9, 9), QIcon::Active, QIcon::Off);
|
||||
}
|
||||
m_icons[BUTTON_EQ_SHADE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy ( 10, 119, 25, 12), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (128, 119, 25, 12), QIcon::Active, QIcon::Off);
|
||||
|
@ -199,6 +449,10 @@ Skin::BuildEqualizer (void)
|
|||
icon.addPixmap (img.copy (224, 176, 44, 12), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_EQ_PRESET] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (254, 3, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
m_icons[BUTTON_EQ_SHADE] = icon;
|
||||
|
||||
QPixmapList list;
|
||||
for (int i = 0; i < 14; i++) {
|
||||
list << img.copy (13+15*i, 164, 14, 63);
|
||||
|
@ -215,14 +469,27 @@ Skin::BuildEqualizer (void)
|
|||
}
|
||||
|
||||
bool
|
||||
Skin::BuildPlaylist (void)
|
||||
Skin::handle_eq_ex (const QPixmap &img)
|
||||
{
|
||||
QPixmap img = getPixmap ("pledit");
|
||||
// This method has to be called after handle_eqmain!
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
m_icons[BUTTON_EQ_SHADE].addPixmap (img.copy ( 1, 38, 9, 9),
|
||||
QIcon::Active, QIcon::Off);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::handle_pledit (const QPixmap &img)
|
||||
{
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (167, 3, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy ( 52, 42, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_PLS_CLOSE] = icon;
|
||||
|
@ -335,353 +602,161 @@ Skin::BuildPlaylist (void)
|
|||
/* misc button */
|
||||
m_playlist[PLS_MSC_BTN_0] = img.copy(54, 168, 22, 18);
|
||||
m_playlist[PLS_MSC_BTN_1] = img.copy(77, 168, 22, 18);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Skin::BuildLetterMap (void)
|
||||
Skin::handle_pledit_txt (QIODevice *device)
|
||||
{
|
||||
QPixmap img = getPixmap("text");
|
||||
Q_ASSERT (device != 0);
|
||||
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
device->setTextModeEnabled (true);
|
||||
|
||||
QList<QList<QPixmap> >(letters);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
QList<QPixmap>(l);
|
||||
for (int j = 0; j < 31; j++) {
|
||||
l.append(img.copy(j*5, i*6, 5, 6));
|
||||
while (!device->atEnd ()) {
|
||||
QByteArray line = device->readLine ().trimmed ();
|
||||
if (line.length () == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QList<QByteArray> l = line.split ('=');
|
||||
if (l.count () == 2) {
|
||||
m_pledit_txt[l[0].toLower ().trimmed ()] = l[1].trimmed();
|
||||
}
|
||||
letters.append(l);
|
||||
}
|
||||
|
||||
/* alphabet */
|
||||
for (uint i = 97; i < 123; i++) {
|
||||
m_letterMap[i] = letters[0][i-97];
|
||||
}
|
||||
|
||||
/* digits */
|
||||
for (uint i = 0; i <= 9; i++) {
|
||||
m_letterMap[i+48] = letters[1][i];
|
||||
m_smallNumbers [i] = letters[1][i];
|
||||
}
|
||||
|
||||
/* special characters */
|
||||
m_letterMap['"'] = letters[0][27];
|
||||
m_letterMap['@'] = letters[0][28];
|
||||
m_letterMap[':'] = letters[1][12];
|
||||
m_letterMap['('] = letters[1][13];
|
||||
m_letterMap[')'] = letters[1][14];
|
||||
m_letterMap['-'] = letters[1][15];
|
||||
m_letterMap['\''] = letters[1][16];
|
||||
m_letterMap['`'] = letters[1][16];
|
||||
m_letterMap['!'] = letters[1][17];
|
||||
m_letterMap['_'] = letters[1][18];
|
||||
m_letterMap['+'] = letters[1][19];
|
||||
m_letterMap['\\'] = letters[1][20];
|
||||
m_letterMap['/'] = letters[1][21];
|
||||
m_letterMap['['] = letters[1][22];
|
||||
m_letterMap[']'] = letters[1][23];
|
||||
m_letterMap['^'] = letters[1][24];
|
||||
m_letterMap['&'] = letters[1][25];
|
||||
m_letterMap['%'] = letters[1][26];
|
||||
m_letterMap['.'] = letters[1][27];
|
||||
m_letterMap[','] = letters[1][27];
|
||||
m_letterMap['='] = letters[1][28];
|
||||
m_letterMap['$'] = letters[1][29];
|
||||
m_letterMap['#'] = letters[1][30];
|
||||
|
||||
m_letterMap[229] = letters[2][0];
|
||||
m_letterMap[246] = letters[2][1];
|
||||
m_letterMap[228] = letters[2][2];
|
||||
m_letterMap['?'] = letters[2][3];
|
||||
m_letterMap['*'] = letters[2][4];
|
||||
m_letterMap[' '] = letters[2][5];
|
||||
|
||||
/* text background */
|
||||
m_items[TEXTBG] = letters[2][6];
|
||||
|
||||
m_smallNumbers[10] = letters[2][6];
|
||||
m_smallNumbers[-1] = m_smallNumbers[10]; // also add Blank to index -1
|
||||
m_smallNumbers[11] = letters[1][15];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---legacy code start ---
|
||||
*/
|
||||
|
||||
bool
|
||||
Skin::BuildButtons (void)
|
||||
Skin::setSkin (const QString& path)
|
||||
{
|
||||
QPixmap img = getPixmap("cbuttons");
|
||||
|
||||
if (img.isNull ())
|
||||
QDir dir(path);
|
||||
if (!dir.exists ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
icon.addPixmap (img.copy (0, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PREV] = icon;
|
||||
m_path = path;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (23, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (23, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PLAY] = icon;
|
||||
m_items.clear();
|
||||
m_letterMap.clear();
|
||||
m_smallNumbers.clear ();
|
||||
m_numbers.clear();
|
||||
m_pledit_txt.clear();
|
||||
m_playlist.clear ();
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (46, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (46, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_PAUSE] = icon;
|
||||
bool b_main = false, b_titlebar = false, b_posbar = false, b_volume = false;
|
||||
bool b_balance = false, b_cbuttons = false, b_monoster = false;
|
||||
bool b_playpaus = false, b_shufrep = false, b_text = false;
|
||||
bool b_numbers = false, b_eqmain = false, b_pledit = false;
|
||||
bool b_pledit_txt = false;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (69, 0, 23, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (69, 18, 23, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_STOP] = icon;
|
||||
QPixmap p_eq_ex;
|
||||
QPixmap p_numbers;
|
||||
QPixmap p_volume;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (92, 0, 22, 18), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (92, 18, 22, 18), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_NEXT] = icon;
|
||||
dir.setFilter (QDir::Files|QDir::NoDotAndDotDot);
|
||||
QStringList entries = dir.entryList ();
|
||||
for (int i = 0; i < entries.size (); i++) {
|
||||
QString filename = entries.at (i);
|
||||
QString entry = filename.toLower ();
|
||||
if (entry.endsWith (".txt")) {
|
||||
QFile f (dir.absoluteFilePath (filename));
|
||||
if (!f.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
continue;
|
||||
if ( entry == "pledit.txt") {
|
||||
b_pledit_txt = handle_pledit_txt (&f);
|
||||
}
|
||||
continue;
|
||||
} else if (entry.endsWith (".cur")) {
|
||||
// Cursor files are not supported yet
|
||||
continue;
|
||||
} else {
|
||||
QPixmap img = QPixmap (dir.absoluteFilePath (filename));
|
||||
if (img.isNull ()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (114, 0, 22, 16), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (114, 16, 22, 16), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_EJECT] = icon;
|
||||
return true;
|
||||
entry = entry.section(".", 0, 0);
|
||||
if (entry == "main") {
|
||||
b_main = handle_main (img);
|
||||
} else if (entry == "titlebar") {
|
||||
b_titlebar = handle_titlebar (img);
|
||||
} else if (entry == "posbar" ) {
|
||||
b_posbar = handle_posbar (img);
|
||||
} else if (entry == "volume") {
|
||||
p_volume = img;
|
||||
b_volume = handle_volume (img);
|
||||
} else if (entry == "balance") {
|
||||
b_balance = handle_balance (img);
|
||||
} else if (entry == "cbuttons") {
|
||||
b_cbuttons = handle_cbuttons (img);
|
||||
} else if (entry == "monoster") {
|
||||
b_monoster = handle_monoster (img);
|
||||
} else if (entry == "playpaus") {
|
||||
b_playpaus = handle_playpaus (img);
|
||||
} else if (entry == "shufrep") {
|
||||
b_shufrep = handle_shufrep (img);
|
||||
} else if (entry == "text") {
|
||||
b_text = handle_text (img);
|
||||
} else if (entry == "nums_ex") {
|
||||
b_numbers = handle_numbers (img);
|
||||
} else if (entry == "numbers") {
|
||||
p_numbers = img;
|
||||
} else if (entry == "eqmain") {
|
||||
b_eqmain = handle_eqmain (img);
|
||||
} else if (entry == "eq_ex") {
|
||||
p_eq_ex = img;
|
||||
} else if (entry == "pledit") {
|
||||
b_pledit = handle_pledit (img);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!b_balance) {
|
||||
// Fallback, use volume image if skin has no balance image
|
||||
handle_balance (p_volume);
|
||||
}
|
||||
if (!b_numbers) {
|
||||
// Fallback if skin has no nums_ex file
|
||||
b_numbers = handle_numbers (p_numbers);
|
||||
}
|
||||
|
||||
// handle_eq_ex must be called after handle_eqmain
|
||||
if (b_eqmain) {
|
||||
handle_eq_ex (p_eq_ex);
|
||||
}
|
||||
|
||||
return (b_main && b_titlebar && b_posbar && b_volume && b_cbuttons &&
|
||||
b_monoster && b_playpaus && b_shufrep && b_text && b_numbers &&
|
||||
b_eqmain && b_pledit && b_pledit_txt);
|
||||
}
|
||||
|
||||
const QPixmap
|
||||
Skin::getPixmap (const QString& file, const QString &path)
|
||||
{
|
||||
QDir dir (path);
|
||||
dir.setFilter (QDir::Files|QDir::NoDotAndDotDot);
|
||||
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
QString fname = fileInfo.fileName().toLower();
|
||||
if (fname.section(".", 0, 0) == file) {
|
||||
return QPixmap (fileInfo.filePath());
|
||||
}
|
||||
}
|
||||
|
||||
return QPixmap ();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Skin::BuildToggleButtons (void)
|
||||
{
|
||||
QPixmap img = getPixmap("shufrep");
|
||||
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
icon.addPixmap (img.copy ( 0, 61, 23, 12), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (46, 61, 23, 12), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy ( 0, 73, 23, 12), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (46, 73, 23, 12), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_EQ] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (23, 61, 23, 12), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (69, 61, 23, 12), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (23, 73, 23, 12), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (69, 73, 23, 12), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_PLS] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (28, 0, 46, 15), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (28, 15, 46, 15), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (28, 30, 46, 15), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (28, 45, 46, 15), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_SHUFFLE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 0, 28, 15), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 15, 28, 15), QIcon::Active, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 30, 28, 15), QIcon::Normal, QIcon::On);
|
||||
icon.addPixmap (img.copy (0, 45, 28, 15), QIcon::Active, QIcon::On);
|
||||
m_icons[BUTTON_MW_REPEAT] = icon;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Skin::BuildTitleBar (void)
|
||||
{
|
||||
QPixmap img = getPixmap("titlebar");
|
||||
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
QIcon icon;
|
||||
icon.addPixmap (img.copy (0, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (0, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_MENU] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (9, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_MINIMIZE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (18, 0, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (18, 9, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_CLOSE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 18, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 18, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_SHADE] = icon;
|
||||
|
||||
icon = QIcon ();
|
||||
icon.addPixmap (img.copy (0, 27, 9, 9), QIcon::Normal, QIcon::Off);
|
||||
icon.addPixmap (img.copy (9, 27, 9, 9), QIcon::Active, QIcon::Off);
|
||||
m_icons[BUTTON_MW_SHADED_UNSHADE] = icon;
|
||||
|
||||
m_items[TITLEBAR_0] = img.copy(27, 0, 275, 14);
|
||||
m_items[TITLEBAR_1] = img.copy(27, 15, 275, 14);
|
||||
|
||||
m_items[STATUSBAR_0] = img.copy(27, 29, 275, 14);
|
||||
m_items[STATUSBAR_1] = img.copy(27, 29+13, 275, 14);
|
||||
|
||||
m_items[CLUTTER_ON] = img.copy(304+8*0, 0, 8, 43);
|
||||
m_items[CLUTTER_OFF] = img.copy(304+8*1, 0, 8, 43);
|
||||
|
||||
m_items[CLUTTER_O] = img.copy(304+8*0, 44, 8, 43);
|
||||
m_items[CLUTTER_A] = img.copy(304+8*1, 44, 8, 43);
|
||||
m_items[CLUTTER_I] = img.copy(304+8*2, 44, 8, 43);
|
||||
m_items[CLUTTER_D] = img.copy(304+8*3, 44, 8, 43);
|
||||
m_items[CLUTTER_V] = img.copy(304+8*4, 44, 8, 43);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Skin::BuildOther (void)
|
||||
{
|
||||
QPixmap img, part;
|
||||
QPainter(painter);
|
||||
|
||||
img = getPixmap("monoster");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
m_items[MONO_1] = img.copy(29, 0, 27, 12);
|
||||
m_items[MONO_0] = img.copy(29, 12, 27, 12);
|
||||
m_items[STEREO_1] = img.copy(0, 0, 29, 12);
|
||||
m_items[STEREO_0] = img.copy(0, 12, 29, 12);
|
||||
|
||||
|
||||
img = getPixmap("playpaus");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
int h = qMin (img.height (), 9);
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 3, h, img, 36, 0, 3, h);
|
||||
painter.drawPixmap (3, 0, 8, h, img, 1, 0, 8, h);
|
||||
painter.end();
|
||||
m_items[PIC_PLAY] = part;
|
||||
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 2, h, img, 27, 0, 2, h);
|
||||
painter.drawPixmap (2, 0, 9, h, img, 9, 0, 9, h);
|
||||
painter.end();
|
||||
m_items[PIC_PAUSE] = part;
|
||||
|
||||
part = QPixmap(11, h);
|
||||
painter.begin(&part);
|
||||
painter.drawPixmap (0, 0, 2, h, img, 27, 0, 2, h);
|
||||
painter.drawPixmap (2, 0, 9, h, img, 18, 0, 9, h);
|
||||
painter.end();
|
||||
m_items[PIC_STOP] = part;
|
||||
|
||||
|
||||
img = getPixmap ("main");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
m_items[MAIN_WINDOW] = img;
|
||||
m_items[ABOUT_0] = img.copy(247, 83, 20, 25);
|
||||
m_items[ABOUT_1] = img.copy(247, 83, 20, 24);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Skin::BuildSliders (void)
|
||||
{
|
||||
QPixmap img;
|
||||
|
||||
img = getPixmap("posbar");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
int h = qMin (10, img.height ());
|
||||
m_sizes[SLIDER_POSBAR_BGS] = QSize (248, h);
|
||||
m_items[POSBAR] = img.copy (0, 0, 248, h);
|
||||
m_items[POSBAR_BTN_0] = img.copy (248, 0, 29, h);
|
||||
m_items[POSBAR_BTN_1] = img.copy (278, 0, 29, h);
|
||||
|
||||
|
||||
QPixmapList list;
|
||||
img = getPixmap("volume");
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
for (int i = 0; i <= 27; i++) {
|
||||
list << img.copy(0, i*15, qMin (68, img.width()), 13);
|
||||
}
|
||||
m_backgrounds[SLIDER_VOLUMEBAR_BGS] = list;
|
||||
|
||||
if (img.height() > 421) {
|
||||
m_items[VOLBAR_BTN_1] = img.copy (0, 422, 14, qMin (11, img.height () - 422));
|
||||
m_items[VOLBAR_BTN_0] = img.copy (15, 422, 14, qMin (11, img.height () - 422));
|
||||
}
|
||||
|
||||
list.clear ();
|
||||
QPixmap p;
|
||||
img = getPixmap("balance");
|
||||
if (img.isNull ()) {
|
||||
img = getPixmap("volume");
|
||||
}
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
list << img.copy (9, 15, 38, 13);
|
||||
for (int i = 1; i < 28; i++) {
|
||||
// use p to make use of Qt implicit sharing (I think it will not
|
||||
// work if appended and prepended Images are copied seperately)
|
||||
p = img.copy(9, i*15, 38, 13);
|
||||
list.append (p);
|
||||
list.prepend (p);
|
||||
}
|
||||
m_backgrounds[SLIDER_BALANCEBAR_BGS] = list;
|
||||
|
||||
if (img.height() > 421) {
|
||||
m_items[BALANCE_BTN_1] = img.copy(0, 422, 14, qMin (11, img.height () - 422));
|
||||
m_items[BALANCE_BTN_0] = img.copy(15, 422, 14, qMin (11, img.height () - 422));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Skin::BuildNumbers (void)
|
||||
{
|
||||
int num = 12;
|
||||
|
||||
QPixmap img = getPixmap("nums_ex");
|
||||
if (img.isNull ()) {
|
||||
num = 11;
|
||||
img = getPixmap ("numbers");
|
||||
}
|
||||
if (img.isNull ())
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
m_numbers[i] = img.copy (i*9, 0, 9, qMin (13, img.height ()));
|
||||
}
|
||||
m_numbers[-1] = m_numbers[10]; // add Blank space to index -1
|
||||
if (num < 12) {
|
||||
// We do not yet have a '-' Symbol, so we create one
|
||||
// from the '2' character and the blank as background
|
||||
QPixmap pix = m_numbers[10].copy ();
|
||||
QRect r (3, 6, 3, 1);
|
||||
QPainter painter (&pix);
|
||||
painter.drawPixmap (r, m_numbers[2], r);
|
||||
m_numbers[11] = pix;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializer functions for sizes and positions
|
||||
*/
|
||||
|
||||
void
|
||||
Skin::setSizes ()
|
||||
|
|
|
@ -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