summaryrefslogtreecommitdiff
path: root/noncore/multimedia
authordrw <drw>2005-05-24 21:36:59 (UTC)
committer drw <drw>2005-05-24 21:36:59 (UTC)
commitdd673552565f6faa1898ff7e54bb2d374c17ac22 (patch) (side-by-side diff)
treecfc6c52a97fc7bf426f85c01511db4df812a23e2 /noncore/multimedia
parent7b809e61a3ec2afe898dd9d721efb981abffb0ca (diff)
downloadopie-dd673552565f6faa1898ff7e54bb2d374c17ac22.zip
opie-dd673552565f6faa1898ff7e54bb2d374c17ac22.tar.gz
opie-dd673552565f6faa1898ff7e54bb2d374c17ac22.tar.bz2
Resource -> OResource - please test, I do not have the right version of xine on my system to compile and run
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h1
-rw-r--r--noncore/multimedia/opieplayer2/om3u.h43
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp44
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp46
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h52
-rw-r--r--noncore/multimedia/opieplayer2/xinevideowidget.cpp3
7 files changed, 100 insertions, 94 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index d885150..a64ab92 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -2,48 +2,49 @@
Copyright (C) 2002 Simon Hausmann <simon@lst.de>
(C) 2002 Max Reiss <harlekin@handhelds.org>
(C) 2002 L. Potter <ljp@llornkcor.com>
(C) 2002 Holger Freyther <zecke@handhelds.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef MEDIAWIDGET_H
#define MEDIAWIDGET_H
+#include <qbitmap.h>
#include <qwidget.h>
#include <qmap.h>
#include "mediaplayerstate.h"
#include "playlistwidget.h"
class Skin;
class MediaWidget : public QWidget
{
Q_OBJECT
public:
enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back, FullScreen, Undefined };
enum ButtonType { NormalButton, ToggleButton };
struct Button
{
Button() : command( Undefined ), type( NormalButton ), isDown( false ) {}
Command command;
ButtonType type; // this should be part of the bitfield but gcc2 is too buggy to support this :-(
bool isDown : 1;
diff --git a/noncore/multimedia/opieplayer2/om3u.h b/noncore/multimedia/opieplayer2/om3u.h
index 9c7cf9a..0e04f72 100644
--- a/noncore/multimedia/opieplayer2/om3u.h
+++ b/noncore/multimedia/opieplayer2/om3u.h
@@ -1,66 +1,67 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = 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.
*/
#ifndef OM3U_H
#define OM3U_H
#include "playlistwidget.h"
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/storage.h>
#include <qpe/mimetype.h>
#include <qpe/global.h>
-#include <qpe/resource.h>
#include <qdir.h>
#include <qregexp.h>
#include <qstring.h>
#include <qtextstream.h>
#include <qstringlist.h>
#include <qcstring.h>
#include <qfile.h>
class Om3u : public QStringList {
// Q_OBJECT
public:
Om3u( const QString &filePath, int mode);
~Om3u();
void readM3u();
void readPls();
void write();
void add(const QString &);
void remove(const QString &);
void deleteFile(const QString &);
void close();
public slots:
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.cpp b/noncore/multimedia/opieplayer2/playlistfileview.cpp
index 3094876..7ccc518 100644
--- a/noncore/multimedia/opieplayer2/playlistfileview.cpp
+++ b/noncore/multimedia/opieplayer2/playlistfileview.cpp
@@ -1,30 +1,31 @@
#include "playlistfileview.h"
+#include <opie2/oresource.h>
+
#include <qfile.h>
#include <qpe/global.h>
-#include <qpe/resource.h>
PlayListFileView::PlayListFileView( const QString &mimeTypePattern, const QString &itemPixmapName, QWidget *parent, const char *name )
: PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_itemPixmapName( itemPixmapName ), m_scannedFiles( false ),
m_viewPopulated( false )
{
addColumn( tr( "Title" ), 140);
addColumn( tr( "Size" ), -1 );
addColumn(tr( "Media" ), 0 );
addColumn(tr( "Path" ), -1 );
setColumnAlignment( 1, Qt::AlignRight );
setColumnAlignment( 2, Qt::AlignRight );
setAllColumnsShowFocus( TRUE );
setSorting( 3, TRUE );
setMultiSelection( TRUE );
setSelectionMode( QListView::Extended );
connect( this, SIGNAL( selectionChanged() ),
this, SLOT( checkSelection() ) );
}
PlayListFileView::~PlayListFileView()
{
}
@@ -62,45 +63,45 @@ void PlayListFileView::populateView()
if( !m_scannedFiles ) {
m_viewPopulated = false; // avoid a recursion :)
scanFiles();
m_scannedFiles = true;
}
m_viewPopulated = true;
QString storage;
QListIterator<DocLnk> dit( m_files.children() );
for ( ; dit.current(); ++dit ) {
QListViewItem *newItem;
if ( QFile::exists( dit.current()->file() ) ||
dit.current()->file().left( 4 ) == "http" ) {
unsigned long size = QFile( dit.current()->file() ).size();
QString sizestr;
fileSize(size, sizestr);
newItem = new QListViewItem( this, dit.current()->name(),
sizestr, "" /*storage*/,
dit.current()->file() );
- newItem->setPixmap( 0, Resource::loadPixmap( m_itemPixmapName ) );
+ newItem->setPixmap( 0, Opie::Core::OResource::loadPixmap( m_itemPixmapName, Opie::Core::OResource::SmallIcon ) );
}
}
}
void PlayListFileView::checkSelection()
{
emit itemsSelected( hasSelection() );
}
void PlayListFileView::fileSize(unsigned long size, QString &str) {
if( size > 1048576 )
str.sprintf( "%.0fM", size / 1048576.0 );
else if( size > 1024 )
str.sprintf( "%.0fK", size / 1024.0 );
else
str.sprintf( "%d", size );
}
/* vim: et sw=4 ts=4
*/
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 98326a8..4178f32 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -1,51 +1,51 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
-              Copyright (c) 2002,2003 Max Reiss <harlekin@handhelds.org>
+ Copyright (c) 2002,2003 Max Reiss <harlekin@handhelds.org>
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = 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 "playlistselection.h"
#include "playlistwidget.h"
#include "mediaplayer.h"
#include "inputDialog.h"
#include "om3u.h"
#include "playlistfileview.h"
/* OPIE */
#include <opie2/odebug.h>
#include <opie2/ofiledialog.h>
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
#include <qmessagebox.h>
#include <qtoolbar.h>
/* STD */
@@ -75,49 +75,49 @@ PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
(void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) );
(void)new MenuItem( pmPlayList, tr( "Add all audio files" ),
this, SLOT( addAllMusicToList() ) );
(void)new MenuItem( pmPlayList, tr( "Add all video files" ),
this, SLOT( addAllVideoToList() ) );
(void)new MenuItem( pmPlayList, tr( "Add all files" ),
this, SLOT( addAllToList() ) );
pmPlayList->insertSeparator(-1);
(void)new MenuItem( pmPlayList, tr( "Add File" ),
this,SLOT( openFile() ) );
(void)new MenuItem( pmPlayList, tr("Add URL"),
this,SLOT( openURL() ) );
(void)new MenuItem( pmPlayList, tr( "Add Directory"),
this, SLOT(openDirectory()));
pmPlayList->insertSeparator(-1);
(void)new MenuItem( pmPlayList, tr( "Save Playlist" ),
this, SLOT(writem3u() ) );
pmPlayList->insertSeparator(-1);
(void)new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ),
audioView, SLOT( scanFiles() ) );
(void)new MenuItem( pmPlayList, tr( "Rescan for Video Files" ),
videoView, SLOT( scanFiles() ) );
- pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"),
+ pmView->insertItem( Opie::Core::OResource::loadPixmap("fullscreen", Opie::Core::OResource::SmallIcon) , tr( "Full Screen"),
mediaPlayerState, SLOT( toggleFullscreen() ) );
Config cfg( "OpiePlayer" );
bool b= cfg.readBoolEntry("FullScreen", 0);
mediaPlayerState->setFullscreen( b );
pmView->setItemChecked( -16, b );
(void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up",
d->selectedFiles, SLOT(moveSelectedUp() ) );
(void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut",
d->selectedFiles, SLOT(removeSelected() ) );
(void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down",
d->selectedFiles, SLOT(moveSelectedDown() ) );
QVBox *stretch2 = new QVBox( vbox1 );
connect( tbDeletePlaylist, ( SIGNAL( released() ) ),
SLOT( deletePlaylist() ) );
connect( pmView, SIGNAL( activated(int) ),
this, SLOT( pmViewActivated(int) ) );
connect( skinsMenu, SIGNAL( activated(int) ) ,
this, SLOT( skinsMenuActivated(int) ) );
connect( d->selectedFiles, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
this,SLOT( playlistViewPressed(int,QListViewItem*,const QPoint&,int) ) );
connect( audioView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index c3c1282..589c11f 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -1,92 +1,92 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
-              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
+ Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = 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 <qtoolbar.h>
#include <qpe/qpeapplication.h>
#include <qlayout.h>
#include <qmenubar.h>
#include "playlistselection.h"
#include "playlistwidget.h"
#include "mediaplayerstate.h"
#include "inputDialog.h"
#include "playlistfileview.h"
PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name )
: QMainWindow( parent, name ) {
d = new PlayListWidgetPrivate;
d->setDocumentUsed = FALSE;
setBackgroundMode( PaletteButton );
setToolBarsMovable( FALSE );
// Create Toolbar
QToolBar *toolbar = new QToolBar( this );
toolbar->setHorizontalStretchable( TRUE );
// Create Menubar
QMenuBar *menu = new QMenuBar( toolbar );
menu->setMargin( 0 );
bar = new QToolBar( this );
bar->setLabel( tr( "Play Operations" ) );
- tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" );
+ tbDeletePlaylist = new QPushButton( Opie::Core::OResource::loadIconSet( "trash", Opie::Core::OResource::SmallIcon ),
+ "", bar, "close" );
tbDeletePlaylist->setFlat( TRUE );
tbDeletePlaylist->setFixedSize( 20, 20 );
tbDeletePlaylist->hide();
pmPlayList = new QPopupMenu( this );
menu->insertItem( tr( "File" ), pmPlayList );
pmView = new QPopupMenu( this );
menu->insertItem( tr( "View" ), pmView );
pmView->isCheckable();
skinsMenu = new QPopupMenu( this );
pmView->insertItem( tr( "Skins" ), skinsMenu );
skinsMenu->isCheckable();
gammaMenu = new QPopupMenu( this );
pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu );
gammaSlider = new QSlider( QSlider::Vertical, gammaMenu );
gammaSlider->setRange( -40, 40 );
gammaSlider->setTickmarks( QSlider::Left );
gammaSlider->setTickInterval( 20 );
gammaSlider->setFocusPolicy( QWidget::StrongFocus );
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
index 5706d14..0f4a120 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
@@ -1,99 +1,103 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
-              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
+ Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = 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.
*/
#ifndef PLAY_LIST_WIDGET_GUI_H
#define PLAY_LIST_WIDGET_GUI_H
#include <qmainwindow.h>
-#include <qpe/resource.h>
-#include <qtabwidget.h>
+#include <opie2/oresource.h>
+
+#include <qpe/qpeapplication.h>
#include <qpe/fileselector.h>
+
+#include <qtabwidget.h>
#include <qaction.h>
#include <qtoolbutton.h>
#include <qslider.h>
#include <qlcdnumber.h>
class PlayListWidgetPrivate;
class PlayListSelection;
class MediaPlayerState;
class PlayListFileView;
class Config;
class QToolBar;
class QListViewItem;
class QListView;
class QPoint;
class QAction;
class QLabel;
class PlayListWidgetPrivate {
public:
QToolButton *tbPlay, *tbFull, *tbLoop, *tbShuffle, *tbAddToList, *tbRemoveFromList, *tbMoveUp, *tbMoveDown, *tbRemove;
QFrame *playListFrame;
PlayListSelection *selectedFiles;
bool setDocumentUsed;
};
class ToolButton : public QToolButton {
Q_OBJECT
public:
ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
: QToolButton( parent, name ) {
setTextLabel( name );
- setPixmap( Resource::loadPixmap( icon ) );
+ setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
+ setPixmap( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) );
setAutoRaise( TRUE );
setFocusPolicy( QWidget::NoFocus );
setToggleButton( t );
connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
}
};
class MenuItem : public QAction {
public:
MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot )
: QAction( text, QString::null, 0, 0 ) {
connect( this, SIGNAL( activated() ), handler, slot );
addTo( parent );
}
};
class PlayListWidgetGui : public QMainWindow {
Q_OBJECT
public:
PlayListWidgetGui( QWidget* parent=0, const char* name=0 );
~PlayListWidgetGui();
protected:
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
index 7c98ce5..eac84dd 100644
--- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp
+++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp
@@ -12,57 +12,56 @@
:`=1 )Y*s>-.-- : the terms of the GNU General Public
.="- .-=="i, .._ License as published by the Free Software
- . .-<_> .<> Foundation; either version 2 of the License,
._= =} : or (at your option) any later version.
.%`+i> _;_.
.i_,=:_. -<s. This program is distributed in the hope that
+ . -:. = it will be useful, but WITHOUT ANY WARRANTY;
: .. .:, . . . without even the implied warranty of
=_ + =;=|` MERCHANTABILITY or FITNESS FOR A
_.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.= = ; Library General Public License for more
++= -. .` .: details.
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = 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 "xinevideowidget.h"
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qimage.h>
#include <qdirectpainter_qws.h>
#include <qgfx_qws.h>
#include <qsize.h>
#include <qapplication.h>
-#include <qpe/resource.h>
-
#include <pthread.h>
// 0 deg rot: copy a line from src to dst (use libc memcpy)
// 180 deg rot: copy a line from src to dst reversed
/*
* This code relies the len be a multiply of 16bit
*/
static inline void memcpy_rev ( void *_dst, void *_src, size_t len )
{
/*
* move the source to the end
*/
char *src_c = static_cast<char*>(_src) + len;
/*
* as we copy by 16bit and not 8bit
* devide the length by two
*/
len >>= 1;