summaryrefslogtreecommitdiff
path: root/core/applets/volumeapplet/volume.cpp
Side-by-side diff
Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 7f0aca5..7d67311 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -15,25 +15,25 @@
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "volume.h"
/* OPIE */
#include <opie2/oledbox.h>
#include <opie2/odevice.h>
#include <opie2/otaskbarapplet.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
#include <qpainter.h>
#include <qcheckbox.h>
#include <qslider.h>
#include <qlayout.h>
#include <qvbox.h>
@@ -263,35 +263,32 @@ VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *pa
grid-> setSpacing ( 4 );
grid-> setMargin ( 6 );
QVBoxLayout *vbox;
QLabel *l;
vbox = new QVBoxLayout ( );
vbox-> setSpacing ( 4 );
grid-> addLayout ( vbox, 1, 0 );
upButton = new QPushButton ( this );
upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "up" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- upButton-> setPixmap ( pic );
+ upButton-> setPixmap ( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
upButton-> setFocusPolicy ( QWidget::NoFocus );
vbox-> addWidget ( upButton );
downButton = new QPushButton ( this );
downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
- pic.convertFromImage( Resource::loadImage( "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- downButton-> setPixmap ( pic );
+ downButton-> setPixmap ( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) );
downButton-> setFocusPolicy ( QWidget::NoFocus );
vbox-> addWidget ( downButton );
volSlider = new QSlider ( this );
volSlider-> setRange ( 0, 100 );
volSlider-> setTickmarks ( QSlider::Both );
volSlider-> setTickInterval ( 20 );
volSlider-> setFocusPolicy ( QWidget::NoFocus );
l = new QLabel ( this );
l-> setPixmap ( QPixmap ( vol_xpm ));
@@ -718,27 +715,25 @@ void VolumeControl::writeConfigEntry ( const char *entry, int val, eUpdate upd )
}
#endif
}
//===========================================================================
VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
: QWidget( parent, name )
{
setFixedWidth ( AppLnk::smallIconSize() );
setFixedHeight ( AppLnk::smallIconSize()+4 );
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "volume" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- m_pixmap = new QPixmap ( pic );
+ m_pixmap = new QPixmap ( Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ) );
m_dialog = new VolumeControl ( this, true, this, "volumecontrol" );
connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool)));
connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool)));
}
VolumeApplet::~VolumeApplet()
{
delete m_pixmap;
}
int VolumeApplet::position()