-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 50 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 2 |
4 files changed, 55 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 2ee9383..a3d34f4 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -119,33 +119,33 @@ const char *skin_mask_file_names[11] = { | |||
119 | 119 | ||
120 | static void changeTextColor( QWidget *w ) { | 120 | static void changeTextColor( QWidget *w ) { |
121 | QPalette p = w->palette(); | 121 | QPalette p = w->palette(); |
122 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); | 122 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); |
123 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); | 123 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); |
124 | w->setPalette( p ); | 124 | w->setPalette( p ); |
125 | } | 125 | } |
126 | 126 | ||
127 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | 127 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); |
128 | 128 | ||
129 | 129 | ||
130 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | 130 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : |
131 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { | 131 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { |
132 | setCaption( tr("OpiePlayer") ); | 132 | setCaption( tr("OpiePlayer") ); |
133 | 133 | ||
134 | Config cfg("OpiePlayer"); | 134 | Config cfg("OpiePlayer"); |
135 | cfg.setGroup("AudioWidget"); | 135 | cfg.setGroup("Options"); |
136 | skin = cfg.readEntry("Skin","default"); | 136 | skin = cfg.readEntry("Skin","default"); |
137 | //skin = "scaleTest"; | 137 | //skin = "scaleTest"; |
138 | // color of background, frame, degree of transparency | 138 | // color of background, frame, degree of transparency |
139 | 139 | ||
140 | QString skinPath = "opieplayer2/skins/" + skin; | 140 | QString skinPath = "opieplayer2/skins/" + skin; |
141 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 141 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
142 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | 142 | imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); |
143 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | 143 | imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); |
144 | 144 | ||
145 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 145 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
146 | imgButtonMask->fill( 0 ); | 146 | imgButtonMask->fill( 0 ); |
147 | 147 | ||
148 | for ( int i = 0; i < 11; i++ ) { | 148 | for ( int i = 0; i < 11; i++ ) { |
149 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; | 149 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; |
150 | masks[i] = new QBitmap( filename ); | 150 | masks[i] = new QBitmap( filename ); |
151 | 151 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 2521906..c210ffb 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -160,32 +160,39 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
160 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); | 160 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); |
161 | 161 | ||
162 | 162 | ||
163 | pmView = new QPopupMenu( this ); | 163 | pmView = new QPopupMenu( this ); |
164 | menu->insertItem( tr( "View" ), pmView ); | 164 | menu->insertItem( tr( "View" ), pmView ); |
165 | pmView->isCheckable(); | 165 | pmView->isCheckable(); |
166 | 166 | ||
167 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), mediaPlayerState, SLOT( toggleFullscreen() ) ); | 167 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), mediaPlayerState, SLOT( toggleFullscreen() ) ); |
168 | 168 | ||
169 | Config cfg( "OpiePlayer" ); | 169 | Config cfg( "OpiePlayer" ); |
170 | bool b= cfg.readBoolEntry("FullScreen", 0); | 170 | bool b= cfg.readBoolEntry("FullScreen", 0); |
171 | mediaPlayerState->setFullscreen( b ); | 171 | mediaPlayerState->setFullscreen( b ); |
172 | pmView->setItemChecked( -16, b ); | 172 | pmView->setItemChecked( -16, b ); |
173 | 173 | ||
174 | pmView->insertItem( Resource::loadPixmap("opieplayer/scale") , tr( "Scale"), mediaPlayerState, SLOT(toggleScaled() ) ); | 174 | pmView->insertItem( Resource::loadPixmap("opieplayer/scale") , tr( "Scale"), mediaPlayerState, SLOT(toggleScaled() ) ); |
175 | 175 | ||
176 | pmView->insertSeparator(-1); | ||
177 | |||
178 | skinsMenu = new QPopupMenu( this ); | ||
179 | pmView->insertItem( tr( "Skins" ), skinsMenu ); | ||
180 | skinsMenu->isCheckable(); | ||
181 | populateSkinsMenu(); | ||
182 | |||
176 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); | 183 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); |
177 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); | 184 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); |
178 | 185 | ||
179 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); | 186 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); |
180 | 187 | ||
181 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 188 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
182 | // tabWidget->setTabShape(QTabWidget::Triangular); | 189 | // tabWidget->setTabShape(QTabWidget::Triangular); |
183 | 190 | ||
184 | QWidget *pTab; | 191 | QWidget *pTab; |
185 | pTab = new QWidget( tabWidget, "pTab" ); | 192 | pTab = new QWidget( tabWidget, "pTab" ); |
186 | tabWidget->insertTab( pTab,"Playlist"); | 193 | tabWidget->insertTab( pTab,"Playlist"); |
187 | 194 | ||
188 | 195 | ||
189 | // Add the playlist area | 196 | // Add the playlist area |
190 | 197 | ||
191 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); | 198 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); |
@@ -237,33 +244,35 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
237 | videoView->setMultiSelection( TRUE ); | 244 | videoView->setMultiSelection( TRUE ); |
238 | videoView->setSelectionMode( QListView::Extended); | 245 | videoView->setSelectionMode( QListView::Extended); |
239 | 246 | ||
240 | QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); | 247 | QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); |
241 | 248 | ||
242 | tabWidget->insertTab( vTab,tr("Video")); | 249 | tabWidget->insertTab( vTab,tr("Video")); |
243 | 250 | ||
244 | //playlists list | 251 | //playlists list |
245 | QWidget *LTab; | 252 | QWidget *LTab; |
246 | LTab = new QWidget( tabWidget, "LTab" ); | 253 | LTab = new QWidget( tabWidget, "LTab" ); |
247 | playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy | 254 | playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy |
248 | playLists->setMinimumSize(233,260); | 255 | playLists->setMinimumSize(233,260); |
249 | tabWidget->insertTab(LTab,tr("Lists")); | 256 | tabWidget->insertTab(LTab,tr("Lists")); |
250 | 257 | ||
251 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); | 258 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); |
252 | 259 | ||
253 | connect( pmView, SIGNAL( activated(int)), this, SLOT( pmViewActivated(int) ) ); | 260 | connect( pmView, SIGNAL( activated(int)), this, SLOT( pmViewActivated(int) ) ); |
261 | |||
262 | connect( skinsMenu, SIGNAL( activated(int)), this, SLOT(skinsMenuActivated(int) ) ); | ||
254 | 263 | ||
255 | // connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled() ) ); | 264 | // connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled() ) ); |
256 | 265 | ||
257 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 266 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
258 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); | 267 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); |
259 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 268 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
260 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | 269 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); |
261 | connect( audioView, SIGNAL( returnPressed( QListViewItem *)), | 270 | connect( audioView, SIGNAL( returnPressed( QListViewItem *)), |
262 | this,SLOT( playIt( QListViewItem *)) ); | 271 | this,SLOT( playIt( QListViewItem *)) ); |
263 | connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | 272 | connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); |
264 | connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 273 | connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), |
265 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | 274 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); |
266 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), | 275 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), |
267 | this,SLOT( playIt( QListViewItem *)) ); | 276 | this,SLOT( playIt( QListViewItem *)) ); |
268 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | 277 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); |
269 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); | 278 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); |
@@ -1222,16 +1231,55 @@ void PlayListWidget::readPls(const QString &filename) { | |||
1222 | void PlayListWidget::pmViewActivated(int index) { | 1231 | void PlayListWidget::pmViewActivated(int index) { |
1223 | qDebug("%d", index); | 1232 | qDebug("%d", index); |
1224 | switch(index) { | 1233 | switch(index) { |
1225 | case -16: | 1234 | case -16: |
1226 | { | 1235 | { |
1227 | 1236 | ||
1228 | mediaPlayerState->toggleFullscreen(); | 1237 | mediaPlayerState->toggleFullscreen(); |
1229 | bool b=mediaPlayerState->fullscreen(); | 1238 | bool b=mediaPlayerState->fullscreen(); |
1230 | pmView->setItemChecked( index,b); | 1239 | pmView->setItemChecked( index,b); |
1231 | Config cfg( "OpiePlayer" ); | 1240 | Config cfg( "OpiePlayer" ); |
1232 | cfg.writeEntry("FullScreen", b); | 1241 | cfg.writeEntry("FullScreen", b); |
1233 | 1242 | ||
1234 | } | 1243 | } |
1235 | break; | 1244 | break; |
1236 | }; | 1245 | }; |
1237 | } | 1246 | } |
1247 | |||
1248 | void PlayListWidget::populateSkinsMenu() { | ||
1249 | int item=0; | ||
1250 | defaultSkinIndex=0; | ||
1251 | QString skinName; | ||
1252 | Config cfg( "OpiePlayer" ); | ||
1253 | cfg.setGroup("Options"); | ||
1254 | QString skin = cfg.readEntry("Skin","default"); | ||
1255 | |||
1256 | QDir skinsDir(QPEApplication::qpeDir()+"/pics/opieplayer2/skins"); | ||
1257 | skinsDir.setFilter( QDir::Dirs); | ||
1258 | skinsDir.setSorting(QDir::Name); | ||
1259 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); | ||
1260 | QFileInfoListIterator it( *skinslist ); | ||
1261 | QFileInfo *fi; | ||
1262 | while ( (fi=it.current()) ) { | ||
1263 | skinName = fi->fileName(); | ||
1264 | qDebug( fi->fileName()); | ||
1265 | if( skinName != "." && skinName != ".." && skinName !="CVS") | ||
1266 | item = skinsMenu->insertItem( fi->fileName()); | ||
1267 | if( skinName == "default") | ||
1268 | defaultSkinIndex = item; | ||
1269 | if( skinName == skin) | ||
1270 | skinsMenu->setItemChecked( item, TRUE); | ||
1271 | |||
1272 | ++it; | ||
1273 | } | ||
1274 | } | ||
1275 | |||
1276 | void PlayListWidget::skinsMenuActivated(int item) { | ||
1277 | for(int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i--) { | ||
1278 | skinsMenu->setItemChecked( i, FALSE); | ||
1279 | } | ||
1280 | skinsMenu->setItemChecked( item, TRUE); | ||
1281 | |||
1282 | Config cfg( "OpiePlayer" ); | ||
1283 | cfg.setGroup("Options"); | ||
1284 | cfg.writeEntry("Skin", skinsMenu->text( item)); | ||
1285 | } | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index dd49892..67a85a8 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -43,45 +43,49 @@ public: | |||
43 | FileSelector* playLists; | 43 | FileSelector* playLists; |
44 | QPushButton *tbDeletePlaylist; | 44 | QPushButton *tbDeletePlaylist; |
45 | int fd, selected; | 45 | int fd, selected; |
46 | public slots: | 46 | public slots: |
47 | bool first(); | 47 | bool first(); |
48 | bool last(); | 48 | bool last(); |
49 | bool next(); | 49 | bool next(); |
50 | bool prev(); | 50 | bool prev(); |
51 | /* void setFullScreen(); */ | 51 | /* void setFullScreen(); */ |
52 | /* void setScaled(); */ | 52 | /* void setScaled(); */ |
53 | protected: | 53 | protected: |
54 | /* void contentsMousePressEvent( QMouseEvent * e ); */ | 54 | /* void contentsMousePressEvent( QMouseEvent * e ); */ |
55 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ | 55 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ |
56 | void keyReleaseEvent( QKeyEvent *e); | 56 | void keyReleaseEvent( QKeyEvent *e); |
57 | void keyPressEvent( QKeyEvent *e); | 57 | void keyPressEvent( QKeyEvent *e); |
58 | private: | 58 | private: |
59 | int defaultSkinIndex; | ||
60 | QPopupMenu *skinsMenu; | ||
59 | bool audioScan, videoScan; | 61 | bool audioScan, videoScan; |
60 | void doBlank(); | 62 | void doBlank(); |
61 | void doUnblank(); | 63 | void doUnblank(); |
62 | void readm3u(const QString &); | 64 | void readm3u(const QString &); |
63 | void readPls(const QString &); | 65 | void readPls(const QString &); |
64 | 66 | ||
65 | void initializeStates(); | 67 | void initializeStates(); |
66 | void readConfig( Config& cfg ); | 68 | void readConfig( Config& cfg ); |
67 | void writeConfig( Config& cfg ) const; | 69 | void writeConfig( Config& cfg ) const; |
68 | PlayListWidgetPrivate *d; // Private implementation data | 70 | PlayListWidgetPrivate *d; // Private implementation data |
69 | void populateAudioView(); | 71 | void populateAudioView(); |
70 | void populateVideoView(); | 72 | void populateVideoView(); |
71 | private slots: | 73 | private slots: |
74 | void populateSkinsMenu(); | ||
75 | void skinsMenuActivated(int); | ||
72 | void pmViewActivated(int); | 76 | void pmViewActivated(int); |
73 | void writem3u(); | 77 | void writem3u(); |
74 | void scanForAudio(); | 78 | void scanForAudio(); |
75 | void scanForVideo(); | 79 | void scanForVideo(); |
76 | void openFile(); | 80 | void openFile(); |
77 | void setDocument( const QString& fileref ); | 81 | void setDocument( const QString& fileref ); |
78 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 82 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
79 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 83 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
80 | void setActiveWindow(); // need to handle this to show the right view | 84 | void setActiveWindow(); // need to handle this to show the right view |
81 | void setPlaylist( bool ); // Show/Hide the playlist | 85 | void setPlaylist( bool ); // Show/Hide the playlist |
82 | void setView( char ); | 86 | void setView( char ); |
83 | void clearList(); | 87 | void clearList(); |
84 | void addAllToList(); | 88 | void addAllToList(); |
85 | void addAllMusicToList(); | 89 | void addAllMusicToList(); |
86 | void addAllVideoToList(); | 90 | void addAllVideoToList(); |
87 | void saveList(); // Save the playlist | 91 | void saveList(); // Save the playlist |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index b4e69b5..fb375f0 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -74,33 +74,33 @@ MediaButton videoButtons[] = { | |||
74 | 74 | ||
75 | const char *skinV_mask_file_names[7] = { | 75 | const char *skinV_mask_file_names[7] = { |
76 | "stop","play","back","fwd","up","down","full" | 76 | "stop","play","back","fwd","up","down","full" |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 79 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); |
80 | 80 | ||
81 | 81 | ||
82 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 82 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
83 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 83 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
84 | setCaption( tr("OpiePlayer - Video") ); | 84 | setCaption( tr("OpiePlayer - Video") ); |
85 | 85 | ||
86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
87 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 87 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); |
88 | 88 | ||
89 | Config cfg("OpiePlayer"); | 89 | Config cfg("OpiePlayer"); |
90 | cfg.setGroup("VideoWidget"); | 90 | cfg.setGroup("Options"); |
91 | skin = cfg.readEntry("Skin","default"); | 91 | skin = cfg.readEntry("Skin","default"); |
92 | 92 | ||
93 | QString skinPath = "opieplayer2/skins/" + skin; | 93 | QString skinPath = "opieplayer2/skins/" + skin; |
94 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 94 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
95 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); | 95 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); |
96 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); | 96 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); |
97 | 97 | ||
98 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 98 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
99 | imgButtonMask->fill( 0 ); | 99 | imgButtonMask->fill( 0 ); |
100 | 100 | ||
101 | for ( int i = 0; i < 7; i++ ) { | 101 | for ( int i = 0; i < 7; i++ ) { |
102 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png"; | 102 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png"; |
103 | masks[i] = new QBitmap( filename ); | 103 | masks[i] = new QBitmap( filename ); |
104 | qDebug(filename); | 104 | qDebug(filename); |
105 | if ( !masks[i]->isNull() ) { | 105 | if ( !masks[i]->isNull() ) { |
106 | QImage imgMask = masks[i]->convertToImage(); | 106 | QImage imgMask = masks[i]->convertToImage(); |