Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index ed07ec4..906bb77 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp | |||
@@ -3,48 +3,49 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | 22 | ||
23 | #include "volume.h" | 23 | #include "volume.h" |
24 | 24 | ||
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | #include <qpe/applnk.h> | ||
27 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
28 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) | 29 | #if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) |
29 | #include <qpe/qcopenvelope_qws.h> | 30 | #include <qpe/qcopenvelope_qws.h> |
30 | #endif | 31 | #endif |
31 | 32 | ||
32 | #include <qpainter.h> | 33 | #include <qpainter.h> |
33 | #include <qcheckbox.h> | 34 | #include <qcheckbox.h> |
34 | #include <qslider.h> | 35 | #include <qslider.h> |
35 | #include <qlayout.h> | 36 | #include <qlayout.h> |
36 | #include <qframe.h> | 37 | #include <qframe.h> |
37 | #include <qpixmap.h> | 38 | #include <qpixmap.h> |
38 | #include <qvbox.h> | 39 | #include <qvbox.h> |
39 | #include <qlabel.h> | 40 | #include <qlabel.h> |
40 | 41 | ||
41 | #include <qtoolbutton.h> | 42 | #include <qtoolbutton.h> |
42 | #include <qpushbutton.h> | 43 | #include <qpushbutton.h> |
43 | #include <qtimer.h> | 44 | #include <qtimer.h> |
44 | 45 | ||
45 | #include <opie/odevice.h> | 46 | #include <opie/odevice.h> |
46 | 47 | ||
47 | #include "oledbox.h" | 48 | #include "oledbox.h" |
48 | 49 | ||
49 | using namespace Opie; | 50 | using namespace Opie; |
50 | 51 | ||
@@ -704,50 +705,50 @@ void VolumeControl::writeConfigEntry ( const char *entry, int val, eUpdate upd ) | |||
704 | case UPD_Mic: { | 705 | case UPD_Mic: { |
705 | QCopEnvelope ( "QPE/System", "micChange(bool)" ) << m_mic_muted; | 706 | QCopEnvelope ( "QPE/System", "micChange(bool)" ) << m_mic_muted; |
706 | break; | 707 | break; |
707 | } | 708 | } |
708 | case UPD_Bass: { | 709 | case UPD_Bass: { |
709 | QCopEnvelope ( "QPE/System", "bassChange(bool)" ) << true; | 710 | QCopEnvelope ( "QPE/System", "bassChange(bool)" ) << true; |
710 | break; | 711 | break; |
711 | } | 712 | } |
712 | case UPD_Treble: { | 713 | case UPD_Treble: { |
713 | QCopEnvelope ( "QPE/System", "trebleChange(bool)" ) << true; | 714 | QCopEnvelope ( "QPE/System", "trebleChange(bool)" ) << true; |
714 | break; | 715 | break; |
715 | } | 716 | } |
716 | 717 | ||
717 | case UPD_None: | 718 | case UPD_None: |
718 | break; | 719 | break; |
719 | } | 720 | } |
720 | #endif | 721 | #endif |
721 | } | 722 | } |
722 | 723 | ||
723 | //=========================================================================== | 724 | //=========================================================================== |
724 | 725 | ||
725 | VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) | 726 | VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) |
726 | : QWidget( parent, name ) | 727 | : QWidget( parent, name ) |
727 | { | 728 | { |
728 | setFixedHeight ( 18 ); | 729 | setFixedWidth ( AppLnk::smallIconSize() ); |
729 | setFixedWidth ( 14 ); | 730 | setFixedHeight ( AppLnk::smallIconSize() ); |
730 | 731 | ||
731 | m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); | 732 | m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); |
732 | m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); | 733 | m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); |
733 | 734 | ||
734 | connect ( qApp, SIGNAL( volumeChanged ( bool )), m_dialog, SLOT( volumeChanged( bool ))); | 735 | connect ( qApp, SIGNAL( volumeChanged ( bool )), m_dialog, SLOT( volumeChanged( bool ))); |
735 | connect ( qApp, SIGNAL( micChanged ( bool )), m_dialog, SLOT ( micChanged( bool ))); | 736 | connect ( qApp, SIGNAL( micChanged ( bool )), m_dialog, SLOT ( micChanged( bool ))); |
736 | } | 737 | } |
737 | 738 | ||
738 | VolumeApplet::~VolumeApplet() | 739 | VolumeApplet::~VolumeApplet() |
739 | { | 740 | { |
740 | delete m_pixmap; | 741 | delete m_pixmap; |
741 | } | 742 | } |
742 | 743 | ||
743 | 744 | ||
744 | void VolumeApplet::mousePressEvent ( QMouseEvent * ) | 745 | void VolumeApplet::mousePressEvent ( QMouseEvent * ) |
745 | { | 746 | { |
746 | if ( m_dialog-> isVisible ( )) | 747 | if ( m_dialog-> isVisible ( )) |
747 | m_dialog-> hide ( ); | 748 | m_dialog-> hide ( ); |
748 | else | 749 | else |
749 | m_dialog-> show ( true ); | 750 | m_dialog-> show ( true ); |
750 | } | 751 | } |
751 | 752 | ||
752 | void VolumeApplet::redraw ( bool all ) | 753 | void VolumeApplet::redraw ( bool all ) |
753 | { | 754 | { |