summaryrefslogtreecommitdiff
path: root/noncore/multimedia
Side-by-side diff
Diffstat (limited to 'noncore/multimedia') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/gui/mainwindow.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp88
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp14
-rw-r--r--noncore/multimedia/opierec/qtrec.cpp30
-rw-r--r--noncore/multimedia/powerchord/powerchordbase.cpp14
-rw-r--r--noncore/multimedia/showimg/ImageFileSelector.cpp14
-rw-r--r--noncore/multimedia/showimg/showimg.cpp4
13 files changed, 98 insertions, 98 deletions
diff --git a/noncore/multimedia/camera/gui/mainwindow.cpp b/noncore/multimedia/camera/gui/mainwindow.cpp
index 2f42049..e4e1b6c 100644
--- a/noncore/multimedia/camera/gui/mainwindow.cpp
+++ b/noncore/multimedia/camera/gui/mainwindow.cpp
@@ -53,98 +53,98 @@ using namespace Opie;
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#define CAPTUREFILE "/tmp/capture.dat"
#define OUTPUTFILE "/tmp/output.avi"
#define OUTPUT_TO_CUSTOM 250
#define OUTPUT_TO_DOCFOLDER 251
CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags f )
:QMainWindow( parent, name, f ),
_rotation( 270 ), // FIXME: get this from current settings (ODevice?)
_capturing( false ),
_pics( 1 ), _videos( 1 )
{
#ifdef QT_NO_DEBUG
if ( !ZCameraIO::instance()->isOpen() )
{
QVBox* v = new QVBox( this );
v->setMargin( 10 );
QLabel* l1 = new QLabel( v );
l1->setPixmap( Resource::loadPixmap( "camera/error" ) );
QLabel* l2 = new QLabel( v );
l2->setText( "<b>Sorry. could not detect your camera :-(</b><p>"
"* Is the sharpzdc_cs module loaded ?<br>"
"* Is /dev/sharpzdc read/writable ?<p>" );
connect( new QPushButton( "Exit", v ), SIGNAL( clicked() ), this, SLOT( close() ) );
setCentralWidget( v );
return;
}
#endif
init();
_rotation = 270; //TODO: grab these from the actual settings
preview = new PreviewWidget( this, "camera preview widget" );
//setCentralWidget( preview ); <--- don't do this!
preview->resize( QSize( 240, 288 ) );
preview->show();
// construct a System Channel to receive setRotation messages
_sysChannel = new QCopChannel( "QPE/System", this );
- connect( _sysChannel, SIGNAL( received( const QCString&, const QByteArray& ) ),
- this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) );
+ connect( _sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
+ this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
connect( preview, SIGNAL( contextMenuRequested() ), this, SLOT( showContextMenu() ) );
connect( ZCameraIO::instance(), SIGNAL( shutterClicked() ), this, SLOT( shutterClicked() ) );
updateCaption();
};
CameraMainWindow::~CameraMainWindow()
{
// write back configuration
OConfigGroupSaver cgs( oApp->config(), "General" );
cgs.config()->writeEntry( "flip", flip );
cgs.config()->writeEntry( "quality", quality );
cgs.config()->writeEntry( "zoom", zoom );
cgs.config()->writeEntry( "captureX", captureX );
cgs.config()->writeEntry( "captureY", captureY );
cgs.config()->writeEntry( "captureFormat", captureFormat );
cgs.config()->writeEntry( "outputTo", outputTo );
cgs.config()->writeEntry( "prefix", prefix );
cgs.config()->writeEntry( "appendSettings", appendSettings );
}
void CameraMainWindow::init()
{
// get values from configuration
OConfigGroupSaver cgs( oApp->config(), "General" );
flip = cgs.config()->readEntry( "flip", "A" );
quality = cgs.config()->readNumEntry( "quality", 50 );
zoom = cgs.config()->readNumEntry( "zoom", 1 );
captureX = cgs.config()->readNumEntry( "captureX", 480 );
captureY = cgs.config()->readNumEntry( "captureY", 640 );
captureFormat = cgs.config()->readEntry( "captureFormat", "JPEG" );
outputTo = cgs.config()->readEntry( "outputTo", "Documents Folder" );
prefix = cgs.config()->readEntry( "prefix", "Untitled" );
appendSettings = cgs.config()->readBoolEntry( "appendSettings", true );
// create action groups
QAction* a;
resog = new QActionGroup( 0, "reso", true );
resog->setToggleAction( true );
new QAction( " 64 x 48", 0, 0, resog, "64x48", true );
new QAction( "128 x 96", 0, 0, resog, "128x96", true );
new QAction( "192 x 144", 0, 0, resog, "192x144", true );
new QAction( "256 x 192", 0, 0, resog, "256x192", true );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 870b4f3..f3eafab 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -34,97 +34,97 @@
#include "audiowidget.h"
#include "mediaplayerstate.h"
#include "playlistwidget.h"
#include <qpe/qpeapplication.h>
namespace
{
const int xo = -2; // movable x offset
const int yo = 22; // movable y offset
const MediaWidget::SkinButtonInfo skinInfo[] =
{
{ MediaWidget::Play, "play", MediaWidget::ToggleButton },
{ MediaWidget::Stop, "stop", MediaWidget::NormalButton },
{ MediaWidget::Next, "next", MediaWidget::NormalButton },
{ MediaWidget::Previous, "prev", MediaWidget::NormalButton },
{ MediaWidget::VolumeUp, "up", MediaWidget::NormalButton },
{ MediaWidget::VolumeDown, "down", MediaWidget::NormalButton },
{ MediaWidget::Loop, "loop", MediaWidget::ToggleButton },
{ MediaWidget::PlayList, "playlist", MediaWidget::NormalButton },
{ MediaWidget::Forward, "forward", MediaWidget::NormalButton },
{ MediaWidget::Back, "back", MediaWidget::NormalButton }
};
const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] );
void changeTextColor( QWidget * w) {
QPalette p = w->palette();
p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
w->setPalette( p );
}
}
AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) :
MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ),
audioSliderBeingMoved( false )
{
setCaption( tr("OpiePlayer") );
loadSkin();
connect( &mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
- connect( &mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
+ connect( &mediaPlayerState, SIGNAL( isSeekableToggled(bool) ), this, SLOT( setSeekable(bool) ) );
connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) );
connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) );
connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) );
// Intialise state
setLength( mediaPlayerState.length() );
setPosition( mediaPlayerState.position() );
setLooping( mediaPlayerState.isFullscreen() );
// setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState.isPlaying() );
}
AudioWidget::~AudioWidget() {
// mediaPlayerState->setPlaying(false);
}
MediaWidget::GUIInfo AudioWidget::guiInfo()
{
return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount );
}
void AudioWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) );
slider.setFixedWidth( w - 110 );
slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
slider.setBackgroundOrigin( QWidget::ParentOrigin );
time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2;
upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10;
MediaWidget::resizeEvent( e );
}
void AudioWidget::sliderPressed() {
audioSliderBeingMoved = TRUE;
}
void AudioWidget::sliderReleased() {
audioSliderBeingMoved = FALSE;
if ( slider.width() == 0 )
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 9f51006..1e6bc4d 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -1,93 +1,93 @@
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qfileinfo.h>
#include "mediaplayer.h"
#include "playlistwidget.h"
#include "audiowidget.h"
#include "videowidget.h"
#include "volumecontrol.h"
#include "lib.h"
#include "mediaplayerstate.h"
// for setBacklight()
#include <linux/fb.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#define FBIOBLANK 0x4611
MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name )
: QObject( parent, name ), volumeDirection( 0 ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) {
m_audioUI = 0;
m_videoUI = 0;
m_xineControl = 0;
xine = new XINE::Lib( XINE::Lib::InitializeInThread );
fd=-1;fl=-1;
playList.setCaption( tr( "OpiePlayer: Initializating" ) );
qApp->processEvents();
// QPEApplication::grabKeyboard(); // EVIL
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
- connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
+ connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
// What is pauseCheck good for? (Simon)
-// connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
+// connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pauseCheck(bool) ) );
connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
- connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
+ connect( &mediaPlayerState, SIGNAL( blankToggled(bool) ), this, SLOT ( blank(bool) ) );
volControl = new VolumeControl;
Config cfg( "OpiePlayer" );
cfg.setGroup("PlayList");
QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() );
m_skinLoader = new SkinLoader;
m_skinLoader->schedule( AudioWidget::guiInfo() );
m_skinLoader->schedule( VideoWidget::guiInfo() );
m_skinLoader->start();
}
MediaPlayer::~MediaPlayer() {
// this shold never happen, but one never knows...
if ( xine ) {
xine->ensureInitialized();
delete xine;
}
delete m_xineControl;
delete m_audioUI;
delete m_videoUI;
delete volControl;
}
void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState.isPlaying() ) {
mediaPlayerState.setPaused( FALSE );
}
}
void MediaPlayer::play() {
mediaPlayerState.setPlaying( FALSE );
mediaPlayerState.setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
if ( !play ) {
return;
}
if ( mediaPlayerState.isPaused() ) {
mediaPlayerState.setPaused( FALSE );
return;
}
QString tickerText, time, fileName;
if ( playList.currentTab() != PlayListWidget::CurrentPlayList ) {
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index f193001..08c62a2 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -1,85 +1,85 @@
/*
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.
*/
#include <assert.h>
#include "mediawidget.h"
#include "playlistwidget.h"
#include "skin.h"
MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name )
: QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList )
{
- connect( &mediaPlayerState, SIGNAL( displayTypeChanged( MediaPlayerState::DisplayType ) ),
- this, SLOT( setDisplayType( MediaPlayerState::DisplayType ) ) );
- connect( &mediaPlayerState, SIGNAL( lengthChanged( long ) ),
- this, SLOT( setLength( long ) ) );
- connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ),
- this, SLOT( setPlaying( bool ) ) );
+ connect( &mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ),
+ this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) );
+ connect( &mediaPlayerState, SIGNAL( lengthChanged(long) ),
+ this, SLOT( setLength(long) ) );
+ connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ),
+ this, SLOT( setPlaying(bool) ) );
setBackgroundMode( NoBackground );
}
MediaWidget::~MediaWidget()
{
}
void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount,
const Skin &skin )
{
buttonMask = skin.buttonMask( skinInfo, buttonCount );
buttons.clear();
buttons.reserve( buttonCount );
for ( uint i = 0; i < buttonCount; ++i ) {
Button button = setupButton( skinInfo[ i ], skin );
buttons.push_back( button );
}
}
MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin )
{
Button button;
button.command = buttonInfo.command;
button.type = buttonInfo.type;
button.mask = skin.buttonMaskImage( buttonInfo.fileName );
return button;
}
void MediaWidget::loadDefaultSkin( const GUIInfo &guiInfo )
{
Skin skin( guiInfo.fileNameInfix );
skin.setCachable( false );
loadSkin( guiInfo.buttonInfo, guiInfo.buttonCount, skin );
}
void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const Skin &skin )
{
backgroundPixmap = skin.backgroundPixmap();
buttonUpImage = skin.buttonUpImage();
buttonDownImage = skin.buttonDownImage();
setupButtons( skinInfo, buttonCount, skin );
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 9a9e1ec..0a84268 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -18,184 +18,184 @@
     +  .  -:.       = 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 <opie/ofiledialog.h>
#include <qmessagebox.h>
#include "playlistselection.h"
#include "playlistwidget.h"
#include "mediaplayer.h"
#include "mediaplayerstate.h"
#include "inputDialog.h"
#include "om3u.h"
#include "playlistfileview.h"
//only needed for the random play
#include <assert.h>
PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
: PlayListWidgetGui( parent, "playList" ) , currentFileListView( 0 )
{
mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" );
m_mp = new MediaPlayer(*this, *mediaPlayerState, 0, "mediaPlayer");
d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ),
"opieplayer2/add_to_playlist",
this , SLOT(addSelected() ) );
d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ),
"opieplayer2/remove_from_playlist",
this , SLOT(removeSelected() ) );
d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play",
- this , SLOT( btnPlay( bool) ), TRUE );
+ this , SLOT( btnPlay(bool) ), TRUE );
d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle",
- mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE );
+ mediaPlayerState, SLOT( setShuffled(bool) ), TRUE );
d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop",
- mediaPlayerState, SLOT( setLooping( bool ) ), TRUE );
+ mediaPlayerState, SLOT( setLooping(bool) ), TRUE );
(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() ) );
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"),
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 ) ),
- this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int ) ) );
- connect( audioView, SIGNAL( returnPressed( QListViewItem *) ),
- this,SLOT( playIt( QListViewItem *) ) );
- connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ),
- this, SLOT( addToSelection( QListViewItem *) ) );
- connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ),
- this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int) ) );
- connect( videoView, SIGNAL( returnPressed( QListViewItem *) ),
- this,SLOT( playIt( QListViewItem *) ) );
- connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ),
- this, SLOT( addToSelection( QListViewItem *) ) );
- connect( playLists, SIGNAL( fileSelected( const DocLnk &) ),
- this, SLOT( loadList( const DocLnk & ) ) );
+ 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) ),
+ this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) );
+ connect( audioView, SIGNAL( returnPressed(QListViewItem*) ),
+ this,SLOT( playIt(QListViewItem*) ) );
+ connect( audioView, SIGNAL( doubleClicked(QListViewItem*) ),
+ this, SLOT( addToSelection(QListViewItem*) ) );
+ connect( videoView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
+ this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) );
+ connect( videoView, SIGNAL( returnPressed(QListViewItem*) ),
+ this,SLOT( playIt(QListViewItem*) ) );
+ connect( videoView, SIGNAL( doubleClicked(QListViewItem*) ),
+ this, SLOT( addToSelection(QListViewItem*) ) );
+ connect( playLists, SIGNAL( fileSelected(const DocLnk&) ),
+ this, SLOT( loadList(const DocLnk&) ) );
connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ),
- this, SLOT( tabChanged( QWidget* ) ) );
- connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ),
- d->tbPlay, SLOT( setOn( bool ) ) );
- connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ),
- d->tbLoop, SLOT( setOn( bool ) ) );
- connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ),
- d->tbShuffle, SLOT( setOn( bool ) ) );
- connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ),
- this, SLOT( playIt( QListViewItem *) ) );
- connect ( gammaSlider, SIGNAL( valueChanged( int ) ),
- mediaPlayerState, SLOT( setVideoGamma( int ) ) );
+ this, SLOT( tabChanged(QWidget*) ) );
+ connect( mediaPlayerState, SIGNAL( playingToggled(bool) ),
+ d->tbPlay, SLOT( setOn(bool) ) );
+ connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ),
+ d->tbLoop, SLOT( setOn(bool) ) );
+ connect( mediaPlayerState, SIGNAL( shuffledToggled(bool) ),
+ d->tbShuffle, SLOT( setOn(bool) ) );
+ connect( d->selectedFiles, SIGNAL( doubleClicked(QListViewItem*) ),
+ this, SLOT( playIt(QListViewItem*) ) );
+ connect ( gammaSlider, SIGNAL( valueChanged(int) ),
+ mediaPlayerState, SLOT( setVideoGamma(int) ) );
connect( this, SIGNAL(skinSelected() ),
m_mp, SLOT( reloadSkins() ) );
// see which skins are installed
populateSkinsMenu();
initializeStates();
channel = new QCopChannel( "QPE/Application/opieplayer2", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
- this, SLOT( qcopReceive(const QCString&, const QByteArray&)) );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT( qcopReceive(const QCString&,const QByteArray&)) );
cfg.setGroup("PlayList");
QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
loadList(DocLnk( currentPlaylist ) );
tabWidget->showPage( playListTab );
}
PlayListWidget::~PlayListWidget() {
delete d;
delete m_mp;
}
void PlayListWidget::initializeStates() {
d->tbPlay->setOn( mediaPlayerState->isPlaying() );
d->tbLoop->setOn( mediaPlayerState->isLooping() );
d->tbShuffle->setOn( mediaPlayerState->isShuffled() );
d->playListFrame->show();
}
void PlayListWidget::writeDefaultPlaylist() {
Config config( "OpiePlayer" );
config.setGroup( "PlayList" );
QString filename=QPEApplication::documentDir() + "/default.m3u";
QString currentString = config.readEntry( "CurrentPlaylist", filename);
if( currentString == filename) {
Om3u *m3uList;
// qDebug("<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>");
if( d->selectedFiles->first() ) {
m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate);
do {
// qDebug(d->selectedFiles->current()->file());
m3uList->add( d->selectedFiles->current()->file() );
}
while ( d->selectedFiles->next() );
m3uList->write();
m3uList->close();
delete m3uList;
}
}
}
@@ -458,144 +458,144 @@ void PlayListWidget::addSelected() {
d->selectedFiles->addToSelection( lnk );
}
currentFileListView->clearSelection();
writeCurrentM3u();
}
void PlayListWidget::removeSelected() {
d->selectedFiles->removeSelected( );
writeCurrentM3u();
}
void PlayListWidget::playIt( QListViewItem *it) {
if(!it) return;
mediaPlayerState->setPlaying(FALSE);
mediaPlayerState->setPlaying(TRUE);
d->selectedFiles->unSelect();
}
void PlayListWidget::addToSelection( QListViewItem *it) {
d->setDocumentUsed = FALSE;
if(it) {
if ( currentTab() == CurrentPlayList )
return;
DocLnk lnk;
QString filename;
filename=it->text(3);
lnk.setName( QFileInfo(filename).baseName() ); //sets name
lnk.setFile( filename ); //sets file name
d->selectedFiles->addToSelection( lnk);
writeCurrentM3u();
// tabWidget->setCurrentPage(0);
}
}
void PlayListWidget::tabChanged(QWidget *) {
d->tbPlay->setEnabled( true );
- disconnect( audioView, SIGNAL( itemsSelected( bool ) ),
- d->tbPlay, SLOT( setEnabled( bool ) ) );
- disconnect( videoView, SIGNAL( itemsSelected( bool ) ),
- d->tbPlay, SLOT( setEnabled( bool ) ) );
+ disconnect( audioView, SIGNAL( itemsSelected(bool) ),
+ d->tbPlay, SLOT( setEnabled(bool) ) );
+ disconnect( videoView, SIGNAL( itemsSelected(bool) ),
+ d->tbPlay, SLOT( setEnabled(bool) ) );
currentFileListView = 0;
switch ( currentTab() ) {
case CurrentPlayList:
{
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(TRUE);
d->tbAddToList->setEnabled(FALSE);
d->tbPlay->setEnabled( !d->selectedFiles->isEmpty() );
}
break;
case AudioFiles:
{
audioView->populateView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(FALSE);
d->tbAddToList->setEnabled(TRUE);
- connect( audioView, SIGNAL( itemsSelected( bool ) ),
- d->tbPlay, SLOT( setEnabled( bool ) ) );
+ connect( audioView, SIGNAL( itemsSelected(bool) ),
+ d->tbPlay, SLOT( setEnabled(bool) ) );
d->tbPlay->setEnabled( audioView->hasSelection() );
currentFileListView = audioView;
}
break;
case VideoFiles:
{
videoView->populateView();
if( !tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->hide();
}
d->tbRemoveFromList->setEnabled(FALSE);
d->tbAddToList->setEnabled(TRUE);
- connect( videoView, SIGNAL( itemsSelected( bool ) ),
- d->tbPlay, SLOT( setEnabled( bool ) ) );
+ connect( videoView, SIGNAL( itemsSelected(bool) ),
+ d->tbPlay, SLOT( setEnabled(bool) ) );
d->tbPlay->setEnabled( videoView->hasSelection() );
currentFileListView = videoView;
}
break;
case PlayLists:
{
if( tbDeletePlaylist->isHidden() ) {
tbDeletePlaylist->show();
}
playLists->reread();
d->tbAddToList->setEnabled(FALSE);
d->tbPlay->setEnabled( false );
}
break;
};
}
void PlayListWidget::btnPlay(bool b) {
// mediaPlayerState->setPlaying(false);
mediaPlayerState->setPlaying(b);
insanityBool=FALSE;
}
void PlayListWidget::deletePlaylist() {
switch( QMessageBox::information( this, (tr("Remove Playlist?")),
(tr("You really want to delete\nthis playlist?")),
(tr("Yes")), (tr("No")), 0 )){
case 0: // Yes clicked,
QFile().remove(playLists->selectedDocument().file());
QFile().remove(playLists->selectedDocument().linkFile());
playLists->reread();
break;
case 1: // Cancel
break;
};
}
void PlayListWidget::playSelected() {
btnPlay( TRUE);
}
bool PlayListWidget::inFileListMode() const
{
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index fec91ea..33fe188 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -56,97 +56,97 @@ PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name )
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->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 );
gammaSlider->setValue( 0 );
gammaSlider->setMinimumHeight( 50 );
gammaLCD = new QLCDNumber( 3, gammaMenu );
gammaLCD-> setFrameShape ( QFrame::NoFrame );
gammaLCD-> setSegmentStyle ( QLCDNumber::Flat );
gammaMenu->insertItem( gammaSlider );
gammaMenu->insertItem( gammaLCD );
- connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) );
+ connect( gammaSlider, SIGNAL( valueChanged(int) ), gammaLCD, SLOT( display(int) ) );
vbox5 = new QVBox( this );
QVBox *vbox4 = new QVBox( vbox5 );
QHBox *hbox6 = new QHBox( vbox4 );
tabWidget = new QTabWidget( hbox6, "tabWidget" );
playListTab = new QWidget( tabWidget, "PlayListTab" );
tabWidget->insertTab( playListTab, "Playlist");
QGridLayout *Playout = new QGridLayout( playListTab );
Playout->setSpacing( 2);
Playout->setMargin( 2);
// Add the playlist area
QVBox *vbox3 = new QVBox( playListTab );
d->playListFrame = vbox3;
QHBox *hbox2 = new QHBox( vbox3 );
d->selectedFiles = new PlayListSelection( hbox2 );
vbox1 = new QVBox( hbox2 );
QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold );
QVBox *stretch1 = new QVBox( vbox1 ); // add stretch
Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 );
QWidget *aTab;
aTab = new QWidget( tabWidget, "aTab" );
QGridLayout *Alayout = new QGridLayout( aTab );
Alayout->setSpacing( 2 );
Alayout->setMargin( 2 );
// no m3u's here please
audioView = new PlayListFileView( "audio/mpeg;audio/x-wav;application/ogg", "opieplayer2/musicfile", aTab, "Audioview" );
Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 );
tabWidget->insertTab( aTab, tr( "Audio" ) );
QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold );
QWidget *vTab;
vTab = new QWidget( tabWidget, "vTab" );
QGridLayout *Vlayout = new QGridLayout( vTab );
Vlayout->setSpacing( 2 );
Vlayout->setMargin( 2 );
videoView = new PlayListFileView( "video/*", "opieplayer2/videofile", vTab, "Videoview" );
Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 );
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index ff38b1e..fb951b4 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -195,97 +195,97 @@ void Thread::start()
pthread_attr_init( &attributes );
pthread_attr_setscope( &attributes, PTHREAD_SCOPE_SYSTEM );
int err = pthread_create( &d->self, &attributes, start_thread, ( void* )d );
if ( err != 0 ) {
qDebug( "ThreadUtil::Thread::start() : can't create thread: %s", strerror( err ) );
pthread_attr_destroy( &attributes );
return;
}
pthread_attr_destroy( &attributes );
}
void Thread::terminate()
{
AutoLock lock( d->guard );
if ( !d->isRunning )
return;
pthread_cancel( d->self );
}
bool Thread::wait()
{
AutoLock lock( d->guard );
if ( !d->isRunning )
return true;
return d->finishCondition.wait( d->guard );
}
bool Thread::isRunning() const
{
AutoLock lock( d->guard );
return d->isRunning;
}
void Thread::exit()
{
pthread_exit( 0 );
}
OnewayNotifier::OnewayNotifier()
{
int fds[ 2 ];
pipe( fds );
m_readFd = fds[ 0 ];
m_writeFd = fds[ 1 ];
m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read );
- connect( m_notifier, SIGNAL( activated( int ) ),
+ connect( m_notifier, SIGNAL( activated(int) ),
this, SLOT( wakeUp() ) );
}
OnewayNotifier::~OnewayNotifier()
{
delete m_notifier;
::close( m_readFd );
::close( m_writeFd );
}
void OnewayNotifier::notify()
{
const char c = 42;
::write( m_writeFd, &c, 1 );
}
void OnewayNotifier::wakeUp()
{
char c = 0;
if ( ::read( m_readFd, &c, 1 ) != 1 )
return;
emit awake();
}
ChannelMessage::ChannelMessage( int type )
: m_type( type ), m_isCall( false ), m_replied( false ),
m_inEventHandler( false )
{
}
ChannelMessage::~ChannelMessage()
{
if ( m_guard.isLocked() )
m_guard.unlock();
}
void ChannelMessage::reply()
{
if ( !m_isCall )
{
qDebug( "ChannelMessage::reply() - can't reply oneway message!" );
return;
}
if ( m_inEventHandler )
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index c829e03..a4d09f5 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -26,98 +26,98 @@
  -_. . .   )=.  = 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 "videowidget.h"
