summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-19 20:39:26 (UTC)
committer harlekin <harlekin>2002-08-19 20:39:26 (UTC)
commit6c0751d0d1869089066269430b4664655e1dbe68 (patch) (side-by-side diff)
tree870894a8eba99d8d07d2db8e3daae21e77eba450
parent5c057c7040fe0669a159173f07793c7f28c95477 (diff)
downloadopie-6c0751d0d1869089066269430b4664655e1dbe68.zip
opie-6c0751d0d1869089066269430b4664655e1dbe68.tar.gz
opie-6c0751d0d1869089066269430b4664655e1dbe68.tar.bz2
works now also on retail sharp rom
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/opieplayer2.pro4
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp7
5 files changed, 9 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index bf3590b..40e20e1 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -143,17 +143,17 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
imgButtonMask->fill( 0 );
for ( int i = 0; i < 10; i++ ) {
- QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png";
+ QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" );
masks[i] = new QBitmap( filename );
if ( !masks[i]->isNull() ) {
QImage imgMask = masks[i]->convertToImage();
uchar **dest = imgButtonMask->jumpTable();
for ( int y = 0; y < imgUp->height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < imgUp->width(); x++ )
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro
index 8cbac06..3a47c06 100644
--- a/noncore/multimedia/opieplayer2/opieplayer2.pro
+++ b/noncore/multimedia/opieplayer2/opieplayer2.pro
@@ -1,11 +1,11 @@
TEMPLATE = app
-#CONFIG = qt warn_on release
-CONFIG = qt warn_on debug
+CONFIG = qt warn_on release
+#CONFIG = qt warn_on debug
DESTDIR = $(OPIEDIR)/bin
HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h mediadetect.h\
videowidget.h audiowidget.h playlistwidget.h mediaplayer.h inputDialog.h \
frame.h lib.h xinevideowidget.h volumecontrol.h\
alphablend.h yuv2rgb.h
SOURCES = main.cpp \
playlistselection.cpp mediaplayerstate.cpp xinecontrol.cpp mediadetect.cpp\
videowidget.cpp audiowidget.cpp playlistwidget.cpp mediaplayer.cpp inputDialog.cpp \
diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp
index 85228a9..975dec3 100644
--- a/noncore/multimedia/opieplayer2/playlistselection.cpp
+++ b/noncore/multimedia/opieplayer2/playlistselection.cpp
@@ -179,17 +179,17 @@ bool PlayListSelection::last() {
else
return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
void PlayListSelection::unSelect()
{
- QListViewItem *item = selectedItem();
+ //QListViewItem *item = selectedItem();
setSelected( currentItem(), FALSE);
}
void PlayListSelection::writeCurrent( Config& cfg ) {
cfg.setGroup("PlayList");
QListViewItem *item = selectedItem();
if ( item )
cfg.writeEntry("current", item->text(0) );
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 262b685..6299328 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -141,17 +141,16 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
(void)new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) );
(void)new MenuItem( pmPlayList, tr( "Export playlist to m3u" ), this, SLOT(writem3u() ) );
pmPlayList->insertSeparator(-1);
(void)new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) );
pmPlayList->insertSeparator(-1);
(void)new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) );
(void)new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) );
-
pmView = new QPopupMenu( this );
menu->insertItem( tr( "View" ), pmView );
pmView->isCheckable();
pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), mediaPlayerState, SLOT( toggleFullscreen() ) );
Config cfg( "OpiePlayer" );
bool b= cfg.readBoolEntry("FullScreen", 0);
@@ -579,17 +578,17 @@ bool PlayListWidget::last() {
else
return mediaPlayerState->looping();
}
void PlayListWidget::saveList() {
QString filename;
- InputDialog *fileDlg;
+ InputDialog *fileDlg = 0l;
fileDlg = new InputDialog(this,tr("Save Playlist"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
if ( d->current )
delete d->current;
filename = fileDlg->LineEdit1->text();//+".playlist";
// qDebug("saving playlist "+filename+".playlist");
Config cfg( filename +".playlist");
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 60a3563..5b53568 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -26,16 +26,17 @@
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
+#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qpe/mediaplayerplugininterface.h>
#include <qpe/config.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
@@ -99,17 +100,17 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
imgButtonMask->fill( 0 );
for ( int i = 0; i < 7; i++ ) {
- QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png";
+ QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
masks[i] = new QBitmap( filename );
if ( !masks[i]->isNull() ) {
QImage imgMask = masks[i]->convertToImage();
uchar **dest = imgButtonMask->jumpTable();
for ( int y = 0; y < imgUp->height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < imgUp->width(); x++ ) {
@@ -177,18 +178,18 @@ QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) {
QPixmap *pixmap = new QPixmap( pix );
pixmap->setMask( mask );
return pixmap;
}
void VideoWidget::resizeEvent( QResizeEvent * ) {
int h = height();
int w = width();
- int Vh = 160;
- int Vw = 220;
+ //int Vh = 160;
+ //int Vw = 220;
slider->setFixedWidth( w - 20 );
slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) );
slider->setBackgroundOrigin( QWidget::ParentOrigin );
slider->setFocusPolicy( QWidget::NoFocus );
slider->setBackgroundPixmap( *pixBg );
xoff = 0;// ( imgUp->width() ) / 2;