author | mickeyl <mickeyl> | 2005-01-04 23:03:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-04 23:03:23 (UTC) |
commit | 49683b3396a2e93cf49ac1726eafca6e8798be81 (patch) (side-by-side diff) | |
tree | 6aaa08205dbf55a214655c275c11cd7ef8a27bdd | |
parent | b41e4499d41fc92cc1ed4ed487e57d0a002c1a02 (diff) | |
download | opie-49683b3396a2e93cf49ac1726eafca6e8798be81.zip opie-49683b3396a2e93cf49ac1726eafca6e8798be81.tar.gz opie-49683b3396a2e93cf49ac1726eafca6e8798be81.tar.bz2 |
catch up with proper inclusion of OLedBox into libopieui
-rw-r--r-- | core/applets/volumeapplet/config.in | 2 | ||||
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 7 | ||||
-rw-r--r-- | core/applets/volumeapplet/volume.h | 8 | ||||
-rw-r--r-- | core/applets/volumeapplet/volumeapplet.pro | 7 | ||||
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/Opietooth.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/Opietooth.h | 4 |
6 files changed, 17 insertions, 13 deletions
diff --git a/core/applets/volumeapplet/config.in b/core/applets/volumeapplet/config.in index b18cd54..7ab1a27 100644 --- a/core/applets/volumeapplet/config.in +++ b/core/applets/volumeapplet/config.in @@ -1,4 +1,4 @@ config VOLUMEAPPLET boolean "opie-volumeapplet (set volume for microphone and speaker)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 45c106a..23c847d 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp @@ -1,139 +1,142 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** 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 <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> #include <qlabel.h> #include <qpushbutton.h> #include <qtimer.h> +/* STD */ #include <stdio.h> -using namespace Opie::Core; - #define RATE_TIMER_INTERVAL 100 // Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time // results in "hanging" buttons on the iPAQ due to quite high CPU consumption. /* XPM */ using namespace Opie::Ui; static const char * vol_xpm[] = { "20 20 3 1", " c None", ". c #0000FF", "+ c #000000", " ", " . ", " . . . . ", " . . . . . . ", " . . . . . . . ", " . . ..... . . ", " . ... ..... ... ", " ........... .... ", " ................. ", "++++++++++++++++++++", " .................. ", " . ............. . ", " . ..... ....... ", " . ... ..... . ", " . ... ..... . ", " . ... ..... ", " . . . . . ", " . . . ", " . . . ", " "}; /* XPM */ static const char * mic_xpm[] = { "20 20 21 1", " c None", ". c #000000", "+ c #EEEEEE", "@ c #B4B6B4", "# c #8B8D8B", "$ c #D5D6D5", "% c #E6E6E6", "& c #9C9D9C", "* c #6A696A", "= c #E6E2E6", "- c #F6F2F6", "; c #CDC6CD", "> c #737573", ", c #4A484A", "' c #DEDEDE", ") c #F6EEF6", "! c #414041", "~ c #202020", "{ c #ACAEAC", "] c #838583", "^ c #6A656A", " ", " .... ", " .+@+#. ", " ..$%&%*. ", " .=-.;=>=,. ", " .'+).&+!+. ", " .+;+;.~+~. ", " ..%{%,.... ", " ..&=>=~.. ", " .+..]^,.. ", " .+....... ", " .%... ", " .=... ", " .+... ", " .+... ", " .... ", " .... ", " .. ", " . ", ". "}; static const char * bass_xpm[] = { "20 20 3 1", " c None", ". c #000000", "+ c #0000FF", " ", " ", " ", "..... +++ ......", " +++++++ ", " ++ ++ ", "... ++ ... ++ ++ .", " +++ ++ ++ ", " ++++ ++ ", "... ++++ .. ++ .....", " ++ ++ ", " ++ ++ ", "..........++ ++ .", diff --git a/core/applets/volumeapplet/volume.h b/core/applets/volumeapplet/volume.h index 454a688..958395f 100644 --- a/core/applets/volumeapplet/volume.h +++ b/core/applets/volumeapplet/volume.h @@ -1,135 +1,135 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef __VOLUME_APPLET_H__ #define __VOLUME_APPLET_H__ #include <qframe.h> class QPixmap; class QTimer; class QSlider; class QCheckBox; class QButton; -class OLedBox; +namespace Opie { namespace Ui { class OLedBox; }; }; class VolumeApplet; class VolumeControl : public QFrame { Q_OBJECT public: VolumeControl ( VolumeApplet *icon, bool showMic = false, QWidget *parent=0, const char *name=0 ); bool volMuted ( ) const; int volPercent ( ) const; virtual void show ( bool showmic ); protected: virtual void keyPressEvent ( QKeyEvent * e ); protected slots: void volumeChanged ( bool muted ); void micChanged ( bool muted ); private slots: void volMoved ( int percent ); void micMoved ( int percent ); void alarmMoved ( int percent ); void bassMoved( int percent ); void trebleMoved( int percent ); void volMuteToggled ( bool ); void micMuteToggled ( bool ); void alarmSoundToggled ( bool ); void keyClickToggled ( bool ); void screenTapToggled ( bool ); void buttonChanged ( ); void rateTimerDone ( ); private: void readConfig ( bool force = false ); enum eUpdate { UPD_None, UPD_Vol, UPD_Mic, UPD_Bass, UPD_Treble }; void writeConfigEntry ( const char *entry, int val, eUpdate upd ); private: QSlider *volSlider; QSlider *bassSlider; QSlider *trebleSlider; QSlider *micSlider; QSlider *alarmSlider; - OLedBox *volLed; - OLedBox *micLed; - OLedBox *alarmLed; + Opie::Ui::OLedBox *volLed; + Opie::Ui::OLedBox *micLed; + Opie::Ui::OLedBox *alarmLed; QCheckBox *alarmBox; QCheckBox *tapBox; QCheckBox *keyBox; QPushButton *upButton; QPushButton *downButton; QTimer *rateTimer; int m_vol_percent; int m_mic_percent; int m_alarm_percent; int m_bass_percent; int m_treble_percent; bool m_vol_muted; bool m_mic_muted; bool m_snd_alarm; bool m_snd_touch; bool m_snd_key; VolumeApplet *m_icon; }; class VolumeApplet : public QWidget { Q_OBJECT public: VolumeApplet ( QWidget *parent = 0, const char *name=0 ); ~VolumeApplet ( ); static int position(); void redraw ( bool all = true ); protected: virtual void mousePressEvent ( QMouseEvent * ); virtual void paintEvent ( QPaintEvent* ); private: QPixmap * m_pixmap; VolumeControl *m_dialog; }; #endif // __VOLUME_APPLET_H__ diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro index e118dbd..3067a0f 100644 --- a/core/applets/volumeapplet/volumeapplet.pro +++ b/core/applets/volumeapplet/volumeapplet.pro @@ -1,14 +1,13 @@ TEMPLATE = lib CONFIG += qt plugin warn_on -HEADERS = volume.h oledbox.h -#SOURCES = volume.cpp oledbox.cpp +HEADERS = volume.h SOURCES = volume.cpp TARGET = volumeapplet DESTDIR = $(OPIEDIR)/plugins/applets -INCLUDEPATH += $(OPIEDIR)/include +INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += -LIBS += -lqpe -lopiecore2 +LIBS += -lqpe -lopiecore2 -lopieui2 VERSION = 1.0.0 include( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp index 8d71f32..8ea3a48 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp @@ -1,98 +1,100 @@ #include <opie2/odebug.h> #include <opie2/oledbox.h> +using namespace Opie::Core; +using namespace Opie::Ui; #include <qpe/resource.h> #include <qcheckbox.h> #include <qgroupbox.h> #include <qlabel.h> #include <qprogressbar.h> #include <qheader.h> #include <qmessagebox.h> #include <qapplication.h> #include <qlistbox.h> #include <qdialog.h> #include <qlayout.h> #include <qcombobox.h> #include <qlabel.h> #include <qlistview.h> #include <qpushbutton.h> #include <Opietooth.h> #include <OTDriver.h> #include <OTPeer.h> #include <OTGateway.h> #include <OTSDPAttribute.h> #include <OTSDPService.h> #include <OTInquiry.h> using namespace Opietooth2; namespace Opietooth2 { class PeerLVI : public QListViewItem { public : PeerLVI( OTPeer * P, QListView * it ) : QListViewItem (it) { Peer = P; } ~PeerLVI( void ) { } inline OTPeer * peer( void ) { return Peer; } private : OTPeer * Peer; }; class ChannelLVI : public QListViewItem { public : ChannelLVI( int Ch, QListViewItem * it ) : QListViewItem (it) { Channel = Ch; } ~ChannelLVI( void ) { } inline int channel( void ) { return Channel; } private : int Channel; }; class DriverLVI : public QListViewItem { public : DriverLVI( OTDriver * P, QListView * it ) : QListViewItem (it) { Driver = P; } ~DriverLVI( void ) { } inline OTDriver * driver( void ) { return Driver; } private : OTDriver * Driver; }; class LinkKeyLVI : public QListViewItem { public : LinkKeyLVI( int Ch, QListView * it ) : QListViewItem (it) { LinkKey = Ch; } ~LinkKeyLVI( void ) { } inline int index( void ) { return LinkKey; } diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.h b/noncore/settings/networksettings2/opietooth2/Opietooth.h index 9e53fcb..16a22d6 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.h +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.h @@ -1,194 +1,194 @@ #ifndef OPIETOOTH_H #define OPIETOOTH_H #include <OTIcons.h> #include <OTPairingGUI.h> -class OLedBox; +namespace Opie { namespace Ui { class OLedBox; }; }; namespace Opietooth2 { class OTGateway; class OTDriver; class OTInquiry; class OTPeer; class PeerLVI; class OTPairing : public OTPairingGUI { Q_OBJECT public : OTPairing( QWidget * parent, OTIcons * _Ic = 0 ); ~OTPairing(); private slots : void SLOT_Unpair( void ); signals : protected : private : bool MyIcons; OTIcons * Icons; OTGateway * OT; }; }; #include <OTScanGUI.h> namespace Opietooth2 { class OTGateway; class OTDriver; class OTInquiry; class OTPeer; class OTScan : public OTScanGUI { Q_OBJECT public : OTScan( QWidget * parent, OTIcons * _Ic = 0 ); ~OTScan(); // static function to return a device and a channel static int getDevice( OTPeer *& Peer, int & Channel, OTGateway * OT, const UUIDVector & Filter = 0, QWidget* Parent = 0); // show only services that match any of the filter void setScanFilter( const UUIDVector & Filter ); void resetScanFilter( void ); inline OTPeer * selectedPeer( void ) { return SelectedPeer; } inline int selectedChannel( void ) { return SelectedChannel; } public slots : private slots : void SLOT_DoScan( bool ); void SLOT_NewPeer( OTPeer *, bool ); void SLOT_FinishedDetecting(); void SLOT_Show( QListViewItem *); void SLOT_RefreshServices( void ); void SLOT_RefreshState( void ); void SLOT_CleanupOld( void ); void SLOT_UpdateStrength( void ); void SLOT_PeerState( OTPeer * ); void SLOT_Selected( QListViewItem * ); signals : void selected( void ); protected : private : void refreshState( PeerLVI *, bool ); void scanMode( bool ); // load scanned devices bool MyIcons; OTIcons * Icons; OTGateway * OT; OTInquiry * Scanning; UUIDVector Filter; - OLedBox * Paired_Led; + Opie::Ui::OLedBox * Paired_Led; QTimer * StrengthTimer; PeerLVI * Current; OTPeer * SelectedPeer; int SelectedChannel; }; }; #include <OTManageGUI.h> namespace Opietooth2 { class OTManage : public OTManageGUI { Q_OBJECT public : OTManage( QWidget * parent, OTIcons * _IC = 0 ); ~OTManage(); public slots : private slots : void SLOT_ShowDriver( QListViewItem * ); void SLOT_UpDriver( bool ); void SLOT_StateChange( OTDriver * , bool ); void SLOT_DriverListChanged(); void SLOT_SetRefreshTimer( int ); signals : protected : private : // load scanned devices bool MyIcons; OTIcons * Icons; OTGateway * OT; OTInquiry * Scanning; }; }; #include <OTMainGUI.h> namespace Opietooth2 { class OTMain : public OTMainGUI { Q_OBJECT public : OTMain( QWidget * parent ); ~OTMain(); public slots : private slots : void SLOT_Pairing( void ); void SLOT_Manage( void ); void SLOT_Scan( void ); void SLOT_EnableBluetooth( bool ); void SLOT_DriverListChanged(); void SLOT_DeviceIsEnabled( bool ); void SLOT_StateChange( OTDriver * , bool ); signals : protected : private : // load scanned devices OTIcons * Icons; OTGateway * OT; }; }; #endif |