#include "mediaplayerstate.h"
#include "playlistwidget.h"
#ifdef Q_WS_QWS
# define USE_DIRECT_PAINTER
# include <qdirectpainter_qws.h>
# include <qgfxraster_qws.h>
#endif
namespace
{
const int xo = 2; // movable x offset
const int yo = 0; // movable y offset
const MediaWidget::SkinButtonInfo skinInfo[] =
{
{ MediaWidget::Play, "play", MediaWidget::ToggleButton },
{ MediaWidget::Stop, "stop", MediaWidget::NormalButton },
{ MediaWidget::Next, "fwd", MediaWidget::NormalButton },
{ MediaWidget::Previous, "back", MediaWidget::NormalButton },
{ MediaWidget::VolumeUp, "up", MediaWidget::NormalButton },
{ MediaWidget::VolumeDown, "down", MediaWidget::NormalButton },
{ MediaWidget::FullScreen, "full", MediaWidget::ToggleButton }
};
const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] );
}
VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
: MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false )
{
setCaption( tr("OpiePlayer - Video") );
videoFrame = new XineVideoWidget ( this, "Video frame" );
- connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
- connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
+ connect ( videoFrame, SIGNAL( videoResized(const QSize&)), this, SIGNAL( videoResized(const QSize&)));
+ connect ( videoFrame, SIGNAL( clicked() ), this, SLOT ( backToNormal() ) );
slider = 0;
loadSkin();
setLength( mediaPlayerState.length() );
setPosition( mediaPlayerState.position() );
setFullscreen( mediaPlayerState.isFullscreen() );
setPlaying( mediaPlayerState.isPlaying() );
}
VideoWidget::~VideoWidget()
{
}
MediaWidget::GUIInfo VideoWidget::guiInfo()
{
return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount );
}
void VideoWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
//int Vh = 160;
//int Vw = 220;
slider->setFixedWidth( w - 20 );
slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
slider->setBackgroundOrigin( QWidget::ParentOrigin );
slider->setFocusPolicy( QWidget::NoFocus );
slider->setBackgroundPixmap( backgroundPixmap );
upperLeftOfButtonMask.rx() = 0;// ( imgUp->width() ) / 2;
if(w>h)
upperLeftOfButtonMask.ry() = 0;
else
upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10;
MediaWidget::resizeEvent( e );
}
void VideoWidget::sliderPressed() {
videoSliderBeingMoved = TRUE;
}
void VideoWidget::sliderReleased() {
videoSliderBeingMoved = FALSE;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index a392f4a..70f2ffd 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -20,104 +20,104 @@
    =_        +     =;=|` 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 <qtimer.h>
#include <qmessagebox.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include "xinecontrol.h"
#include "mediaplayerstate.h"
#include "xinevideowidget.h"
XineControl::XineControl( XineVideoWidget *xineWidget,
MediaPlayerState &_mediaPlayerState,
QObject *parent, const char *name )
: QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
{
libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget );
init();
}
XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget,
MediaPlayerState &_mediaPlayerState,
QObject *parent, const char *name )
: QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget )
{
xine->ensureInitialized();
xine->setWidget( xineWidget );
init();
}
void XineControl::init()
{
- connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
- connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) );
- connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
- connect( &mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
- connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
- connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );
+ connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) );
+ connect( this, SIGNAL( positionChanged(long) ), &mediaPlayerState, SLOT( updatePosition(long) ) );
+ connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( stop(bool) ) );
+ connect( &mediaPlayerState, SIGNAL( fullscreenToggled(bool) ), this, SLOT( setFullscreen(bool) ) );
+ connect( &mediaPlayerState, SIGNAL( positionChanged(long) ), this, SLOT( seekTo(long) ) );
+ connect( &mediaPlayerState, SIGNAL( videoGammaChanged(int) ), this, SLOT( setGamma(int) ) );
connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
- connect( xineVideoWidget, SIGNAL( videoResized( const QSize & ) ), this, SLOT( videoResized ( const QSize & ) ) );
+ connect( xineVideoWidget, SIGNAL( videoResized(const QSize&) ), this, SLOT( videoResized(const QSize&) ) );
disabledSuspendScreenSaver = FALSE;
}
XineControl::~XineControl() {
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
if ( disabledSuspendScreenSaver ) {
disabledSuspendScreenSaver = FALSE;
// Re-enable the suspend mode
QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
}
#endif
delete libXine;
}
void XineControl::play( const QString& fileName ) {
hasVideoChannel = FALSE;
hasAudioChannel = FALSE;
m_fileName = fileName;
qDebug("<<FILENAME: " + fileName + ">>>>");
if ( !libXine->play( fileName, 0, 0 ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
// toggle stop so the the play button is reset
mediaPlayerState.setPlaying( false );
return;
}
mediaPlayerState.setPlaying( true );
MediaPlayerState::DisplayType displayType;
if ( !libXine->hasVideo() ) {
displayType = MediaPlayerState::Audio;
qDebug("HAS AUDIO");
libXine->setShowVideo( false );
hasAudioChannel = TRUE;
} else {
displayType = MediaPlayerState::Video;
qDebug("HAS VIDEO");
libXine->setShowVideo( true );
hasVideoChannel = TRUE;
}
// determine if slider is shown
mediaPlayerState.setIsSeekable( libXine->isSeekable() );
// which gui (video / audio)
mediaPlayerState.setDisplayType( displayType );
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp
index 0a6e5ae..f2035ef 100644
--- a/noncore/multimedia/opierec/qtrec.cpp
+++ b/noncore/multimedia/opierec/qtrec.cpp
@@ -716,130 +716,130 @@ void QtRec::initIconView() {
Config cfg("OpieRec");
cfg.setGroup("Sounds");
QString temp;
QPixmap image0( ( const char** ) image0_data );
int nFiles = cfg.readNumEntry("NumberofFiles",0);
// qDebug("init number of files %d", nFiles);
for(int i=1;i<= nFiles;i++) {
QListViewItem * item;
QString fileS, mediaLocation, fileDate, filePath;
temp.sprintf( "%d",i);
temp = cfg.readEntry( temp,""); //reads currentFile
filePath = cfg.readEntry( temp,""); //currentFileName
QFileInfo info(filePath);
fileDate = info.lastModified().toString();
fileS = cfg.readEntry( filePath, "0" );// file length in seconds
mediaLocation = getStorage( filePath);
if( info.exists()) {
item = new QListViewItem( ListView1, temp, fileS, mediaLocation, fileDate);
item->setPixmap( 0, image0);
if( currentFileName == filePath)
ListView1->setSelected( item, true);
}
}
}
void QtRec::initConnections() {
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
connect( toBeginningButton, SIGNAL( pressed()),
this, SLOT( rewindPressed() ));
connect( toBeginningButton, SIGNAL( released()),
this, SLOT( rewindReleased() ));
connect( toEndButton, SIGNAL( pressed()),
this, SLOT( FastforwardPressed() ));
connect( toEndButton, SIGNAL( released()),
this, SLOT( FastforwardReleased() ));
connect( deleteSoundButton, SIGNAL(released()),
this, SLOT( deleteSound() ));
connect( Stop_PushButton, SIGNAL(released()),
this, SLOT( doPlayBtn() ));
connect( Rec_PushButton, SIGNAL(released()),
this, SLOT( newSound() ) );
- connect( TabWidget, SIGNAL( currentChanged( QWidget*)),
+ connect( TabWidget, SIGNAL( currentChanged(QWidget*)),
this, SLOT(thisTab(QWidget*) ));
connect( OutputSlider, SIGNAL(sliderReleased()),
this, SLOT( changedOutVolume()) );
connect( InputSlider, SIGNAL(sliderReleased()),
this, SLOT( changedInVolume()) );
- connect( sampleRateComboBox, SIGNAL(activated( int)),
+ connect( sampleRateComboBox, SIGNAL(activated(int)),
this, SLOT( changesamplerateCombo(int)) );
- connect( bitRateComboBox, SIGNAL(activated( int)),
+ connect( bitRateComboBox, SIGNAL(activated(int)),
this, SLOT( changebitrateCombo(int)) );
- connect( directoryComboBox, SIGNAL(activated( int)),
+ connect( directoryComboBox, SIGNAL(activated(int)),
this, SLOT( changeDirCombo(int)) );
- connect( sizeLimitCombo, SIGNAL(activated( int)),
+ connect( sizeLimitCombo, SIGNAL(activated(int)),
this, SLOT( changeSizeLimitCombo(int)) );
- connect( stereoCheckBox, SIGNAL(toggled( bool)),
+ connect( stereoCheckBox, SIGNAL(toggled(bool)),
this, SLOT( changeStereoCheck(bool)) );
- connect( outMuteCheckBox, SIGNAL(toggled( bool)),
+ connect( outMuteCheckBox, SIGNAL(toggled(bool)),
this, SLOT( doVolMuting(bool)) );
- connect( inMuteCheckBox , SIGNAL(toggled( bool)),
+ connect( inMuteCheckBox , SIGNAL(toggled(bool)),
this, SLOT( doMicMuting(bool)) );
- connect( ListView1,SIGNAL(doubleClicked( QListViewItem*)),
+ connect( ListView1,SIGNAL(doubleClicked(QListViewItem*)),
this,SLOT( itClick(QListViewItem*)));
- connect( ListView1, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
- this,SLOT( listPressed(int, QListViewItem *, const QPoint&, int)) );
- connect( timeSlider, SIGNAL( sliderMoved( int)),
+ connect( ListView1, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),
+ this,SLOT( listPressed(int,QListViewItem*,const QPoint&,int)) );
+ connect( timeSlider, SIGNAL( sliderMoved(int)),
this, SLOT( changeTimeSlider(int) ));
- connect( timeSlider, SIGNAL( sliderPressed( )),
+ connect( timeSlider, SIGNAL( sliderPressed()),
this, SLOT( timeSliderPressed() ));
- connect( timeSlider, SIGNAL( sliderReleased( )),
+ connect( timeSlider, SIGNAL( sliderReleased()),
this, SLOT( timeSliderReleased() ));
connect( compressionCheckBox, SIGNAL( toggled(bool)),
this, SLOT( compressionSelected(bool)));
connect( autoMuteCheckBox, SIGNAL( toggled(bool)),
this, SLOT( slotAutoMute(bool)));
}
void QtRec::initConfig() {
int index, fred, i;
Config cfg("OpieRec");
cfg.setGroup("Settings");
index = cfg.readNumEntry("samplerate",22050);
bool ok;
for(int ws=0;ws<sampleRateComboBox->count();ws++) {
fred = sampleRateComboBox->text(ws).toInt(&ok, 10);
if( index == fred) {
filePara.sampleRate = fred;
sampleRateComboBox->setCurrentItem(ws);
}
}
i = cfg.readNumEntry("bitrate",16);
if(i == 16)
bitRateComboBox->setCurrentItem( 1);
else if(i == 24)
bitRateComboBox->setCurrentItem( 2);
else if(i == 32)
bitRateComboBox->setCurrentItem( 3);
else
bitRateComboBox->setCurrentItem( 0);
filePara.resolution = i;
i = cfg.readNumEntry("sizeLimit", 5 );
QString temp;
sizeLimitCombo->setCurrentItem((i/5));
stereoCheckBox->setChecked( cfg.readBoolEntry("stereo", 1));
if( stereoCheckBox->isChecked()) {
filePara.channels = 2;
} else {
filePara.channels = 1;
}
compressionCheckBox->setChecked( cfg.readBoolEntry("wavCompression",1));
if( compressionCheckBox->isChecked()) {
@@ -1611,97 +1611,97 @@ void QtRec::listPressed( int mouse, QListViewItem *item, const QPoint &, int ) {
}
break;
case 2:
showListMenu(item);
ListView1->clearSelection();
break;
};
}
void QtRec::showListMenu(QListViewItem * item) {
if(item == NULL)
return;
QPopupMenu *m = new QPopupMenu(this);
m->insertItem( tr("Play"), this, SLOT( doMenuPlay() ));
if(Ir::supported()) m->insertItem( tr( "Send with Ir" ), this, SLOT( doBeam() ));
m->insertItem( tr( "Rename" ), this, SLOT( doRename() ));
// #if defined (QTOPIA_INTERNAL_FSLP)
// m->insertItem( tr( "Properties" ), this, SLOT( doProperties() ));
// #endif
m->insertSeparator();
m->insertItem( tr("Delete"), this, SLOT( deleteSound() ) );
m->exec( QCursor::pos() );
qApp->processEvents();
}
void QtRec::fileBeamFinished( Ir *ir) {
if(ir)
QMessageBox::message( tr("Ir Beam out"), tr("Ir sent.") ,tr("Ok") );
}
void QtRec::doBeam() {
qApp->processEvents();
if( ListView1->currentItem() == NULL)
return;
Ir ir;
if( ir.supported()) {
QString file = ListView1->currentItem()->text(0);
Config cfg("OpieRec");
cfg.setGroup("Sounds");
int nFiles = cfg.readNumEntry("NumberofFiles",0);
for(int i=0;i<nFiles+1;i++) {
if( cfg.readEntry( QString::number( i),"").find( file, 0, true) != -1) {
QString filePath = cfg.readEntry(file,"");
Ir *file = new Ir(this, "IR");
connect( file, SIGNAL( done(Ir*)),
- this, SLOT( fileBeamFinished( Ir * )));
+ this, SLOT( fileBeamFinished(Ir*)));
file->send( filePath, "OPieRec audio file\n" + filePath );
}
}
}
}
void QtRec::doMenuPlay() {
qApp->processEvents();
currentFile = ListView1->currentItem()->text(0);
}
void QtRec::doRename() {
QRect r = ListView1->itemRect( ListView1->currentItem( ));
r = QRect( ListView1->viewportToContents( r.topLeft() ), r.size() );
r.setX( ListView1->contentsX() );
if ( r.width() > ListView1->visibleWidth() )
r.setWidth( ListView1->visibleWidth() );
renameBox = new QLineEdit( ListView1->viewport(), "qt_renamebox" );
renameBox->setFrame(true);
renameBox->setText( ListView1->currentItem()->text(0) );
renameBox->selectAll();
renameBox->installEventFilter( this );
ListView1->addChild( renameBox, r.x(), r.y() );
renameBox->resize( r.size() );
ListView1->viewport()->setFocusProxy( renameBox );
renameBox->setFocus();
renameBox->show();
}
void QtRec::okRename() {
qDebug(renameBox->text());
QString filename = renameBox->text();
cancelRename();
if( ListView1->currentItem() == NULL)
return;
Config cfg("OpieRec");
cfg.setGroup("Sounds");
QString file = ListView1->currentItem()->text(0);
qDebug("filename is " + filename);
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp
index 0b97984..7978426 100644
--- a/noncore/multimedia/powerchord/powerchordbase.cpp
+++ b/noncore/multimedia/powerchord/powerchordbase.cpp
@@ -339,103 +339,103 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl )
tuner_calib_freq->setWrapping( TRUE );
tuner_calib_freq->setMaxValue( 500 );
tuner_calib_freq->setMinValue( 300 );
tuner_calib_freq->setValue( 440 );
tuner_lab3 = new QLabel( Tuner, "tuner_lab3" );
tuner_lab3->setGeometry( QRect( 185, 225, 40, 21 ) );
tuner_lab3->setText( tr( "Pitch" ) );
tuner_pic1 = new QLabel( Tuner, "tuner_pic1" );
tuner_pic1->setGeometry( QRect( 195, 155, 31, 31 ) );
tuner_pic1->setFrameShape( QLabel::NoFrame );
tuner_pic1->setPixmap( image6 );
tuner_pic1->setScaledContents( TRUE );
tabs->insertTab( Tuner, tr( "Tuner" ) );
tab_3 = new QWidget( tabs, "tab_3" );
chordlistlab1 = new QLabel( tab_3, "chordlistlab1" );
chordlistlab1->setGeometry( QRect( 5, 5, 216, 16 ) );
chordlistlab1->setText( tr( "Chord list" ) );
chordlist = new QListBox( tab_3, "chordlist" );
chordlist->setGeometry( QRect( 5, 25, 220, 200 ) );
list_remove_btn = new QPushButton( tab_3, "list_remove_btn" );
list_remove_btn->setGeometry( QRect( 150, 230, 71, 25 ) );
list_remove_btn->setText( tr( "Remove" ) );
tabs->insertTab( tab_3, tr( "Chords" ) );
// hope this does what it's supposed to!!
// setPalette( QPalette( QColor( 232, 227, 215) ) );
// signals and slots connections
//cxm
connect( tuning, SIGNAL( activated(int) ), frets, SLOT( Tune(int) ) );
connect( span, SIGNAL( activated(int) ), frets, SLOT( Span(int) ) );
connect( transport_rec, SIGNAL( clicked() ), this, SLOT( transport_rec_cb() ));
connect( play_sound, SIGNAL( clicked() ), this, SLOT( play_chord_cb() ));
connect( tuner_start, SIGNAL( clicked() ), this, SLOT( tuner_start_cb() ));
connect( tuner_note, SIGNAL( textChanged(const QString&) ), vu, SLOT( AnnotL(const QString&) ));
connect( this, SIGNAL( frequency_change(int) ), vu, SLOT( Value(int) ));
connect( chordnote, SIGNAL( activated(int) ), frets, SLOT( Base(int) ) );
connect( chordkey, SIGNAL( activated(int) ), frets, SLOT( Chord(int) ) );
connect( chordfret, SIGNAL( activated(int) ), frets, SLOT( Fret(int) ) );
connect( list_remove_btn, SIGNAL( clicked() ), this, SLOT( list_remove_cb() ) );
- connect( frets, SIGNAL( s1nameChanged(const QString &) ), s1_1, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( s2nameChanged(const QString &) ), s1_2, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( s3nameChanged(const QString &) ), s1_3, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( s4nameChanged(const QString &) ), s1_4, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( s5nameChanged(const QString &) ), s1_5, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( s6nameChanged(const QString &) ), s1_6, SLOT( setText(const QString&) ) );
- connect( frets, SIGNAL( nameChanged(const QString &) ), chordname, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s1nameChanged(const QString&) ), s1_1, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s2nameChanged(const QString&) ), s1_2, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s3nameChanged(const QString&) ), s1_3, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s4nameChanged(const QString&) ), s1_4, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s5nameChanged(const QString&) ), s1_5, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( s6nameChanged(const QString&) ), s1_6, SLOT( setText(const QString&) ) );
+ connect( frets, SIGNAL( nameChanged(const QString&) ), chordname, SLOT( setText(const QString&) ) );
}
static int known=0;
#include <qmessagebox.h>
void PowerchordBase::transport_rec_cb(){
chordlist->insertItem(chordname->text(),-1);
if (!known){
QMessageBox::information(this, "Powerchord", "This chord has been saved\ninto the list of chords,\nfor later playback.");
known = 1;
}
}
void PowerchordBase::list_remove_cb(){
if (chordlist->count() > 0){
chordlist->removeItem(0);
}
}
void PowerchordBase::play_chord_cb(){
// QMessageBox::information(this, "Coming soon!", "This button plays\nthe chord by synthesizing\nthe sound of the notes.");
if (audio_timer){
audio_timer->stop();
// set pixmap?
synth->Stop();
delete(audio_timer);
audio_timer = 0;
}else{
// get notes from chord engine
int note;
int base;
int octave;
note = frets->ce.noteindex(0);
if (note >= 0){
// fprintf(stderr, "Note was %d\n", note);
base = note % 12;
octave = note / 12;
synth->note_start(0, base, octave);
}else{
// subtle bug here - replay second note if 1st one muted
note = frets->ce.noteindex(1);
base = note % 12;
octave = note / 12;
synth->note_start(1, base, octave);
}
diff --git a/noncore/multimedia/showimg/ImageFileSelector.cpp b/noncore/multimedia/showimg/ImageFileSelector.cpp
index 7872c09..d2b65a9 100644
--- a/noncore/multimedia/showimg/ImageFileSelector.cpp
+++ b/noncore/multimedia/showimg/ImageFileSelector.cpp
@@ -54,102 +54,102 @@ void ThumbWidget::paintEvent( QPaintEvent *e )
void ThumbWidget::mouseReleaseEvent(QMouseEvent* )
{
emit clicked(fl);
}
ImageFileSelectorItem::ImageFileSelectorItem( QListView *parent, const DocLnk &f)
: QListViewItem( parent ), fl( f )
{
setText( 0, f.name() );
QFileInfo fi(f.file());
setText( 1, (fi.extension()).upper() );
setPixmap( 0, f.pixmap() );
}
ImageFileSelectorItem::~ImageFileSelectorItem()
{
}
ImageFileSelector::ImageFileSelector( CURRENT_VIEW scv,QWidget *parent,const char * )
: QWidgetStack(parent)
{
detailed=new QListView(this);
detailed->addColumn (tr("Title"));
detailed->addColumn (tr("Type"));
detailed->setAllColumnsShowFocus( true );
tList.setAutoDelete(true);
thumb =new QScrollView(this);
thumb->setVScrollBarMode (QScrollView::Auto );
thumb->viewport()->setBackgroundColor(colorGroup().base());
background=new QWidget(0);
background->setBackgroundColor(colorGroup().base());
thumb->addChild(background);
gl = new QGridLayout(background,1,2,4,4);
- connect( detailed, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ),
- this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) );
- connect( detailed, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ),
- this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) );
- connect( detailed, SIGNAL( returnPressed( QListViewItem * ) ),
- this, SLOT( fileClicked( QListViewItem * ) ) );
+ connect( detailed, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),
+ this, SLOT( fileClicked(int,QListViewItem*,const QPoint&,int) ) );
+ connect( detailed, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
+ this, SLOT( filePressed(int,QListViewItem*,const QPoint&,int) ) );
+ connect( detailed, SIGNAL( returnPressed(QListViewItem*) ),
+ this, SLOT( fileClicked(QListViewItem*) ) );
cView=UNKNOWN;
setView(scv);
reread();
}
ImageFileSelector::~ImageFileSelector()
{
}
void ImageFileSelector::switchView()
{
CURRENT_VIEW v=cView;
if ( v==DETAILED )
v=THUMBNAIL;
else
v=DETAILED;
setView(v);
}
void ImageFileSelector::setView(CURRENT_VIEW v)
{
if ( v==cView )
return;
cView=v;
if ( cView!=DETAILED )
{
raiseWidget(thumb);
updateSizes();
}
else
{
raiseWidget(detailed);
updateSizes();
}
}
void ImageFileSelector::resizeEvent(QResizeEvent *)
{
updateSizes();
}
@@ -168,97 +168,97 @@ void ImageFileSelector::reread(bool)
{
// qDebug("reread");
ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem();
QString oldFile;
if ( item )
oldFile = item->file().file();
detailed->clear();
tList.clear();
DocLnkSet files;
Global::findDocuments(&files, "image/*");
count = files.children().count();
QListIterator<DocLnk> dit( files.children() );
// int y=0;
// int x=4;
// int totalHeight=4;
ThumbWidget *l=0;
int width=80;
gl->expand(dit.count()/2,2);
int i,j;
i=j=0;
detailed->setUpdatesEnabled(false);
thumb->setUpdatesEnabled(false);
for ( ; dit.current(); ++dit ) {
item = new ImageFileSelectorItem( detailed, **dit );
if ( item->file().file() == oldFile )
detailed->setCurrentItem( item );
}
QListViewItemIterator it( detailed );
ImageFileSelectorItem *ii;
// iterate through all items of the listview
for ( ; it.current(); ++it ) {
ii=(ImageFileSelectorItem *)it.current();
QImage img( ii->file().file() );
if( !img.isNull()) {
img=img.smoothScale(64,64);
QPixmap pix;
pix.convertFromImage(img);
l=new ThumbWidget(pix,ii->file().name(),ii->file(),background,width);
l->setBackgroundColor(colorGroup().base());
gl->addWidget(l,j,i);
i++;
if ( i==2 ) {
i=0;
j++;
}
tList.append(l);
- connect(l,SIGNAL(clicked(const DocLnk &)),this,SLOT(thumbClicked(const DocLnk &)));
+ connect(l,SIGNAL(clicked(const DocLnk&)),this,SLOT(thumbClicked(const DocLnk&)));
}
}
if ( !detailed->selectedItem() )
detailed->setCurrentItem( detailed->firstChild() );
detailed->setUpdatesEnabled(true);
thumb->setUpdatesEnabled(true);
detailed->update();
thumb->update();
}
int ImageFileSelector::fileCount()
{
return count;
}
const DocLnk * ImageFileSelector::selected()
{
qDebug("image selected");
ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem();
if ( item )
return new DocLnk( item->file() );
return 0;
}
void ImageFileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int )
{
if ( !i )
return;
if ( button == Qt::LeftButton )
{
fileClicked( i );
}
}
// pressed to get 'right down'
void ImageFileSelector::filePressed( int, QListViewItem *, const QPoint &, int )
{
}
void ImageFileSelector::fileClicked( QListViewItem *i)
{
if ( !i )
return;
emit fileSelected( ( (ImageFileSelectorItem*)i )->file() );
emit closeMe();
}
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index ba76e57..02a1d91 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -263,98 +263,98 @@ ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags )
// optionsMenuFile->insertItem( tr("Slideshow") );
optionsMenuFile->insertSeparator();
optionsMenuFile->insertItem( tr("Preferences.."), this, SLOT(settings()), 0);
// optionsMenuFile->insertItem( tr("Help"), this, SLOT(help()), 0);
QStrList fmt = QImage::outputFormats();
fileMenuView = new QPopupMenu( this );
//menubarView->insertItem( tr("File"),fileMenu );
fileMenuView->insertItem( tr("Image Info ..."),this, SLOT(displayInfoDialog()),0 );
fileMenuView->insertSeparator();
viewMenuView = new QPopupMenu(this );
viewMenuView->setCheckable ( true );
//menubarView->insertItem( tr("View"),viewMenu );
viewMenuView->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0);
viewMenuView->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0);
stack = new QWidgetStack( this );
stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
setCentralWidget( stack );
imagePanel = new ImagePane( stack );
connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView()));
ImageFileSelector::CURRENT_VIEW cv;
if(showThumbView)
cv=ImageFileSelector::THUMBNAIL;
else
cv=ImageFileSelector::DETAILED;
qDebug("cv = %d",cv);
fileSelector = new ImageFileSelector( cv,stack, "fs");
//switchThumbView();
//fileSelector = new ImageFileSelector("image/*", stack, "fs");
//fileSelector->setNewVisible(FALSE);
//fileSelector->setCloseVisible(FALSE);
connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) );
- connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ),
- this, SLOT( openFile( const DocLnk & ) ) );
+ connect( fileSelector, SIGNAL( fileSelected(const DocLnk&) ),
+ this, SLOT( openFile(const DocLnk&) ) );
imageList = fileSelector->fileList();
slideAction->setEnabled( imageList.count() != 0);
iconToolBar = new QToolBar(this);
QAction *a;
a = new QAction( tr( "Open ..." ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( open() ) );
a->addTo( fileMenuView);
a->addTo( iconToolBar );
a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0);
connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) );
a->addTo( iconToolBar );
a->addTo( viewMenuView );
a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) );
a->addTo( iconToolBar );
a->addTo( viewMenuView );
a = new QAction( tr( "Rotate 270"), Resource::loadPixmap( "rotate270" ), QString::null, 0, this, 0);
connect( a, SIGNAL( activated() ), this, SLOT( rot270() ) );
//a->addTo( iconToolBar );
a->addTo( viewMenuView );
viewMenuView->insertSeparator();
viewMenuView->insertItem(tr("Brightness ..."), this, SLOT(displayControlsDialog()), 0);
viewMenuView->insertItem(tr("Black And White"), this, SLOT(blackAndWhite()), 0,BLACKANDWHITE);
viewMenuView->insertSeparator();
sss = new QAction( tr( "Scale to Screen"), Resource::loadPixmap( "scale" ), QString::null, 0, this, 0,true);
connect( sss, SIGNAL( activated() ), this, SLOT( switchSizeToScreen() ) );
sss->addTo( iconToolBar );
sss->addTo( viewMenuView );
sss->setOn(isSized);
viewMenuView->insertSeparator();
a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ),