Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index ef7c8dc..9a55608 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp | |||
@@ -75,24 +75,25 @@ static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | |||
75 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | 75 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : |
76 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) | 76 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) |
77 | { | 77 | { |
78 | setCaption( tr("OpiePlayer") ); | 78 | setCaption( tr("OpiePlayer") ); |
79 | qDebug("<<<<<audioWidget"); | 79 | qDebug("<<<<<audioWidget"); |
80 | 80 | ||
81 | Config cfg("OpiePlayer"); | 81 | Config cfg("OpiePlayer"); |
82 | cfg.setGroup("Options"); | 82 | cfg.setGroup("Options"); |
83 | skin = cfg.readEntry("Skin","default"); | 83 | skin = cfg.readEntry("Skin","default"); |
84 | //skin = "scaleTest"; | 84 | //skin = "scaleTest"; |
85 | // color of background, frame, degree of transparency | 85 | // color of background, frame, degree of transparency |
86 | 86 | ||
87 | // QString skinPath = "opieplayer/skins/" + skin; | ||
87 | QString skinPath = "opieplayer2/skins/" + skin; | 88 | QString skinPath = "opieplayer2/skins/" + skin; |
88 | qDebug("skin path "+skinPath); | 89 | qDebug("skin path "+skinPath); |
89 | 90 | ||
90 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 91 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
91 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | 92 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); |
92 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | 93 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); |
93 | 94 | ||
94 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 95 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
95 | imgButtonMask->fill( 0 ); | 96 | imgButtonMask->fill( 0 ); |
96 | 97 | ||
97 | for ( int i = 0; i < 10; i++ ) { | 98 | for ( int i = 0; i < 10; i++ ) { |
98 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; | 99 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; |
@@ -111,27 +112,27 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
111 | 112 | ||
112 | } | 113 | } |
113 | 114 | ||
114 | for ( int i = 0; i < 11; i++ ) { | 115 | for ( int i = 0; i < 11; i++ ) { |
115 | buttonPixUp[i] = NULL; | 116 | buttonPixUp[i] = NULL; |
116 | buttonPixDown[i] = NULL; | 117 | buttonPixDown[i] = NULL; |
117 | } | 118 | } |
118 | 119 | ||
119 | setBackgroundPixmap( *pixBg ); | 120 | setBackgroundPixmap( *pixBg ); |
120 | 121 | ||
121 | songInfo.setFocusPolicy( QWidget::NoFocus ); | 122 | songInfo.setFocusPolicy( QWidget::NoFocus ); |
122 | 123 | ||
123 | changeTextColor( &songInfo ); | 124 | // changeTextColor( &songInfo ); |
124 | songInfo.setBackgroundColor( QColor( 167, 212, 167 )); | 125 | // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); |
125 | songInfo.setFrameStyle( QFrame::NoFrame); | 126 | // songInfo.setFrameStyle( QFrame::NoFrame); |
126 | // songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); | 127 | // songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); |
127 | //NoFrame | 128 | //NoFrame |
128 | // songInfo.setForegroundColor(Qt::white); | 129 | // songInfo.setForegroundColor(Qt::white); |
129 | 130 | ||
130 | slider.setFixedHeight( 20 ); | 131 | slider.setFixedHeight( 20 ); |
131 | slider.setMinValue( 0 ); | 132 | slider.setMinValue( 0 ); |
132 | slider.setMaxValue( 1 ); | 133 | slider.setMaxValue( 1 ); |
133 | slider.setFocusPolicy( QWidget::NoFocus ); | 134 | slider.setFocusPolicy( QWidget::NoFocus ); |
134 | slider.setBackgroundPixmap( *pixBg ); | 135 | slider.setBackgroundPixmap( *pixBg ); |
135 | 136 | ||
136 | time.setFocusPolicy( QWidget::NoFocus ); | 137 | time.setFocusPolicy( QWidget::NoFocus ); |
137 | time.setAlignment( Qt::AlignCenter ); | 138 | time.setAlignment( Qt::AlignCenter ); |