author | simon <simon> | 2002-12-11 17:38:55 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 17:38:55 (UTC) |
commit | 719acab56c57f283168b955582ab5b30b9809b02 (patch) (side-by-side diff) | |
tree | 370c9f8bae6741b0ee2303b6c04f9329757a8a3e | |
parent | aaac5c934e7053fa4323b03f7ea31c32c6388883 (diff) | |
download | opie-719acab56c57f283168b955582ab5b30b9809b02.zip opie-719acab56c57f283168b955582ab5b30b9809b02.tar.gz opie-719acab56c57f283168b955582ab5b30b9809b02.tar.bz2 |
- copyright notice fixlet
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 15 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 14 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/singleton.h | 19 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 21 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.h | 22 |
5 files changed, 76 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index c0106d4..702e6d7 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp @@ -1,55 +1,54 @@ /* - Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> + 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 library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + 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 library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to + 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 "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 ) ) ); } 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 ); } } diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 64483d8..40eb0af 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -1,50 +1,50 @@ /* - Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> + 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 library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + 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 library is distributed in the hope that it will be useful, + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + General Public License for more details. - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef MEDIAWIDGET_H #define MEDIAWIDGET_H #include <qwidget.h> #include <qmap.h> #include "mediaplayerstate.h" #include "playlistwidget.h" #include <vector> #include <memory> namespace { struct simpleAndStupidAllocator { static void *allocate( size_t amount ) { return ::operator new( amount ); } static void deallocate( void *p, size_t ) { ::operator delete( p ); } }; } class Skin; class MediaWidget : public QWidget { Q_OBJECT diff --git a/noncore/multimedia/opieplayer2/singleton.h b/noncore/multimedia/opieplayer2/singleton.h index 35b3dff..83e228f 100644 --- a/noncore/multimedia/opieplayer2/singleton.h +++ b/noncore/multimedia/opieplayer2/singleton.h @@ -1,32 +1,51 @@ +/* + Copyright (C) 2002 Simon Hausmann <simon@lst.de> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + #ifndef SINGLETON_H #define SINGLETON_H template <class Product> struct DefaultSingletonCreator { static Product *create() { return new Product; } }; template <class Product> struct NullSingletonCreator { static Product *create() { return 0; } }; template < class T, template <class> class Creator = DefaultSingletonCreator > class Singleton { public: static T &self() { if ( !s_self ) s_self = Creator<T>::create(); return *s_self; } protected: Singleton() diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index 0de3023..cef3259 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp @@ -1,32 +1,53 @@ +/* + 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 "skin.h" #include <qpe/resource.h> #include <qpe/config.h> #include <assert.h> Skin::Skin( const QString &name, const QString &fileNameInfix ) : m_fileNameInfix( fileNameInfix ) { init( name ); } Skin::Skin( const QString &fileNameInfix ) : m_fileNameInfix( fileNameInfix ) { init( defaultSkinName() ); } void Skin::init( const QString &name ) { m_skinPath = "opieplayer2/skins/" + name; } void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) { backgroundImage(); buttonUpImage(); buttonDownImage(); ( void )buttonMask( skinButtonInfo, buttonCount ); } diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h index c15d9dc..9f7326e 100644 --- a/noncore/multimedia/opieplayer2/skin.h +++ b/noncore/multimedia/opieplayer2/skin.h @@ -1,32 +1,54 @@ +/* + Copyright (C) 2002 Simon Hausmann <simon@lst.de> + (C) 2002 Max Reiss <harlekin@handhelds.org> + (C) 2002 L. Potter <ljp@llornkcor.com> + (C) 2002 Holger Freyther <zecke@handhelds.org> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + #ifndef SKIN_H #define SKIN_H #include <qstring.h> #include <qimage.h> #include <qmap.h> #include <qdict.h> #include "mediawidget.h" #include "threadutil.h" #include "singleton.h" class Skin { public: Skin( const QString &name, const QString &fileNameInfix ); Skin( const QString &fileNameInfix ); void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ); QImage backgroundImage() const; QImage buttonUpImage() const; QImage buttonDownImage() const; QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const; QImage buttonMaskImage( const QString &fileName ) const; static QString defaultSkinName(); private: void init( const QString &name ); |