author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/multimedia | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
-rw-r--r-- | noncore/multimedia/camera/gui/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 12 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 88 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 30 | ||||
-rw-r--r-- | noncore/multimedia/powerchord/powerchordbase.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.cpp | 14 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 4 |
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 | |||
@@ -77,50 +77,50 @@ CameraMainWindow::CameraMainWindow( QWidget * parent, const char * name, WFlags | |||
77 | v->setMargin( 10 ); | 77 | v->setMargin( 10 ); |
78 | QLabel* l1 = new QLabel( v ); | 78 | QLabel* l1 = new QLabel( v ); |
79 | l1->setPixmap( Resource::loadPixmap( "camera/error" ) ); | 79 | l1->setPixmap( Resource::loadPixmap( "camera/error" ) ); |
80 | QLabel* l2 = new QLabel( v ); | 80 | QLabel* l2 = new QLabel( v ); |
81 | l2->setText( "<b>Sorry. could not detect your camera :-(</b><p>" | 81 | l2->setText( "<b>Sorry. could not detect your camera :-(</b><p>" |
82 | "* Is the sharpzdc_cs module loaded ?<br>" | 82 | "* Is the sharpzdc_cs module loaded ?<br>" |
83 | "* Is /dev/sharpzdc read/writable ?<p>" ); | 83 | "* Is /dev/sharpzdc read/writable ?<p>" ); |
84 | connect( new QPushButton( "Exit", v ), SIGNAL( clicked() ), this, SLOT( close() ) ); | 84 | connect( new QPushButton( "Exit", v ), SIGNAL( clicked() ), this, SLOT( close() ) ); |
85 | setCentralWidget( v ); | 85 | setCentralWidget( v ); |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | init(); | 90 | init(); |
91 | 91 | ||
92 | _rotation = 270; //TODO: grab these from the actual settings | 92 | _rotation = 270; //TODO: grab these from the actual settings |
93 | 93 | ||
94 | preview = new PreviewWidget( this, "camera preview widget" ); | 94 | preview = new PreviewWidget( this, "camera preview widget" ); |
95 | //setCentralWidget( preview ); <--- don't do this! | 95 | //setCentralWidget( preview ); <--- don't do this! |
96 | preview->resize( QSize( 240, 288 ) ); | 96 | preview->resize( QSize( 240, 288 ) ); |
97 | preview->show(); | 97 | preview->show(); |
98 | 98 | ||
99 | // construct a System Channel to receive setRotation messages | 99 | // construct a System Channel to receive setRotation messages |
100 | _sysChannel = new QCopChannel( "QPE/System", this ); | 100 | _sysChannel = new QCopChannel( "QPE/System", this ); |
101 | connect( _sysChannel, SIGNAL( received( const QCString&, const QByteArray& ) ), | 101 | connect( _sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), |
102 | this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); | 102 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); |
103 | 103 | ||
104 | connect( preview, SIGNAL( contextMenuRequested() ), this, SLOT( showContextMenu() ) ); | 104 | connect( preview, SIGNAL( contextMenuRequested() ), this, SLOT( showContextMenu() ) ); |
105 | 105 | ||
106 | connect( ZCameraIO::instance(), SIGNAL( shutterClicked() ), this, SLOT( shutterClicked() ) ); | 106 | connect( ZCameraIO::instance(), SIGNAL( shutterClicked() ), this, SLOT( shutterClicked() ) ); |
107 | 107 | ||
108 | updateCaption(); | 108 | updateCaption(); |
109 | 109 | ||
110 | }; | 110 | }; |
111 | 111 | ||
112 | 112 | ||
113 | CameraMainWindow::~CameraMainWindow() | 113 | CameraMainWindow::~CameraMainWindow() |
114 | { | 114 | { |
115 | // write back configuration | 115 | // write back configuration |
116 | OConfigGroupSaver cgs( oApp->config(), "General" ); | 116 | OConfigGroupSaver cgs( oApp->config(), "General" ); |
117 | cgs.config()->writeEntry( "flip", flip ); | 117 | cgs.config()->writeEntry( "flip", flip ); |
118 | cgs.config()->writeEntry( "quality", quality ); | 118 | cgs.config()->writeEntry( "quality", quality ); |
119 | cgs.config()->writeEntry( "zoom", zoom ); | 119 | cgs.config()->writeEntry( "zoom", zoom ); |
120 | cgs.config()->writeEntry( "captureX", captureX ); | 120 | cgs.config()->writeEntry( "captureX", captureX ); |
121 | cgs.config()->writeEntry( "captureY", captureY ); | 121 | cgs.config()->writeEntry( "captureY", captureY ); |
122 | cgs.config()->writeEntry( "captureFormat", captureFormat ); | 122 | cgs.config()->writeEntry( "captureFormat", captureFormat ); |
123 | cgs.config()->writeEntry( "outputTo", outputTo ); | 123 | cgs.config()->writeEntry( "outputTo", outputTo ); |
124 | cgs.config()->writeEntry( "prefix", prefix ); | 124 | cgs.config()->writeEntry( "prefix", prefix ); |
125 | cgs.config()->writeEntry( "appendSettings", appendSettings ); | 125 | cgs.config()->writeEntry( "appendSettings", appendSettings ); |
126 | } | 126 | } |
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 | |||
@@ -58,49 +58,49 @@ const MediaWidget::SkinButtonInfo skinInfo[] = | |||
58 | { MediaWidget::Back, "back", MediaWidget::NormalButton } | 58 | { MediaWidget::Back, "back", MediaWidget::NormalButton } |
59 | }; | 59 | }; |
60 | 60 | ||
61 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); | 61 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); |
62 | 62 | ||
63 | void changeTextColor( QWidget * w) { | 63 | void changeTextColor( QWidget * w) { |
64 | QPalette p = w->palette(); | 64 | QPalette p = w->palette(); |
65 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); | 65 | p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); |
66 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); | 66 | p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); |
67 | w->setPalette( p ); | 67 | w->setPalette( p ); |
68 | } | 68 | } |
69 | 69 | ||
70 | } | 70 | } |
71 | 71 | ||
72 | AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : | 72 | AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : |
73 | 73 | ||
74 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), | 74 | MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), |
75 | audioSliderBeingMoved( false ) | 75 | audioSliderBeingMoved( false ) |
76 | { | 76 | { |
77 | setCaption( tr("OpiePlayer") ); | 77 | setCaption( tr("OpiePlayer") ); |
78 | 78 | ||
79 | loadSkin(); | 79 | loadSkin(); |
80 | 80 | ||
81 | connect( &mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 81 | connect( &mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
82 | connect( &mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | 82 | connect( &mediaPlayerState, SIGNAL( isSeekableToggled(bool) ), this, SLOT( setSeekable(bool) ) ); |
83 | 83 | ||
84 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); | 84 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); |
85 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); | 85 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); |
86 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); | 86 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); |
87 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); | 87 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); |
88 | 88 | ||
89 | // Intialise state | 89 | // Intialise state |
90 | setLength( mediaPlayerState.length() ); | 90 | setLength( mediaPlayerState.length() ); |
91 | setPosition( mediaPlayerState.position() ); | 91 | setPosition( mediaPlayerState.position() ); |
92 | setLooping( mediaPlayerState.isFullscreen() ); | 92 | setLooping( mediaPlayerState.isFullscreen() ); |
93 | // setPaused( mediaPlayerState->paused() ); | 93 | // setPaused( mediaPlayerState->paused() ); |
94 | setPlaying( mediaPlayerState.isPlaying() ); | 94 | setPlaying( mediaPlayerState.isPlaying() ); |
95 | } | 95 | } |
96 | 96 | ||
97 | AudioWidget::~AudioWidget() { | 97 | AudioWidget::~AudioWidget() { |
98 | 98 | ||
99 | // mediaPlayerState->setPlaying(false); | 99 | // mediaPlayerState->setPlaying(false); |
100 | } | 100 | } |
101 | 101 | ||
102 | MediaWidget::GUIInfo AudioWidget::guiInfo() | 102 | MediaWidget::GUIInfo AudioWidget::guiInfo() |
103 | { | 103 | { |
104 | return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount ); | 104 | return GUIInfo( QString::null /* infix */, ::skinInfo, ::buttonCount ); |
105 | } | 105 | } |
106 | 106 | ||
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 | |||
@@ -14,56 +14,56 @@ | |||
14 | 14 | ||
15 | // for setBacklight() | 15 | // for setBacklight() |
16 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
17 | #include <sys/file.h> | 17 | #include <sys/file.h> |
18 | #include <sys/ioctl.h> | 18 | #include <sys/ioctl.h> |
19 | 19 | ||
20 | 20 | ||
21 | #define FBIOBLANK 0x4611 | 21 | #define FBIOBLANK 0x4611 |
22 | 22 | ||
23 | MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) | 23 | MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) |
24 | : QObject( parent, name ), volumeDirection( 0 ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) { | 24 | : QObject( parent, name ), volumeDirection( 0 ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) { |
25 | 25 | ||
26 | m_audioUI = 0; | 26 | m_audioUI = 0; |
27 | m_videoUI = 0; | 27 | m_videoUI = 0; |
28 | m_xineControl = 0; | 28 | m_xineControl = 0; |
29 | xine = new XINE::Lib( XINE::Lib::InitializeInThread ); | 29 | xine = new XINE::Lib( XINE::Lib::InitializeInThread ); |
30 | 30 | ||
31 | fd=-1;fl=-1; | 31 | fd=-1;fl=-1; |
32 | playList.setCaption( tr( "OpiePlayer: Initializating" ) ); | 32 | playList.setCaption( tr( "OpiePlayer: Initializating" ) ); |
33 | 33 | ||
34 | qApp->processEvents(); | 34 | qApp->processEvents(); |
35 | // QPEApplication::grabKeyboard(); // EVIL | 35 | // QPEApplication::grabKeyboard(); // EVIL |
36 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 36 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
37 | 37 | ||
38 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); | 38 | connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
39 | 39 | ||
40 | // What is pauseCheck good for? (Simon) | 40 | // What is pauseCheck good for? (Simon) |
41 | // connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); | 41 | // connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pauseCheck(bool) ) ); |
42 | 42 | ||
43 | connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); | 43 | connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); |
44 | connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 44 | connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
45 | connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | 45 | connect( &mediaPlayerState, SIGNAL( blankToggled(bool) ), this, SLOT ( blank(bool) ) ); |
46 | 46 | ||
47 | volControl = new VolumeControl; | 47 | volControl = new VolumeControl; |
48 | Config cfg( "OpiePlayer" ); | 48 | Config cfg( "OpiePlayer" ); |
49 | cfg.setGroup("PlayList"); | 49 | cfg.setGroup("PlayList"); |
50 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); | 50 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); |
51 | playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); | 51 | playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); |
52 | 52 | ||
53 | m_skinLoader = new SkinLoader; | 53 | m_skinLoader = new SkinLoader; |
54 | m_skinLoader->schedule( AudioWidget::guiInfo() ); | 54 | m_skinLoader->schedule( AudioWidget::guiInfo() ); |
55 | m_skinLoader->schedule( VideoWidget::guiInfo() ); | 55 | m_skinLoader->schedule( VideoWidget::guiInfo() ); |
56 | m_skinLoader->start(); | 56 | m_skinLoader->start(); |
57 | } | 57 | } |
58 | 58 | ||
59 | MediaPlayer::~MediaPlayer() { | 59 | MediaPlayer::~MediaPlayer() { |
60 | // this shold never happen, but one never knows... | 60 | // this shold never happen, but one never knows... |
61 | if ( xine ) { | 61 | if ( xine ) { |
62 | xine->ensureInitialized(); | 62 | xine->ensureInitialized(); |
63 | delete xine; | 63 | delete xine; |
64 | } | 64 | } |
65 | delete m_xineControl; | 65 | delete m_xineControl; |
66 | delete m_audioUI; | 66 | delete m_audioUI; |
67 | delete m_videoUI; | 67 | delete m_videoUI; |
68 | delete volControl; | 68 | delete volControl; |
69 | } | 69 | } |
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 | |||
@@ -8,54 +8,54 @@ | |||
8 | modify it under the terms of the GNU General Public | 8 | modify it under the terms of the GNU General Public |
9 | License as published by the Free Software Foundation; either | 9 | License as published by the Free Software Foundation; either |
10 | version 2 of the License, or (at your option) any later version. | 10 | version 2 of the License, or (at your option) any later version. |
11 | 11 | ||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | General Public License for more details. | 15 | General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
18 | along with this program; see the file COPYING. If not, write to | 18 | along with this program; see the file COPYING. If not, write to |
19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. | 20 | Boston, MA 02111-1307, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <assert.h> | 23 | #include <assert.h> |
24 | 24 | ||
25 | #include "mediawidget.h" | 25 | #include "mediawidget.h" |
26 | #include "playlistwidget.h" | 26 | #include "playlistwidget.h" |
27 | #include "skin.h" | 27 | #include "skin.h" |
28 | 28 | ||
29 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) | 29 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) |
30 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) | 30 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) |
31 | { | 31 | { |
32 | connect( &mediaPlayerState, SIGNAL( displayTypeChanged( MediaPlayerState::DisplayType ) ), | 32 | connect( &mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), |
33 | this, SLOT( setDisplayType( MediaPlayerState::DisplayType ) ) ); | 33 | this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); |
34 | connect( &mediaPlayerState, SIGNAL( lengthChanged( long ) ), | 34 | connect( &mediaPlayerState, SIGNAL( lengthChanged(long) ), |
35 | this, SLOT( setLength( long ) ) ); | 35 | this, SLOT( setLength(long) ) ); |
36 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 36 | connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), |
37 | this, SLOT( setPlaying( bool ) ) ); | 37 | this, SLOT( setPlaying(bool) ) ); |
38 | 38 | ||
39 | setBackgroundMode( NoBackground ); | 39 | setBackgroundMode( NoBackground ); |
40 | } | 40 | } |
41 | 41 | ||
42 | MediaWidget::~MediaWidget() | 42 | MediaWidget::~MediaWidget() |
43 | { | 43 | { |
44 | } | 44 | } |
45 | 45 | ||
46 | void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, | 46 | void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, |
47 | const Skin &skin ) | 47 | const Skin &skin ) |
48 | { | 48 | { |
49 | buttonMask = skin.buttonMask( skinInfo, buttonCount ); | 49 | buttonMask = skin.buttonMask( skinInfo, buttonCount ); |
50 | 50 | ||
51 | buttons.clear(); | 51 | buttons.clear(); |
52 | buttons.reserve( buttonCount ); | 52 | buttons.reserve( buttonCount ); |
53 | 53 | ||
54 | for ( uint i = 0; i < buttonCount; ++i ) { | 54 | for ( uint i = 0; i < buttonCount; ++i ) { |
55 | Button button = setupButton( skinInfo[ i ], skin ); | 55 | Button button = setupButton( skinInfo[ i ], skin ); |
56 | buttons.push_back( button ); | 56 | buttons.push_back( button ); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | 59 | ||
60 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ) | 60 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const Skin &skin ) |
61 | { | 61 | { |
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 | |||
@@ -42,136 +42,136 @@ | |||
42 | #include "mediaplayer.h" | 42 | #include "mediaplayer.h" |
43 | #include "mediaplayerstate.h" | 43 | #include "mediaplayerstate.h" |
44 | #include "inputDialog.h" | 44 | #include "inputDialog.h" |
45 | #include "om3u.h" | 45 | #include "om3u.h" |
46 | #include "playlistfileview.h" | 46 | #include "playlistfileview.h" |
47 | 47 | ||
48 | //only needed for the random play | 48 | //only needed for the random play |
49 | #include <assert.h> | 49 | #include <assert.h> |
50 | 50 | ||
51 | PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl ) | 51 | PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl ) |
52 | : PlayListWidgetGui( parent, "playList" ) , currentFileListView( 0 ) | 52 | : PlayListWidgetGui( parent, "playList" ) , currentFileListView( 0 ) |
53 | { | 53 | { |
54 | mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" ); | 54 | mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" ); |
55 | m_mp = new MediaPlayer(*this, *mediaPlayerState, 0, "mediaPlayer"); | 55 | m_mp = new MediaPlayer(*this, *mediaPlayerState, 0, "mediaPlayer"); |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), | 59 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), |
60 | "opieplayer2/add_to_playlist", | 60 | "opieplayer2/add_to_playlist", |
61 | this , SLOT(addSelected() ) ); | 61 | this , SLOT(addSelected() ) ); |
62 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), | 62 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), |
63 | "opieplayer2/remove_from_playlist", | 63 | "opieplayer2/remove_from_playlist", |
64 | this , SLOT(removeSelected() ) ); | 64 | this , SLOT(removeSelected() ) ); |
65 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", | 65 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", |
66 | this , SLOT( btnPlay( bool) ), TRUE ); | 66 | this , SLOT( btnPlay(bool) ), TRUE ); |
67 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", | 67 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", |
68 | mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); | 68 | mediaPlayerState, SLOT( setShuffled(bool) ), TRUE ); |
69 | d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", | 69 | d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", |
70 | mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); | 70 | mediaPlayerState, SLOT( setLooping(bool) ), TRUE ); |
71 | 71 | ||
72 | (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); | 72 | (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); |
73 | (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), | 73 | (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), |
74 | this, SLOT( addAllMusicToList() ) ); | 74 | this, SLOT( addAllMusicToList() ) ); |
75 | (void)new MenuItem( pmPlayList, tr( "Add all video files" ), | 75 | (void)new MenuItem( pmPlayList, tr( "Add all video files" ), |
76 | this, SLOT( addAllVideoToList() ) ); | 76 | this, SLOT( addAllVideoToList() ) ); |
77 | (void)new MenuItem( pmPlayList, tr( "Add all files" ), | 77 | (void)new MenuItem( pmPlayList, tr( "Add all files" ), |
78 | this, SLOT( addAllToList() ) ); | 78 | this, SLOT( addAllToList() ) ); |
79 | pmPlayList->insertSeparator(-1); | 79 | pmPlayList->insertSeparator(-1); |
80 | (void)new MenuItem( pmPlayList, tr( "Add File" ), | 80 | (void)new MenuItem( pmPlayList, tr( "Add File" ), |
81 | this,SLOT( openFile() ) ); | 81 | this,SLOT( openFile() ) ); |
82 | (void)new MenuItem( pmPlayList, tr("Add URL"), | 82 | (void)new MenuItem( pmPlayList, tr("Add URL"), |
83 | this,SLOT( openURL() ) ); | 83 | this,SLOT( openURL() ) ); |
84 | pmPlayList->insertSeparator(-1); | 84 | pmPlayList->insertSeparator(-1); |
85 | (void)new MenuItem( pmPlayList, tr( "Save Playlist" ), | 85 | (void)new MenuItem( pmPlayList, tr( "Save Playlist" ), |
86 | this, SLOT(writem3u() ) ); | 86 | this, SLOT(writem3u() ) ); |
87 | pmPlayList->insertSeparator(-1); | 87 | pmPlayList->insertSeparator(-1); |
88 | (void)new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), | 88 | (void)new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), |
89 | audioView, SLOT( scanFiles() ) ); | 89 | audioView, SLOT( scanFiles() ) ); |
90 | (void)new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), | 90 | (void)new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), |
91 | videoView, SLOT( scanFiles() ) ); | 91 | videoView, SLOT( scanFiles() ) ); |
92 | 92 | ||
93 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), | 93 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), |
94 | mediaPlayerState, SLOT( toggleFullscreen() ) ); | 94 | mediaPlayerState, SLOT( toggleFullscreen() ) ); |
95 | 95 | ||
96 | Config cfg( "OpiePlayer" ); | 96 | Config cfg( "OpiePlayer" ); |
97 | bool b= cfg.readBoolEntry("FullScreen", 0); | 97 | bool b= cfg.readBoolEntry("FullScreen", 0); |
98 | mediaPlayerState->setFullscreen( b ); | 98 | mediaPlayerState->setFullscreen( b ); |
99 | pmView->setItemChecked( -16, b ); | 99 | pmView->setItemChecked( -16, b ); |
100 | 100 | ||
101 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", | 101 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", |
102 | d->selectedFiles, SLOT(moveSelectedUp() ) ); | 102 | d->selectedFiles, SLOT(moveSelectedUp() ) ); |
103 | (void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", | 103 | (void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", |
104 | d->selectedFiles, SLOT(removeSelected() ) ); | 104 | d->selectedFiles, SLOT(removeSelected() ) ); |
105 | (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", | 105 | (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", |
106 | d->selectedFiles, SLOT(moveSelectedDown() ) ); | 106 | d->selectedFiles, SLOT(moveSelectedDown() ) ); |
107 | QVBox *stretch2 = new QVBox( vbox1 ); | 107 | QVBox *stretch2 = new QVBox( vbox1 ); |
108 | 108 | ||
109 | connect( tbDeletePlaylist, ( SIGNAL( released() ) ), | 109 | connect( tbDeletePlaylist, ( SIGNAL( released() ) ), |
110 | SLOT( deletePlaylist() ) ); | 110 | SLOT( deletePlaylist() ) ); |
111 | connect( pmView, SIGNAL( activated( int ) ), | 111 | connect( pmView, SIGNAL( activated(int) ), |
112 | this, SLOT( pmViewActivated( int ) ) ); | 112 | this, SLOT( pmViewActivated(int) ) ); |
113 | connect( skinsMenu, SIGNAL( activated( int ) ) , | 113 | connect( skinsMenu, SIGNAL( activated(int) ) , |
114 | this, SLOT( skinsMenuActivated( int ) ) ); | 114 | this, SLOT( skinsMenuActivated(int) ) ); |
115 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), | 115 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ), |
116 | this,SLOT( playlistViewPressed( int, QListViewItem *, const QPoint&, int ) ) ); | 116 | this,SLOT( playlistViewPressed(int,QListViewItem*,const QPoint&,int) ) ); |
117 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int ) ), | 117 | connect( audioView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ), |
118 | this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int ) ) ); | 118 | this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) ); |
119 | connect( audioView, SIGNAL( returnPressed( QListViewItem *) ), | 119 | connect( audioView, SIGNAL( returnPressed(QListViewItem*) ), |
120 | this,SLOT( playIt( QListViewItem *) ) ); | 120 | this,SLOT( playIt(QListViewItem*) ) ); |
121 | connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), | 121 | connect( audioView, SIGNAL( doubleClicked(QListViewItem*) ), |
122 | this, SLOT( addToSelection( QListViewItem *) ) ); | 122 | this, SLOT( addToSelection(QListViewItem*) ) ); |
123 | connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), | 123 | connect( videoView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ), |
124 | this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int) ) ); | 124 | this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) ); |
125 | connect( videoView, SIGNAL( returnPressed( QListViewItem *) ), | 125 | connect( videoView, SIGNAL( returnPressed(QListViewItem*) ), |
126 | this,SLOT( playIt( QListViewItem *) ) ); | 126 | this,SLOT( playIt(QListViewItem*) ) ); |
127 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), | 127 | connect( videoView, SIGNAL( doubleClicked(QListViewItem*) ), |
128 | this, SLOT( addToSelection( QListViewItem *) ) ); | 128 | this, SLOT( addToSelection(QListViewItem*) ) ); |
129 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), | 129 | connect( playLists, SIGNAL( fileSelected(const DocLnk&) ), |
130 | this, SLOT( loadList( const DocLnk & ) ) ); | 130 | this, SLOT( loadList(const DocLnk&) ) ); |
131 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), | 131 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), |
132 | this, SLOT( tabChanged( QWidget* ) ) ); | 132 | this, SLOT( tabChanged(QWidget*) ) ); |
133 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 133 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), |
134 | d->tbPlay, SLOT( setOn( bool ) ) ); | 134 | d->tbPlay, SLOT( setOn(bool) ) ); |
135 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), | 135 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), |
136 | d->tbLoop, SLOT( setOn( bool ) ) ); | 136 | d->tbLoop, SLOT( setOn(bool) ) ); |
137 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), | 137 | connect( mediaPlayerState, SIGNAL( shuffledToggled(bool) ), |
138 | d->tbShuffle, SLOT( setOn( bool ) ) ); | 138 | d->tbShuffle, SLOT( setOn(bool) ) ); |
139 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), | 139 | connect( d->selectedFiles, SIGNAL( doubleClicked(QListViewItem*) ), |
140 | this, SLOT( playIt( QListViewItem *) ) ); | 140 | this, SLOT( playIt(QListViewItem*) ) ); |
141 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), | 141 | connect ( gammaSlider, SIGNAL( valueChanged(int) ), |
142 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); | 142 | mediaPlayerState, SLOT( setVideoGamma(int) ) ); |
143 | 143 | ||
144 | connect( this, SIGNAL(skinSelected() ), | 144 | connect( this, SIGNAL(skinSelected() ), |
145 | m_mp, SLOT( reloadSkins() ) ); | 145 | m_mp, SLOT( reloadSkins() ) ); |
146 | 146 | ||
147 | // see which skins are installed | 147 | // see which skins are installed |
148 | populateSkinsMenu(); | 148 | populateSkinsMenu(); |
149 | initializeStates(); | 149 | initializeStates(); |
150 | 150 | ||
151 | channel = new QCopChannel( "QPE/Application/opieplayer2", this ); | 151 | channel = new QCopChannel( "QPE/Application/opieplayer2", this ); |
152 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 152 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), |
153 | this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); | 153 | this, SLOT( qcopReceive(const QCString&,const QByteArray&)) ); |
154 | 154 | ||
155 | 155 | ||
156 | cfg.setGroup("PlayList"); | 156 | cfg.setGroup("PlayList"); |
157 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); | 157 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); |
158 | loadList(DocLnk( currentPlaylist ) ); | 158 | loadList(DocLnk( currentPlaylist ) ); |
159 | 159 | ||
160 | tabWidget->showPage( playListTab ); | 160 | tabWidget->showPage( playListTab ); |
161 | } | 161 | } |
162 | 162 | ||
163 | 163 | ||
164 | PlayListWidget::~PlayListWidget() { | 164 | PlayListWidget::~PlayListWidget() { |
165 | delete d; | 165 | delete d; |
166 | delete m_mp; | 166 | delete m_mp; |
167 | } | 167 | } |
168 | 168 | ||
169 | 169 | ||
170 | void PlayListWidget::initializeStates() { | 170 | void PlayListWidget::initializeStates() { |
171 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); | 171 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); |
172 | d->tbLoop->setOn( mediaPlayerState->isLooping() ); | 172 | d->tbLoop->setOn( mediaPlayerState->isLooping() ); |
173 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); | 173 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); |
174 | d->playListFrame->show(); | 174 | d->playListFrame->show(); |
175 | } | 175 | } |
176 | 176 | ||
177 | void PlayListWidget::writeDefaultPlaylist() { | 177 | void PlayListWidget::writeDefaultPlaylist() { |
@@ -482,96 +482,96 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
482 | d->setDocumentUsed = FALSE; | 482 | d->setDocumentUsed = FALSE; |
483 | 483 | ||
484 | if(it) { | 484 | if(it) { |
485 | if ( currentTab() == CurrentPlayList ) | 485 | if ( currentTab() == CurrentPlayList ) |
486 | return; | 486 | return; |
487 | DocLnk lnk; | 487 | DocLnk lnk; |
488 | QString filename; | 488 | QString filename; |
489 | 489 | ||
490 | filename=it->text(3); | 490 | filename=it->text(3); |
491 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 491 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
492 | lnk.setFile( filename ); //sets file name | 492 | lnk.setFile( filename ); //sets file name |
493 | d->selectedFiles->addToSelection( lnk); | 493 | d->selectedFiles->addToSelection( lnk); |
494 | 494 | ||
495 | writeCurrentM3u(); | 495 | writeCurrentM3u(); |
496 | // tabWidget->setCurrentPage(0); | 496 | // tabWidget->setCurrentPage(0); |
497 | 497 | ||
498 | } | 498 | } |
499 | } | 499 | } |
500 | 500 | ||
501 | 501 | ||
502 | void PlayListWidget::tabChanged(QWidget *) { | 502 | void PlayListWidget::tabChanged(QWidget *) { |
503 | 503 | ||
504 | d->tbPlay->setEnabled( true ); | 504 | d->tbPlay->setEnabled( true ); |
505 | 505 | ||
506 | disconnect( audioView, SIGNAL( itemsSelected( bool ) ), | 506 | disconnect( audioView, SIGNAL( itemsSelected(bool) ), |
507 | d->tbPlay, SLOT( setEnabled( bool ) ) ); | 507 | d->tbPlay, SLOT( setEnabled(bool) ) ); |
508 | disconnect( videoView, SIGNAL( itemsSelected( bool ) ), | 508 | disconnect( videoView, SIGNAL( itemsSelected(bool) ), |
509 | d->tbPlay, SLOT( setEnabled( bool ) ) ); | 509 | d->tbPlay, SLOT( setEnabled(bool) ) ); |
510 | 510 | ||
511 | currentFileListView = 0; | 511 | currentFileListView = 0; |
512 | 512 | ||
513 | switch ( currentTab() ) { | 513 | switch ( currentTab() ) { |
514 | case CurrentPlayList: | 514 | case CurrentPlayList: |
515 | { | 515 | { |
516 | if( !tbDeletePlaylist->isHidden() ) { | 516 | if( !tbDeletePlaylist->isHidden() ) { |
517 | tbDeletePlaylist->hide(); | 517 | tbDeletePlaylist->hide(); |
518 | } | 518 | } |
519 | d->tbRemoveFromList->setEnabled(TRUE); | 519 | d->tbRemoveFromList->setEnabled(TRUE); |
520 | d->tbAddToList->setEnabled(FALSE); | 520 | d->tbAddToList->setEnabled(FALSE); |
521 | 521 | ||
522 | d->tbPlay->setEnabled( !d->selectedFiles->isEmpty() ); | 522 | d->tbPlay->setEnabled( !d->selectedFiles->isEmpty() ); |
523 | } | 523 | } |
524 | break; | 524 | break; |
525 | case AudioFiles: | 525 | case AudioFiles: |
526 | { | 526 | { |
527 | audioView->populateView(); | 527 | audioView->populateView(); |
528 | 528 | ||
529 | if( !tbDeletePlaylist->isHidden() ) { | 529 | if( !tbDeletePlaylist->isHidden() ) { |
530 | tbDeletePlaylist->hide(); | 530 | tbDeletePlaylist->hide(); |
531 | } | 531 | } |
532 | d->tbRemoveFromList->setEnabled(FALSE); | 532 | d->tbRemoveFromList->setEnabled(FALSE); |
533 | d->tbAddToList->setEnabled(TRUE); | 533 | d->tbAddToList->setEnabled(TRUE); |
534 | 534 | ||
535 | connect( audioView, SIGNAL( itemsSelected( bool ) ), | 535 | connect( audioView, SIGNAL( itemsSelected(bool) ), |
536 | d->tbPlay, SLOT( setEnabled( bool ) ) ); | 536 | d->tbPlay, SLOT( setEnabled(bool) ) ); |
537 | 537 | ||
538 | d->tbPlay->setEnabled( audioView->hasSelection() ); | 538 | d->tbPlay->setEnabled( audioView->hasSelection() ); |
539 | 539 | ||
540 | currentFileListView = audioView; | 540 | currentFileListView = audioView; |
541 | } | 541 | } |
542 | break; | 542 | break; |
543 | case VideoFiles: | 543 | case VideoFiles: |
544 | { | 544 | { |
545 | videoView->populateView(); | 545 | videoView->populateView(); |
546 | if( !tbDeletePlaylist->isHidden() ) { | 546 | if( !tbDeletePlaylist->isHidden() ) { |
547 | tbDeletePlaylist->hide(); | 547 | tbDeletePlaylist->hide(); |
548 | } | 548 | } |
549 | d->tbRemoveFromList->setEnabled(FALSE); | 549 | d->tbRemoveFromList->setEnabled(FALSE); |
550 | d->tbAddToList->setEnabled(TRUE); | 550 | d->tbAddToList->setEnabled(TRUE); |
551 | 551 | ||
552 | connect( videoView, SIGNAL( itemsSelected( bool ) ), | 552 | connect( videoView, SIGNAL( itemsSelected(bool) ), |
553 | d->tbPlay, SLOT( setEnabled( bool ) ) ); | 553 | d->tbPlay, SLOT( setEnabled(bool) ) ); |
554 | 554 | ||
555 | d->tbPlay->setEnabled( videoView->hasSelection() ); | 555 | d->tbPlay->setEnabled( videoView->hasSelection() ); |
556 | 556 | ||
557 | currentFileListView = videoView; | 557 | currentFileListView = videoView; |
558 | } | 558 | } |
559 | break; | 559 | break; |
560 | case PlayLists: | 560 | case PlayLists: |
561 | { | 561 | { |
562 | if( tbDeletePlaylist->isHidden() ) { | 562 | if( tbDeletePlaylist->isHidden() ) { |
563 | tbDeletePlaylist->show(); | 563 | tbDeletePlaylist->show(); |
564 | } | 564 | } |
565 | playLists->reread(); | 565 | playLists->reread(); |
566 | d->tbAddToList->setEnabled(FALSE); | 566 | d->tbAddToList->setEnabled(FALSE); |
567 | 567 | ||
568 | d->tbPlay->setEnabled( false ); | 568 | d->tbPlay->setEnabled( false ); |
569 | } | 569 | } |
570 | break; | 570 | break; |
571 | }; | 571 | }; |
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | void PlayListWidget::btnPlay(bool b) { | 575 | void PlayListWidget::btnPlay(bool b) { |
576 | // mediaPlayerState->setPlaying(false); | 576 | // mediaPlayerState->setPlaying(false); |
577 | mediaPlayerState->setPlaying(b); | 577 | mediaPlayerState->setPlaying(b); |
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 | |||
@@ -80,49 +80,49 @@ PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name ) | |||
80 | pmView->isCheckable(); | 80 | pmView->isCheckable(); |
81 | 81 | ||
82 | skinsMenu = new QPopupMenu( this ); | 82 | skinsMenu = new QPopupMenu( this ); |
83 | pmView->insertItem( tr( "Skins" ), skinsMenu ); | 83 | pmView->insertItem( tr( "Skins" ), skinsMenu ); |
84 | skinsMenu->isCheckable(); | 84 | skinsMenu->isCheckable(); |
85 | 85 | ||
86 | gammaMenu = new QPopupMenu( this ); | 86 | gammaMenu = new QPopupMenu( this ); |
87 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); | 87 | pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu ); |
88 | 88 | ||
89 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); | 89 | gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); |
90 | gammaSlider->setRange( -40, 40 ); | 90 | gammaSlider->setRange( -40, 40 ); |
91 | gammaSlider->setTickmarks( QSlider::Left ); | 91 | gammaSlider->setTickmarks( QSlider::Left ); |
92 | gammaSlider->setTickInterval( 20 ); | 92 | gammaSlider->setTickInterval( 20 ); |
93 | gammaSlider->setFocusPolicy( QWidget::StrongFocus ); | 93 | gammaSlider->setFocusPolicy( QWidget::StrongFocus ); |
94 | gammaSlider->setValue( 0 ); | 94 | gammaSlider->setValue( 0 ); |
95 | gammaSlider->setMinimumHeight( 50 ); | 95 | gammaSlider->setMinimumHeight( 50 ); |
96 | 96 | ||
97 | gammaLCD = new QLCDNumber( 3, gammaMenu ); | 97 | gammaLCD = new QLCDNumber( 3, gammaMenu ); |
98 | gammaLCD-> setFrameShape ( QFrame::NoFrame ); | 98 | gammaLCD-> setFrameShape ( QFrame::NoFrame ); |
99 | gammaLCD-> setSegmentStyle ( QLCDNumber::Flat ); | 99 | gammaLCD-> setSegmentStyle ( QLCDNumber::Flat ); |
100 | 100 | ||
101 | gammaMenu->insertItem( gammaSlider ); | 101 | gammaMenu->insertItem( gammaSlider ); |
102 | gammaMenu->insertItem( gammaLCD ); | 102 | gammaMenu->insertItem( gammaLCD ); |
103 | 103 | ||
104 | connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) ); | 104 | connect( gammaSlider, SIGNAL( valueChanged(int) ), gammaLCD, SLOT( display(int) ) ); |
105 | 105 | ||
106 | vbox5 = new QVBox( this ); | 106 | vbox5 = new QVBox( this ); |
107 | QVBox *vbox4 = new QVBox( vbox5 ); | 107 | QVBox *vbox4 = new QVBox( vbox5 ); |
108 | QHBox *hbox6 = new QHBox( vbox4 ); | 108 | QHBox *hbox6 = new QHBox( vbox4 ); |
109 | 109 | ||
110 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 110 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
111 | 111 | ||
112 | playListTab = new QWidget( tabWidget, "PlayListTab" ); | 112 | playListTab = new QWidget( tabWidget, "PlayListTab" ); |
113 | tabWidget->insertTab( playListTab, "Playlist"); | 113 | tabWidget->insertTab( playListTab, "Playlist"); |
114 | 114 | ||
115 | QGridLayout *Playout = new QGridLayout( playListTab ); | 115 | QGridLayout *Playout = new QGridLayout( playListTab ); |
116 | Playout->setSpacing( 2); | 116 | Playout->setSpacing( 2); |
117 | Playout->setMargin( 2); | 117 | Playout->setMargin( 2); |
118 | 118 | ||
119 | // Add the playlist area | 119 | // Add the playlist area |
120 | QVBox *vbox3 = new QVBox( playListTab ); | 120 | QVBox *vbox3 = new QVBox( playListTab ); |
121 | d->playListFrame = vbox3; | 121 | d->playListFrame = vbox3; |
122 | 122 | ||
123 | QHBox *hbox2 = new QHBox( vbox3 ); | 123 | QHBox *hbox2 = new QHBox( vbox3 ); |
124 | d->selectedFiles = new PlayListSelection( hbox2 ); | 124 | d->selectedFiles = new PlayListSelection( hbox2 ); |
125 | 125 | ||
126 | vbox1 = new QVBox( hbox2 ); | 126 | vbox1 = new QVBox( hbox2 ); |
127 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); | 127 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); |
128 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch | 128 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch |
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 | |||
@@ -219,49 +219,49 @@ bool Thread::wait() | |||
219 | return true; | 219 | return true; |
220 | 220 | ||
221 | return d->finishCondition.wait( d->guard ); | 221 | return d->finishCondition.wait( d->guard ); |
222 | } | 222 | } |
223 | 223 | ||
224 | bool Thread::isRunning() const | 224 | bool Thread::isRunning() const |
225 | { | 225 | { |
226 | AutoLock lock( d->guard ); | 226 | AutoLock lock( d->guard ); |
227 | return d->isRunning; | 227 | return d->isRunning; |
228 | } | 228 | } |
229 | 229 | ||
230 | void Thread::exit() | 230 | void Thread::exit() |
231 | { | 231 | { |
232 | pthread_exit( 0 ); | 232 | pthread_exit( 0 ); |
233 | } | 233 | } |
234 | 234 | ||
235 | OnewayNotifier::OnewayNotifier() | 235 | OnewayNotifier::OnewayNotifier() |
236 | { | 236 | { |
237 | int fds[ 2 ]; | 237 | int fds[ 2 ]; |
238 | pipe( fds ); | 238 | pipe( fds ); |
239 | m_readFd = fds[ 0 ]; | 239 | m_readFd = fds[ 0 ]; |
240 | m_writeFd = fds[ 1 ]; | 240 | m_writeFd = fds[ 1 ]; |
241 | 241 | ||
242 | m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read ); | 242 | m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read ); |
243 | connect( m_notifier, SIGNAL( activated( int ) ), | 243 | connect( m_notifier, SIGNAL( activated(int) ), |
244 | this, SLOT( wakeUp() ) ); | 244 | this, SLOT( wakeUp() ) ); |
245 | } | 245 | } |
246 | 246 | ||
247 | OnewayNotifier::~OnewayNotifier() | 247 | OnewayNotifier::~OnewayNotifier() |
248 | { | 248 | { |
249 | delete m_notifier; | 249 | delete m_notifier; |
250 | 250 | ||
251 | ::close( m_readFd ); | 251 | ::close( m_readFd ); |
252 | ::close( m_writeFd ); | 252 | ::close( m_writeFd ); |
253 | } | 253 | } |
254 | 254 | ||
255 | void OnewayNotifier::notify() | 255 | void OnewayNotifier::notify() |
256 | { | 256 | { |
257 | const char c = 42; | 257 | const char c = 42; |
258 | ::write( m_writeFd, &c, 1 ); | 258 | ::write( m_writeFd, &c, 1 ); |
259 | } | 259 | } |
260 | 260 | ||
261 | void OnewayNotifier::wakeUp() | 261 | void OnewayNotifier::wakeUp() |
262 | { | 262 | { |
263 | char c = 0; | 263 | char c = 0; |
264 | 264 | ||
265 | if ( ::read( m_readFd, &c, 1 ) != 1 ) | 265 | if ( ::read( m_readFd, &c, 1 ) != 1 ) |
266 | return; | 266 | return; |
267 | 267 | ||
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 | |||
@@ -50,50 +50,50 @@ const int xo = 2; // movable x offset | |||
50 | const int yo = 0; // movable y offset | 50 | const int yo = 0; // movable y offset |
51 | 51 | ||
52 | const MediaWidget::SkinButtonInfo skinInfo[] = | 52 | const MediaWidget::SkinButtonInfo skinInfo[] = |
53 | { | 53 | { |
54 | { MediaWidget::Play, "play", MediaWidget::ToggleButton }, | 54 | { MediaWidget::Play, "play", MediaWidget::ToggleButton }, |
55 | { MediaWidget::Stop, "stop", MediaWidget::NormalButton }, | 55 | { MediaWidget::Stop, "stop", MediaWidget::NormalButton }, |
56 | { MediaWidget::Next, "fwd", MediaWidget::NormalButton }, | 56 | { MediaWidget::Next, "fwd", MediaWidget::NormalButton }, |
57 | { MediaWidget::Previous, "back", MediaWidget::NormalButton }, | 57 | { MediaWidget::Previous, "back", MediaWidget::NormalButton }, |
58 | { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, | 58 | { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, |
59 | { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, | 59 | { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, |
60 | { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton } | 60 | { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton } |
61 | }; | 61 | }; |
62 | 62 | ||
63 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); | 63 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); |
64 | 64 | ||
65 | } | 65 | } |
66 | 66 | ||
67 | VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) | 67 | VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) |
68 | : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false ) | 68 | : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false ) |
69 | { | 69 | { |
70 | setCaption( tr("OpiePlayer - Video") ); | 70 | setCaption( tr("OpiePlayer - Video") ); |
71 | 71 | ||
72 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 72 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
73 | 73 | ||
74 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 74 | connect ( videoFrame, SIGNAL( videoResized(const QSize&)), this, SIGNAL( videoResized(const QSize&))); |
75 | connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); | 75 | connect ( videoFrame, SIGNAL( clicked() ), this, SLOT ( backToNormal() ) ); |
76 | 76 | ||
77 | slider = 0; | 77 | slider = 0; |
78 | 78 | ||
79 | loadSkin(); | 79 | loadSkin(); |
80 | 80 | ||
81 | setLength( mediaPlayerState.length() ); | 81 | setLength( mediaPlayerState.length() ); |
82 | setPosition( mediaPlayerState.position() ); | 82 | setPosition( mediaPlayerState.position() ); |
83 | setFullscreen( mediaPlayerState.isFullscreen() ); | 83 | setFullscreen( mediaPlayerState.isFullscreen() ); |
84 | setPlaying( mediaPlayerState.isPlaying() ); | 84 | setPlaying( mediaPlayerState.isPlaying() ); |
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||
88 | VideoWidget::~VideoWidget() | 88 | VideoWidget::~VideoWidget() |
89 | { | 89 | { |
90 | } | 90 | } |
91 | 91 | ||
92 | MediaWidget::GUIInfo VideoWidget::guiInfo() | 92 | MediaWidget::GUIInfo VideoWidget::guiInfo() |
93 | { | 93 | { |
94 | return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount ); | 94 | return GUIInfo( "V" /* infix */, ::skinInfo, ::buttonCount ); |
95 | } | 95 | } |
96 | 96 | ||
97 | void VideoWidget::resizeEvent( QResizeEvent *e ) { | 97 | void VideoWidget::resizeEvent( QResizeEvent *e ) { |
98 | int h = height(); | 98 | int h = height(); |
99 | int w = width(); | 99 | int w = width(); |
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 | |||
@@ -44,56 +44,56 @@ | |||
44 | XineControl::XineControl( XineVideoWidget *xineWidget, | 44 | XineControl::XineControl( XineVideoWidget *xineWidget, |
45 | MediaPlayerState &_mediaPlayerState, | 45 | MediaPlayerState &_mediaPlayerState, |
46 | QObject *parent, const char *name ) | 46 | QObject *parent, const char *name ) |
47 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) | 47 | : QObject( parent, name ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) |
48 | { | 48 | { |
49 | libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget ); | 49 | libXine = new XINE::Lib( XINE::Lib::InitializeImmediately, xineWidget ); |
50 | 50 | ||
51 | init(); | 51 | init(); |
52 | } | 52 | } |
53 | 53 | ||
54 | XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, | 54 | XineControl::XineControl( XINE::Lib *xine, XineVideoWidget *xineWidget, |
55 | MediaPlayerState &_mediaPlayerState, | 55 | MediaPlayerState &_mediaPlayerState, |
56 | QObject *parent, const char *name ) | 56 | QObject *parent, const char *name ) |
57 | : QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) | 57 | : QObject( parent, name ), libXine( xine ), mediaPlayerState( _mediaPlayerState ), xineVideoWidget( xineWidget ) |
58 | { | 58 | { |
59 | xine->ensureInitialized(); | 59 | xine->ensureInitialized(); |
60 | 60 | ||
61 | xine->setWidget( xineWidget ); | 61 | xine->setWidget( xineWidget ); |
62 | 62 | ||
63 | init(); | 63 | init(); |
64 | } | 64 | } |
65 | 65 | ||
66 | void XineControl::init() | 66 | void XineControl::init() |
67 | { | 67 | { |
68 | connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) ); | 68 | connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); |
69 | connect( this, SIGNAL( positionChanged( long ) ), &mediaPlayerState, SLOT( updatePosition( long ) ) ); | 69 | connect( this, SIGNAL( positionChanged(long) ), &mediaPlayerState, SLOT( updatePosition(long) ) ); |
70 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 70 | connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( stop(bool) ) ); |
71 | connect( &mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); | 71 | connect( &mediaPlayerState, SIGNAL( fullscreenToggled(bool) ), this, SLOT( setFullscreen(bool) ) ); |
72 | connect( &mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); | 72 | connect( &mediaPlayerState, SIGNAL( positionChanged(long) ), this, SLOT( seekTo(long) ) ); |
73 | connect( &mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) ); | 73 | connect( &mediaPlayerState, SIGNAL( videoGammaChanged(int) ), this, SLOT( setGamma(int) ) ); |
74 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); | 74 | connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) ); |
75 | connect( xineVideoWidget, SIGNAL( videoResized( const QSize & ) ), this, SLOT( videoResized ( const QSize & ) ) ); | 75 | connect( xineVideoWidget, SIGNAL( videoResized(const QSize&) ), this, SLOT( videoResized(const QSize&) ) ); |
76 | 76 | ||
77 | disabledSuspendScreenSaver = FALSE; | 77 | disabledSuspendScreenSaver = FALSE; |
78 | } | 78 | } |
79 | 79 | ||
80 | XineControl::~XineControl() { | 80 | XineControl::~XineControl() { |
81 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 81 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
82 | if ( disabledSuspendScreenSaver ) { | 82 | if ( disabledSuspendScreenSaver ) { |
83 | disabledSuspendScreenSaver = FALSE; | 83 | disabledSuspendScreenSaver = FALSE; |
84 | // Re-enable the suspend mode | 84 | // Re-enable the suspend mode |
85 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 85 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
86 | } | 86 | } |
87 | #endif | 87 | #endif |
88 | delete libXine; | 88 | delete libXine; |
89 | } | 89 | } |
90 | 90 | ||
91 | void XineControl::play( const QString& fileName ) { | 91 | void XineControl::play( const QString& fileName ) { |
92 | 92 | ||
93 | hasVideoChannel = FALSE; | 93 | hasVideoChannel = FALSE; |
94 | hasAudioChannel = FALSE; | 94 | hasAudioChannel = FALSE; |
95 | m_fileName = fileName; | 95 | m_fileName = fileName; |
96 | 96 | ||
97 | qDebug("<<FILENAME: " + fileName + ">>>>"); | 97 | qDebug("<<FILENAME: " + fileName + ">>>>"); |
98 | 98 | ||
99 | if ( !libXine->play( fileName, 0, 0 ) ) { | 99 | if ( !libXine->play( fileName, 0, 0 ) ) { |
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 | |||
@@ -740,82 +740,82 @@ void QtRec::initIconView() { | |||
740 | item->setPixmap( 0, image0); | 740 | item->setPixmap( 0, image0); |
741 | if( currentFileName == filePath) | 741 | if( currentFileName == filePath) |
742 | ListView1->setSelected( item, true); | 742 | ListView1->setSelected( item, true); |
743 | } | 743 | } |
744 | } | 744 | } |
745 | } | 745 | } |
746 | 746 | ||
747 | void QtRec::initConnections() { | 747 | void QtRec::initConnections() { |
748 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 748 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
749 | 749 | ||
750 | connect( toBeginningButton, SIGNAL( pressed()), | 750 | connect( toBeginningButton, SIGNAL( pressed()), |
751 | this, SLOT( rewindPressed() )); | 751 | this, SLOT( rewindPressed() )); |
752 | connect( toBeginningButton, SIGNAL( released()), | 752 | connect( toBeginningButton, SIGNAL( released()), |
753 | this, SLOT( rewindReleased() )); | 753 | this, SLOT( rewindReleased() )); |
754 | connect( toEndButton, SIGNAL( pressed()), | 754 | connect( toEndButton, SIGNAL( pressed()), |
755 | this, SLOT( FastforwardPressed() )); | 755 | this, SLOT( FastforwardPressed() )); |
756 | connect( toEndButton, SIGNAL( released()), | 756 | connect( toEndButton, SIGNAL( released()), |
757 | this, SLOT( FastforwardReleased() )); | 757 | this, SLOT( FastforwardReleased() )); |
758 | connect( deleteSoundButton, SIGNAL(released()), | 758 | connect( deleteSoundButton, SIGNAL(released()), |
759 | this, SLOT( deleteSound() )); | 759 | this, SLOT( deleteSound() )); |
760 | connect( Stop_PushButton, SIGNAL(released()), | 760 | connect( Stop_PushButton, SIGNAL(released()), |
761 | this, SLOT( doPlayBtn() )); | 761 | this, SLOT( doPlayBtn() )); |
762 | connect( Rec_PushButton, SIGNAL(released()), | 762 | connect( Rec_PushButton, SIGNAL(released()), |
763 | this, SLOT( newSound() ) ); | 763 | this, SLOT( newSound() ) ); |
764 | connect( TabWidget, SIGNAL( currentChanged( QWidget*)), | 764 | connect( TabWidget, SIGNAL( currentChanged(QWidget*)), |
765 | this, SLOT(thisTab(QWidget*) )); | 765 | this, SLOT(thisTab(QWidget*) )); |
766 | connect( OutputSlider, SIGNAL(sliderReleased()), | 766 | connect( OutputSlider, SIGNAL(sliderReleased()), |
767 | this, SLOT( changedOutVolume()) ); | 767 | this, SLOT( changedOutVolume()) ); |
768 | connect( InputSlider, SIGNAL(sliderReleased()), | 768 | connect( InputSlider, SIGNAL(sliderReleased()), |
769 | this, SLOT( changedInVolume()) ); | 769 | this, SLOT( changedInVolume()) ); |
770 | 770 | ||
771 | connect( sampleRateComboBox, SIGNAL(activated( int)), | 771 | connect( sampleRateComboBox, SIGNAL(activated(int)), |
772 | this, SLOT( changesamplerateCombo(int)) ); | 772 | this, SLOT( changesamplerateCombo(int)) ); |
773 | connect( bitRateComboBox, SIGNAL(activated( int)), | 773 | connect( bitRateComboBox, SIGNAL(activated(int)), |
774 | this, SLOT( changebitrateCombo(int)) ); | 774 | this, SLOT( changebitrateCombo(int)) ); |
775 | 775 | ||
776 | connect( directoryComboBox, SIGNAL(activated( int)), | 776 | connect( directoryComboBox, SIGNAL(activated(int)), |
777 | this, SLOT( changeDirCombo(int)) ); | 777 | this, SLOT( changeDirCombo(int)) ); |
778 | connect( sizeLimitCombo, SIGNAL(activated( int)), | 778 | connect( sizeLimitCombo, SIGNAL(activated(int)), |
779 | this, SLOT( changeSizeLimitCombo(int)) ); | 779 | this, SLOT( changeSizeLimitCombo(int)) ); |
780 | 780 | ||
781 | connect( stereoCheckBox, SIGNAL(toggled( bool)), | 781 | connect( stereoCheckBox, SIGNAL(toggled(bool)), |
782 | this, SLOT( changeStereoCheck(bool)) ); | 782 | this, SLOT( changeStereoCheck(bool)) ); |
783 | 783 | ||
784 | connect( outMuteCheckBox, SIGNAL(toggled( bool)), | 784 | connect( outMuteCheckBox, SIGNAL(toggled(bool)), |
785 | this, SLOT( doVolMuting(bool)) ); | 785 | this, SLOT( doVolMuting(bool)) ); |
786 | connect( inMuteCheckBox , SIGNAL(toggled( bool)), | 786 | connect( inMuteCheckBox , SIGNAL(toggled(bool)), |
787 | this, SLOT( doMicMuting(bool)) ); | 787 | this, SLOT( doMicMuting(bool)) ); |
788 | 788 | ||
789 | connect( ListView1,SIGNAL(doubleClicked( QListViewItem*)), | 789 | connect( ListView1,SIGNAL(doubleClicked(QListViewItem*)), |
790 | this,SLOT( itClick(QListViewItem*))); | 790 | this,SLOT( itClick(QListViewItem*))); |
791 | connect( ListView1, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 791 | connect( ListView1, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
792 | this,SLOT( listPressed(int, QListViewItem *, const QPoint&, int)) ); | 792 | this,SLOT( listPressed(int,QListViewItem*,const QPoint&,int)) ); |
793 | connect( timeSlider, SIGNAL( sliderMoved( int)), | 793 | connect( timeSlider, SIGNAL( sliderMoved(int)), |
794 | this, SLOT( changeTimeSlider(int) )); | 794 | this, SLOT( changeTimeSlider(int) )); |
795 | connect( timeSlider, SIGNAL( sliderPressed( )), | 795 | connect( timeSlider, SIGNAL( sliderPressed()), |
796 | this, SLOT( timeSliderPressed() )); | 796 | this, SLOT( timeSliderPressed() )); |
797 | connect( timeSlider, SIGNAL( sliderReleased( )), | 797 | connect( timeSlider, SIGNAL( sliderReleased()), |
798 | this, SLOT( timeSliderReleased() )); | 798 | this, SLOT( timeSliderReleased() )); |
799 | connect( compressionCheckBox, SIGNAL( toggled(bool)), | 799 | connect( compressionCheckBox, SIGNAL( toggled(bool)), |
800 | this, SLOT( compressionSelected(bool))); | 800 | this, SLOT( compressionSelected(bool))); |
801 | connect( autoMuteCheckBox, SIGNAL( toggled(bool)), | 801 | connect( autoMuteCheckBox, SIGNAL( toggled(bool)), |
802 | this, SLOT( slotAutoMute(bool))); | 802 | this, SLOT( slotAutoMute(bool))); |
803 | } | 803 | } |
804 | 804 | ||
805 | void QtRec::initConfig() { | 805 | void QtRec::initConfig() { |
806 | int index, fred, i; | 806 | int index, fred, i; |
807 | Config cfg("OpieRec"); | 807 | Config cfg("OpieRec"); |
808 | cfg.setGroup("Settings"); | 808 | cfg.setGroup("Settings"); |
809 | 809 | ||
810 | index = cfg.readNumEntry("samplerate",22050); | 810 | index = cfg.readNumEntry("samplerate",22050); |
811 | bool ok; | 811 | bool ok; |
812 | 812 | ||
813 | for(int ws=0;ws<sampleRateComboBox->count();ws++) { | 813 | for(int ws=0;ws<sampleRateComboBox->count();ws++) { |
814 | fred = sampleRateComboBox->text(ws).toInt(&ok, 10); | 814 | fred = sampleRateComboBox->text(ws).toInt(&ok, 10); |
815 | if( index == fred) { | 815 | if( index == fred) { |
816 | filePara.sampleRate = fred; | 816 | filePara.sampleRate = fred; |
817 | sampleRateComboBox->setCurrentItem(ws); | 817 | sampleRateComboBox->setCurrentItem(ws); |
818 | } | 818 | } |
819 | } | 819 | } |
820 | 820 | ||
821 | i = cfg.readNumEntry("bitrate",16); | 821 | i = cfg.readNumEntry("bitrate",16); |
@@ -1635,49 +1635,49 @@ void QtRec::showListMenu(QListViewItem * item) { | |||
1635 | 1635 | ||
1636 | void QtRec::fileBeamFinished( Ir *ir) { | 1636 | void QtRec::fileBeamFinished( Ir *ir) { |
1637 | if(ir) | 1637 | if(ir) |
1638 | QMessageBox::message( tr("Ir Beam out"), tr("Ir sent.") ,tr("Ok") ); | 1638 | QMessageBox::message( tr("Ir Beam out"), tr("Ir sent.") ,tr("Ok") ); |
1639 | 1639 | ||
1640 | } | 1640 | } |
1641 | 1641 | ||
1642 | void QtRec::doBeam() { | 1642 | void QtRec::doBeam() { |
1643 | qApp->processEvents(); | 1643 | qApp->processEvents(); |
1644 | if( ListView1->currentItem() == NULL) | 1644 | if( ListView1->currentItem() == NULL) |
1645 | return; | 1645 | return; |
1646 | Ir ir; | 1646 | Ir ir; |
1647 | if( ir.supported()) { | 1647 | if( ir.supported()) { |
1648 | QString file = ListView1->currentItem()->text(0); | 1648 | QString file = ListView1->currentItem()->text(0); |
1649 | Config cfg("OpieRec"); | 1649 | Config cfg("OpieRec"); |
1650 | cfg.setGroup("Sounds"); | 1650 | cfg.setGroup("Sounds"); |
1651 | 1651 | ||
1652 | int nFiles = cfg.readNumEntry("NumberofFiles",0); | 1652 | int nFiles = cfg.readNumEntry("NumberofFiles",0); |
1653 | 1653 | ||
1654 | for(int i=0;i<nFiles+1;i++) { | 1654 | for(int i=0;i<nFiles+1;i++) { |
1655 | if( cfg.readEntry( QString::number( i),"").find( file, 0, true) != -1) { | 1655 | if( cfg.readEntry( QString::number( i),"").find( file, 0, true) != -1) { |
1656 | QString filePath = cfg.readEntry(file,""); | 1656 | QString filePath = cfg.readEntry(file,""); |
1657 | Ir *file = new Ir(this, "IR"); | 1657 | Ir *file = new Ir(this, "IR"); |
1658 | connect( file, SIGNAL( done(Ir*)), | 1658 | connect( file, SIGNAL( done(Ir*)), |
1659 | this, SLOT( fileBeamFinished( Ir * ))); | 1659 | this, SLOT( fileBeamFinished(Ir*))); |
1660 | file->send( filePath, "OPieRec audio file\n" + filePath ); | 1660 | file->send( filePath, "OPieRec audio file\n" + filePath ); |
1661 | } | 1661 | } |
1662 | } | 1662 | } |
1663 | } | 1663 | } |
1664 | } | 1664 | } |
1665 | 1665 | ||
1666 | void QtRec::doMenuPlay() { | 1666 | void QtRec::doMenuPlay() { |
1667 | qApp->processEvents(); | 1667 | qApp->processEvents(); |
1668 | currentFile = ListView1->currentItem()->text(0); | 1668 | currentFile = ListView1->currentItem()->text(0); |
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | void QtRec::doRename() { | 1671 | void QtRec::doRename() { |
1672 | QRect r = ListView1->itemRect( ListView1->currentItem( )); | 1672 | QRect r = ListView1->itemRect( ListView1->currentItem( )); |
1673 | r = QRect( ListView1->viewportToContents( r.topLeft() ), r.size() ); | 1673 | r = QRect( ListView1->viewportToContents( r.topLeft() ), r.size() ); |
1674 | r.setX( ListView1->contentsX() ); | 1674 | r.setX( ListView1->contentsX() ); |
1675 | if ( r.width() > ListView1->visibleWidth() ) | 1675 | if ( r.width() > ListView1->visibleWidth() ) |
1676 | r.setWidth( ListView1->visibleWidth() ); | 1676 | r.setWidth( ListView1->visibleWidth() ); |
1677 | 1677 | ||
1678 | renameBox = new QLineEdit( ListView1->viewport(), "qt_renamebox" ); | 1678 | renameBox = new QLineEdit( ListView1->viewport(), "qt_renamebox" ); |
1679 | renameBox->setFrame(true); | 1679 | renameBox->setFrame(true); |
1680 | 1680 | ||
1681 | renameBox->setText( ListView1->currentItem()->text(0) ); | 1681 | renameBox->setText( ListView1->currentItem()->text(0) ); |
1682 | 1682 | ||
1683 | renameBox->selectAll(); | 1683 | renameBox->selectAll(); |
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 | |||
@@ -363,55 +363,55 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl ) | |||
363 | 363 | ||
364 | list_remove_btn = new QPushButton( tab_3, "list_remove_btn" ); | 364 | list_remove_btn = new QPushButton( tab_3, "list_remove_btn" ); |
365 | list_remove_btn->setGeometry( QRect( 150, 230, 71, 25 ) ); | 365 | list_remove_btn->setGeometry( QRect( 150, 230, 71, 25 ) ); |
366 | list_remove_btn->setText( tr( "Remove" ) ); | 366 | list_remove_btn->setText( tr( "Remove" ) ); |
367 | tabs->insertTab( tab_3, tr( "Chords" ) ); | 367 | tabs->insertTab( tab_3, tr( "Chords" ) ); |
368 | 368 | ||
369 | // hope this does what it's supposed to!! | 369 | // hope this does what it's supposed to!! |
370 | // setPalette( QPalette( QColor( 232, 227, 215) ) ); | 370 | // setPalette( QPalette( QColor( 232, 227, 215) ) ); |
371 | 371 | ||
372 | // signals and slots connections | 372 | // signals and slots connections |
373 | 373 | ||
374 | //cxm | 374 | //cxm |
375 | connect( tuning, SIGNAL( activated(int) ), frets, SLOT( Tune(int) ) ); | 375 | connect( tuning, SIGNAL( activated(int) ), frets, SLOT( Tune(int) ) ); |
376 | connect( span, SIGNAL( activated(int) ), frets, SLOT( Span(int) ) ); | 376 | connect( span, SIGNAL( activated(int) ), frets, SLOT( Span(int) ) ); |
377 | connect( transport_rec, SIGNAL( clicked() ), this, SLOT( transport_rec_cb() )); | 377 | connect( transport_rec, SIGNAL( clicked() ), this, SLOT( transport_rec_cb() )); |
378 | connect( play_sound, SIGNAL( clicked() ), this, SLOT( play_chord_cb() )); | 378 | connect( play_sound, SIGNAL( clicked() ), this, SLOT( play_chord_cb() )); |
379 | connect( tuner_start, SIGNAL( clicked() ), this, SLOT( tuner_start_cb() )); | 379 | connect( tuner_start, SIGNAL( clicked() ), this, SLOT( tuner_start_cb() )); |
380 | connect( tuner_note, SIGNAL( textChanged(const QString&) ), vu, SLOT( AnnotL(const QString&) )); | 380 | connect( tuner_note, SIGNAL( textChanged(const QString&) ), vu, SLOT( AnnotL(const QString&) )); |
381 | connect( this, SIGNAL( frequency_change(int) ), vu, SLOT( Value(int) )); | 381 | connect( this, SIGNAL( frequency_change(int) ), vu, SLOT( Value(int) )); |
382 | 382 | ||
383 | connect( chordnote, SIGNAL( activated(int) ), frets, SLOT( Base(int) ) ); | 383 | connect( chordnote, SIGNAL( activated(int) ), frets, SLOT( Base(int) ) ); |
384 | connect( chordkey, SIGNAL( activated(int) ), frets, SLOT( Chord(int) ) ); | 384 | connect( chordkey, SIGNAL( activated(int) ), frets, SLOT( Chord(int) ) ); |
385 | connect( chordfret, SIGNAL( activated(int) ), frets, SLOT( Fret(int) ) ); | 385 | connect( chordfret, SIGNAL( activated(int) ), frets, SLOT( Fret(int) ) ); |
386 | connect( list_remove_btn, SIGNAL( clicked() ), this, SLOT( list_remove_cb() ) ); | 386 | connect( list_remove_btn, SIGNAL( clicked() ), this, SLOT( list_remove_cb() ) ); |
387 | connect( frets, SIGNAL( s1nameChanged(const QString &) ), s1_1, SLOT( setText(const QString&) ) ); | 387 | connect( frets, SIGNAL( s1nameChanged(const QString&) ), s1_1, SLOT( setText(const QString&) ) ); |
388 | connect( frets, SIGNAL( s2nameChanged(const QString &) ), s1_2, SLOT( setText(const QString&) ) ); | 388 | connect( frets, SIGNAL( s2nameChanged(const QString&) ), s1_2, SLOT( setText(const QString&) ) ); |
389 | connect( frets, SIGNAL( s3nameChanged(const QString &) ), s1_3, SLOT( setText(const QString&) ) ); | 389 | connect( frets, SIGNAL( s3nameChanged(const QString&) ), s1_3, SLOT( setText(const QString&) ) ); |
390 | connect( frets, SIGNAL( s4nameChanged(const QString &) ), s1_4, SLOT( setText(const QString&) ) ); | 390 | connect( frets, SIGNAL( s4nameChanged(const QString&) ), s1_4, SLOT( setText(const QString&) ) ); |
391 | connect( frets, SIGNAL( s5nameChanged(const QString &) ), s1_5, SLOT( setText(const QString&) ) ); | 391 | connect( frets, SIGNAL( s5nameChanged(const QString&) ), s1_5, SLOT( setText(const QString&) ) ); |
392 | connect( frets, SIGNAL( s6nameChanged(const QString &) ), s1_6, SLOT( setText(const QString&) ) ); | 392 | connect( frets, SIGNAL( s6nameChanged(const QString&) ), s1_6, SLOT( setText(const QString&) ) ); |
393 | connect( frets, SIGNAL( nameChanged(const QString &) ), chordname, SLOT( setText(const QString&) ) ); | 393 | connect( frets, SIGNAL( nameChanged(const QString&) ), chordname, SLOT( setText(const QString&) ) ); |
394 | } | 394 | } |
395 | 395 | ||
396 | 396 | ||
397 | static int known=0; | 397 | static int known=0; |
398 | #include <qmessagebox.h> | 398 | #include <qmessagebox.h> |
399 | void PowerchordBase::transport_rec_cb(){ | 399 | void PowerchordBase::transport_rec_cb(){ |
400 | chordlist->insertItem(chordname->text(),-1); | 400 | chordlist->insertItem(chordname->text(),-1); |
401 | if (!known){ | 401 | if (!known){ |
402 | QMessageBox::information(this, "Powerchord", "This chord has been saved\ninto the list of chords,\nfor later playback."); | 402 | QMessageBox::information(this, "Powerchord", "This chord has been saved\ninto the list of chords,\nfor later playback."); |
403 | known = 1; | 403 | known = 1; |
404 | } | 404 | } |
405 | } | 405 | } |
406 | void PowerchordBase::list_remove_cb(){ | 406 | void PowerchordBase::list_remove_cb(){ |
407 | if (chordlist->count() > 0){ | 407 | if (chordlist->count() > 0){ |
408 | chordlist->removeItem(0); | 408 | chordlist->removeItem(0); |
409 | } | 409 | } |
410 | } | 410 | } |
411 | void PowerchordBase::play_chord_cb(){ | 411 | void PowerchordBase::play_chord_cb(){ |
412 | // QMessageBox::information(this, "Coming soon!", "This button plays\nthe chord by synthesizing\nthe sound of the notes."); | 412 | // QMessageBox::information(this, "Coming soon!", "This button plays\nthe chord by synthesizing\nthe sound of the notes."); |
413 | 413 | ||
414 | 414 | ||
415 | if (audio_timer){ | 415 | if (audio_timer){ |
416 | audio_timer->stop(); | 416 | audio_timer->stop(); |
417 | // set pixmap? | 417 | // set pixmap? |
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 | |||
@@ -78,54 +78,54 @@ ImageFileSelectorItem::~ImageFileSelectorItem() | |||
78 | 78 | ||
79 | ImageFileSelector::ImageFileSelector( CURRENT_VIEW scv,QWidget *parent,const char * ) | 79 | ImageFileSelector::ImageFileSelector( CURRENT_VIEW scv,QWidget *parent,const char * ) |
80 | : QWidgetStack(parent) | 80 | : QWidgetStack(parent) |
81 | { | 81 | { |
82 | 82 | ||
83 | detailed=new QListView(this); | 83 | detailed=new QListView(this); |
84 | 84 | ||
85 | detailed->addColumn (tr("Title")); | 85 | detailed->addColumn (tr("Title")); |
86 | detailed->addColumn (tr("Type")); | 86 | detailed->addColumn (tr("Type")); |
87 | detailed->setAllColumnsShowFocus( true ); | 87 | detailed->setAllColumnsShowFocus( true ); |
88 | 88 | ||
89 | tList.setAutoDelete(true); | 89 | tList.setAutoDelete(true); |
90 | 90 | ||
91 | thumb =new QScrollView(this); | 91 | thumb =new QScrollView(this); |
92 | thumb->setVScrollBarMode (QScrollView::Auto ); | 92 | thumb->setVScrollBarMode (QScrollView::Auto ); |
93 | thumb->viewport()->setBackgroundColor(colorGroup().base()); | 93 | thumb->viewport()->setBackgroundColor(colorGroup().base()); |
94 | 94 | ||
95 | background=new QWidget(0); | 95 | background=new QWidget(0); |
96 | background->setBackgroundColor(colorGroup().base()); | 96 | background->setBackgroundColor(colorGroup().base()); |
97 | thumb->addChild(background); | 97 | thumb->addChild(background); |
98 | gl = new QGridLayout(background,1,2,4,4); | 98 | gl = new QGridLayout(background,1,2,4,4); |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | connect( detailed, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), | 102 | connect( detailed, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ), |
103 | this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) ); | 103 | this, SLOT( fileClicked(int,QListViewItem*,const QPoint&,int) ) ); |
104 | connect( detailed, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ), | 104 | connect( detailed, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ), |
105 | this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) ); | 105 | this, SLOT( filePressed(int,QListViewItem*,const QPoint&,int) ) ); |
106 | connect( detailed, SIGNAL( returnPressed( QListViewItem * ) ), | 106 | connect( detailed, SIGNAL( returnPressed(QListViewItem*) ), |
107 | this, SLOT( fileClicked( QListViewItem * ) ) ); | 107 | this, SLOT( fileClicked(QListViewItem*) ) ); |
108 | 108 | ||
109 | cView=UNKNOWN; | 109 | cView=UNKNOWN; |
110 | setView(scv); | 110 | setView(scv); |
111 | reread(); | 111 | reread(); |
112 | 112 | ||
113 | } | 113 | } |
114 | ImageFileSelector::~ImageFileSelector() | 114 | ImageFileSelector::~ImageFileSelector() |
115 | { | 115 | { |
116 | 116 | ||
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | void ImageFileSelector::switchView() | 120 | void ImageFileSelector::switchView() |
121 | { | 121 | { |
122 | CURRENT_VIEW v=cView; | 122 | CURRENT_VIEW v=cView; |
123 | 123 | ||
124 | if ( v==DETAILED ) | 124 | if ( v==DETAILED ) |
125 | v=THUMBNAIL; | 125 | v=THUMBNAIL; |
126 | else | 126 | else |
127 | v=DETAILED; | 127 | v=DETAILED; |
128 | setView(v); | 128 | setView(v); |
129 | } | 129 | } |
130 | 130 | ||
131 | void ImageFileSelector::setView(CURRENT_VIEW v) | 131 | void ImageFileSelector::setView(CURRENT_VIEW v) |
@@ -192,49 +192,49 @@ void ImageFileSelector::reread(bool) | |||
192 | item = new ImageFileSelectorItem( detailed, **dit ); | 192 | item = new ImageFileSelectorItem( detailed, **dit ); |
193 | if ( item->file().file() == oldFile ) | 193 | if ( item->file().file() == oldFile ) |
194 | detailed->setCurrentItem( item ); | 194 | detailed->setCurrentItem( item ); |
195 | } | 195 | } |
196 | 196 | ||
197 | QListViewItemIterator it( detailed ); | 197 | QListViewItemIterator it( detailed ); |
198 | ImageFileSelectorItem *ii; | 198 | ImageFileSelectorItem *ii; |
199 | // iterate through all items of the listview | 199 | // iterate through all items of the listview |
200 | for ( ; it.current(); ++it ) { | 200 | for ( ; it.current(); ++it ) { |
201 | ii=(ImageFileSelectorItem *)it.current(); | 201 | ii=(ImageFileSelectorItem *)it.current(); |
202 | QImage img( ii->file().file() ); | 202 | QImage img( ii->file().file() ); |
203 | if( !img.isNull()) { | 203 | if( !img.isNull()) { |
204 | img=img.smoothScale(64,64); | 204 | img=img.smoothScale(64,64); |
205 | QPixmap pix; | 205 | QPixmap pix; |
206 | pix.convertFromImage(img); | 206 | pix.convertFromImage(img); |
207 | l=new ThumbWidget(pix,ii->file().name(),ii->file(),background,width); | 207 | l=new ThumbWidget(pix,ii->file().name(),ii->file(),background,width); |
208 | l->setBackgroundColor(colorGroup().base()); | 208 | l->setBackgroundColor(colorGroup().base()); |
209 | gl->addWidget(l,j,i); | 209 | gl->addWidget(l,j,i); |
210 | i++; | 210 | i++; |
211 | if ( i==2 ) { | 211 | if ( i==2 ) { |
212 | i=0; | 212 | i=0; |
213 | j++; | 213 | j++; |
214 | } | 214 | } |
215 | tList.append(l); | 215 | tList.append(l); |
216 | connect(l,SIGNAL(clicked(const DocLnk &)),this,SLOT(thumbClicked(const DocLnk &))); | 216 | connect(l,SIGNAL(clicked(const DocLnk&)),this,SLOT(thumbClicked(const DocLnk&))); |
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | if ( !detailed->selectedItem() ) | 220 | if ( !detailed->selectedItem() ) |
221 | detailed->setCurrentItem( detailed->firstChild() ); | 221 | detailed->setCurrentItem( detailed->firstChild() ); |
222 | 222 | ||
223 | detailed->setUpdatesEnabled(true); | 223 | detailed->setUpdatesEnabled(true); |
224 | thumb->setUpdatesEnabled(true); | 224 | thumb->setUpdatesEnabled(true); |
225 | detailed->update(); | 225 | detailed->update(); |
226 | thumb->update(); | 226 | thumb->update(); |
227 | } | 227 | } |
228 | 228 | ||
229 | int ImageFileSelector::fileCount() | 229 | int ImageFileSelector::fileCount() |
230 | { | 230 | { |
231 | return count; | 231 | return count; |
232 | } | 232 | } |
233 | const DocLnk * ImageFileSelector::selected() | 233 | const DocLnk * ImageFileSelector::selected() |
234 | { | 234 | { |
235 | qDebug("image selected"); | 235 | qDebug("image selected"); |
236 | ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); | 236 | ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); |
237 | if ( item ) | 237 | if ( item ) |
238 | return new DocLnk( item->file() ); | 238 | return new DocLnk( item->file() ); |
239 | return 0; | 239 | return 0; |
240 | } | 240 | } |
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 | |||
@@ -287,50 +287,50 @@ ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) | |||
287 | setCentralWidget( stack ); | 287 | setCentralWidget( stack ); |
288 | 288 | ||
289 | 289 | ||
290 | imagePanel = new ImagePane( stack ); | 290 | imagePanel = new ImagePane( stack ); |
291 | connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); | 291 | connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); |
292 | 292 | ||
293 | 293 | ||
294 | ImageFileSelector::CURRENT_VIEW cv; | 294 | ImageFileSelector::CURRENT_VIEW cv; |
295 | if(showThumbView) | 295 | if(showThumbView) |
296 | cv=ImageFileSelector::THUMBNAIL; | 296 | cv=ImageFileSelector::THUMBNAIL; |
297 | else | 297 | else |
298 | cv=ImageFileSelector::DETAILED; | 298 | cv=ImageFileSelector::DETAILED; |
299 | 299 | ||
300 | qDebug("cv = %d",cv); | 300 | qDebug("cv = %d",cv); |
301 | 301 | ||
302 | fileSelector = new ImageFileSelector( cv,stack, "fs"); | 302 | fileSelector = new ImageFileSelector( cv,stack, "fs"); |
303 | 303 | ||
304 | //switchThumbView(); | 304 | //switchThumbView(); |
305 | 305 | ||
306 | 306 | ||
307 | //fileSelector = new ImageFileSelector("image/*", stack, "fs"); | 307 | //fileSelector = new ImageFileSelector("image/*", stack, "fs"); |
308 | //fileSelector->setNewVisible(FALSE); | 308 | //fileSelector->setNewVisible(FALSE); |
309 | //fileSelector->setCloseVisible(FALSE); | 309 | //fileSelector->setCloseVisible(FALSE); |
310 | connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); | 310 | connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); |
311 | connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), | 311 | connect( fileSelector, SIGNAL( fileSelected(const DocLnk&) ), |
312 | this, SLOT( openFile( const DocLnk & ) ) ); | 312 | this, SLOT( openFile(const DocLnk&) ) ); |
313 | 313 | ||
314 | imageList = fileSelector->fileList(); | 314 | imageList = fileSelector->fileList(); |
315 | slideAction->setEnabled( imageList.count() != 0); | 315 | slideAction->setEnabled( imageList.count() != 0); |
316 | 316 | ||
317 | iconToolBar = new QToolBar(this); | 317 | iconToolBar = new QToolBar(this); |
318 | 318 | ||
319 | QAction *a; | 319 | QAction *a; |
320 | 320 | ||
321 | a = new QAction( tr( "Open ..." ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); | 321 | a = new QAction( tr( "Open ..." ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); |
322 | connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); | 322 | connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); |
323 | a->addTo( fileMenuView); | 323 | a->addTo( fileMenuView); |
324 | a->addTo( iconToolBar ); | 324 | a->addTo( iconToolBar ); |
325 | 325 | ||
326 | 326 | ||
327 | a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); | 327 | a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); |
328 | connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); | 328 | connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); |
329 | a->addTo( iconToolBar ); | 329 | a->addTo( iconToolBar ); |
330 | a->addTo( viewMenuView ); | 330 | a->addTo( viewMenuView ); |
331 | 331 | ||
332 | a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); | 332 | a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); |
333 | connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); | 333 | connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); |
334 | a->addTo( iconToolBar ); | 334 | a->addTo( iconToolBar ); |
335 | a->addTo( viewMenuView ); | 335 | a->addTo( viewMenuView ); |
336 | 336 | ||