Converted default skin to PNG.

This commit is contained in:
Tobias Rundstrom 2006-03-05 18:51:08 -03:00
parent 828f1db087
commit 94404d0bc1
41 changed files with 112 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

BIN
CleanAMP/Eq_ex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

BIN
CleanAMP/GENEX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

BIN
CleanAMP/Gen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

BIN
CleanAMP/VIDEO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

BIN
CleanAMP/Volume.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

BIN
CleanAMP/balance.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
CleanAMP/cbuttons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

BIN
CleanAMP/eqmain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

BIN
CleanAMP/main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

BIN
CleanAMP/mb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
CleanAMP/monoster.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

BIN
CleanAMP/numbers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
CleanAMP/playpaus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

BIN
CleanAMP/pledit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

BIN
CleanAMP/posbar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 995 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

BIN
CleanAMP/shufrep.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

BIN
CleanAMP/text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

BIN
CleanAMP/titlebar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -5,6 +5,7 @@
#include <QFile>
#include <QIODevice>
#include <QDir>
#include <QSettings>
#include "qtmd5.h"
MedialibWindow::MedialibWindow (QWidget *parent) : QMainWindow (parent)
@ -12,6 +13,14 @@ MedialibWindow::MedialibWindow (QWidget *parent) : QMainWindow (parent)
#ifndef _WIN32
setWindowIcon (QIcon (":icon.png"));
#endif
setWindowTitle ("Promoe - Medialib Window");
QSettings s;
s.beginGroup ("medialib");
if (!s.contains ("selected")) {
s.setValue ("selected", tr ("Artists"));
}
resize (500, 550);
@ -39,6 +48,15 @@ MedialibWindow::MedialibWindow (QWidget *parent) : QMainWindow (parent)
m_tab->addTab (m_list, tr ("Albums"));
m_tab->addTab (new QWidget (m_tab), tr ("Songs"));
for (int i = 0; i < m_tab->count() ; i++) {
if (s.value("selected").toString () == m_tab->tabText (i)) {
m_tab->setCurrentIndex (i);
break;
}
}
s.endGroup ();
connect (m_search, SIGNAL (textEdited (QString)), m_list, SLOT (search (QString)));
}

View file

@ -30,6 +30,7 @@ SettingsWindow::SettingsWindow (QWidget *parent) : QMainWindow (parent)
QPushButton *ok = new QPushButton (tr ("OK"));
ok->setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
connect (ok, SIGNAL (clicked ()), this, SLOT (okButton ()));
connect (cancel, SIGNAL (clicked ()), this, SLOT (close ()));
hbox->addWidget (new QWidget (dummy2), 1);
hbox->addWidget (cancel);
@ -37,7 +38,7 @@ SettingsWindow::SettingsWindow (QWidget *parent) : QMainWindow (parent)
m_mainwindow = new SettingsTabMain (tab);
m_playlistwin = new SettingsTabPlaylist (tab);
m_medialib = new QWidget (tab);
m_medialib = new SettingsTabMedialib (tab);
tab->addTab (m_mainwindow, tr ("Main Window"));
tab->addTab (m_playlistwin, tr ("Playlist Window"));
@ -50,11 +51,56 @@ SettingsWindow::okButton (void)
XMMSHandler *xmmsh = XMMSHandler::getInstance ();
m_mainwindow->saveSettings ();
m_playlistwin->saveSettings ();
m_medialib->saveSettings ();
close ();
xmmsh->updateSettings ();
}
SettingsTabMedialib::SettingsTabMedialib (QWidget *parent) : QWidget (parent)
{
QSettings s;
s.beginGroup("medialib");
QWidget *dummy = new QWidget (this);
QVBoxLayout *vbox = new QVBoxLayout (dummy);
QWidget *c = new QWidget (dummy);
QHBoxLayout *h = new QHBoxLayout (c);
vbox->addWidget (c, 1);
m_selected = new QComboBox (c);
m_selected->addItem (tr ("Artists"));
m_selected->addItem (tr ("Albums"));
m_selected->addItem (tr ("Songs"));
m_selected->setEditable (false);
QString curr = s.value ("selected").toString ();
for (int i = 0; i < m_selected->count(); i++) {
if (m_selected->itemText (i) == curr) {
m_selected->setCurrentIndex (i);
break;
}
}
h->addWidget (m_selected);
QLabel *l = new QLabel (tr ("Selected tab on startup"), c);
h->addWidget (l, 1);
s.endGroup ();
}
void
SettingsTabMedialib::saveSettings ()
{
QSettings s;
s.setValue ("medialib/selected", m_selected->currentText ());
}
SettingsTabPlaylist::SettingsTabPlaylist (QWidget *parent) : QWidget (parent)
{
QSettings s;

View file

@ -9,6 +9,18 @@
#include <QHBoxLayout>
#include <QSpinBox>
#include <QLabel>
#include <QComboBox>
class SettingsTabMedialib : public QWidget {
Q_OBJECT
public:
SettingsTabMedialib (QWidget *parent);
~SettingsTabMedialib () {}
void saveSettings (void);
private:
QComboBox *m_selected;
};
class SettingsTabPlaylist : public QWidget {
Q_OBJECT
@ -53,7 +65,7 @@ class SettingsWindow : public QMainWindow {
private:
SettingsTabMain *m_mainwindow;
SettingsTabPlaylist *m_playlistwin;
QWidget *m_medialib;
SettingsTabMedialib *m_medialib;
};

View file

@ -32,7 +32,7 @@ Skin::BuildPlaylist (void)
{
QPixmap tmp;
QPixmap *img = getPixmap ("pledit.bmp");
QPixmap *img = getPixmap ("pledit");
m_playlist->insert (PLS_CORNER_UL_0, img->copy(0, 0, 25, 20));
m_playlist->insert (PLS_CORNER_UL_1, img->copy(0, 21, 25, 20));
@ -140,7 +140,8 @@ Skin::getPixmap (string file)
QFileInfoList list = dir.entryInfoList();
for (int i = 0; i < list.size(); ++i) {
QFileInfo fileInfo = list.at(i);
if (fileInfo.fileName().toLower() == f) {
QString fname = fileInfo.fileName().toLower();
if (fname.section(".", 0, 0) == f) {
return new QPixmap (fileInfo.filePath());
}
}
@ -152,7 +153,7 @@ Skin::getPixmap (string file)
void
Skin::BuildLetterMap (void)
{
QPixmap *img = getPixmap("text.bmp");
QPixmap *img = getPixmap("text");
QList<QList<QPixmap> >(letters);
for (int i = 0; i < 3; i++) {
@ -215,7 +216,7 @@ Skin::BuildLetterMap (void)
void
Skin::BuildButtons (void)
{
QPixmap *img = getPixmap("cbuttons.bmp");
QPixmap *img = getPixmap("cbuttons");
m_items->insert (BTN_PREV_0, img->copy(0, 0, 23, 18));
m_items->insert (BTN_PREV_1, img->copy(0, 18, 23, 18));
@ -242,7 +243,7 @@ Skin::BuildButtons (void)
void
Skin::BuildToggleButtons (void)
{
QPixmap *img = getPixmap("shufrep.bmp");
QPixmap *img = getPixmap("shufrep");
m_items->insert(REPEAT_ON_0, img->copy(0, 30, 28, 15));
m_items->insert(REPEAT_ON_1, img->copy(0, 45, 28, 15));
@ -275,7 +276,7 @@ Skin::BuildToggleButtons (void)
void
Skin::BuildTitleBar (void)
{
QPixmap *img = getPixmap("titlebar.bmp");
QPixmap *img = getPixmap("titlebar");
m_items->insert(MENUBUTTON_0, img->copy(0, 0, 9, 9));
m_items->insert(MENUBUTTON_1, img->copy(0, 9, 9, 9));
@ -308,7 +309,7 @@ Skin::BuildOther (void)
QPixmap *img, *part;
QPainter(painter);
img = getPixmap("monoster.bmp");
img = getPixmap("monoster");
m_items->insert (MONO_1, img->copy(29, 0, 27, 12));
m_items->insert (MONO_0, img->copy(29, 12, 27, 12));
m_items->insert (STEREO_1, img->copy(0, 0, 29, 12));
@ -316,7 +317,7 @@ Skin::BuildOther (void)
delete img;
img = getPixmap("playpaus.bmp");
img = getPixmap("playpaus");
part = new QPixmap(11, 9);
painter.begin(part);
@ -345,7 +346,7 @@ Skin::BuildOther (void)
delete img;
img = getPixmap ("main.bmp");
img = getPixmap ("main");
m_items->insert (MAIN_WINDOW, img->copy());
m_items->insert (ABOUT_0, img->copy(247, 83, 20, 25));
m_items->insert (ABOUT_1, img->copy(247, 83, 20, 24));
@ -358,22 +359,22 @@ Skin::BuildSliders (void)
{
QPixmap *img;
img = getPixmap("posbar.bmp");
img = getPixmap("posbar");
m_items->insert (POSBAR, img->copy (0, 0, 248, 10));
m_items->insert (POSBAR_BTN_0, img->copy (248, 0, 29, 10));
m_items->insert (POSBAR_BTN_1, img->copy (278, 0, 29, 10));
delete img;
img = getPixmap("volume.bmp");
img = getPixmap("volume");
for (int i = VOLUMEBAR_POS_MIN; i < VOLUMEBAR_POS_MAX; i++) {
m_volume_bar->insert(i, img->copy(0, i*15, 68, 13));
}
delete img;
img = getPixmap("balance.bmp");
img = getPixmap("balance");
if (!img) {
img = getPixmap("volume.bmp");
img = getPixmap("volume");
}
for (int i = BALANCE_POS_MIN; i < BALANCE_POS_MAX; i++) {
@ -388,10 +389,10 @@ Skin::BuildNumbers (void)
{
uint num = 11;
QPixmap *img = getPixmap("numbers.bmp");
QPixmap *img = getPixmap("numbers");
if (!img) {
num = 12;
img = getPixmap ("nums_ex.bmp");
img = getPixmap ("nums_ex");
}
for (uint i = 0; i < num; i++) {

View file

@ -2,28 +2,27 @@
<qresource>
<file>icon.png</file>
<file>nocover.jpg</file>
<file>CleanAMP/Eq_ex.bmp</file>
<file>CleanAMP/GENEX.bmp</file>
<file>CleanAMP/Gen.bmp</file>
<file>CleanAMP/MONOSTER.BMP</file>
<file>CleanAMP/Eq_ex.png</file>
<file>CleanAMP/GENEX.png</file>
<file>CleanAMP/Gen.png</file>
<file>CleanAMP/monoster.png</file>
<file>CleanAMP/PLEDIT.TXT</file>
<file>CleanAMP/ReadMe.txt</file>
<file>CleanAMP/Thumbs.db</file>
<file>CleanAMP/VIDEO.bmp</file>
<file>CleanAMP/Volume.bmp</file>
<file>CleanAMP/balance.bmp</file>
<file>CleanAMP/cbuttons.bmp</file>
<file>CleanAMP/eqmain.bmp</file>
<file>CleanAMP/main.bmp</file>
<file>CleanAMP/mb.bmp</file>
<file>CleanAMP/numbers.bmp</file>
<file>CleanAMP/playpaus.bmp</file>
<file>CleanAMP/pledit.bmp</file>
<file>CleanAMP/posbar.bmp</file>
<file>CleanAMP/shufrep.bmp</file>
<file>CleanAMP/text.bmp</file>
<file>CleanAMP/titlebar.bmp</file>
<file>CleanAMP/VIDEO.png</file>
<file>CleanAMP/Volume.png</file>
<file>CleanAMP/balance.png</file>
<file>CleanAMP/cbuttons.png</file>
<file>CleanAMP/eqmain.png</file>
<file>CleanAMP/main.png</file>
<file>CleanAMP/mb.png</file>
<file>CleanAMP/numbers.png</file>
<file>CleanAMP/playpaus.png</file>
<file>CleanAMP/pledit.png</file>
<file>CleanAMP/posbar.png</file>
<file>CleanAMP/shufrep.png</file>
<file>CleanAMP/text.png</file>
<file>CleanAMP/titlebar.png</file>
<file>CleanAMP/viscolor.txt</file>
</qresource>
</RCC>