-rw-r--r-- | core/obex/obexsend.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index 9a30a0a..2512de3 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp | |||
@@ -1,30 +1,30 @@ | |||
1 | // 7-Jul-2005 mbh@sdgsystems.com: replace hand coded form with one | 1 | // 7-Jul-2005 mbh@sdgsystems.com: replace hand coded form with one |
2 | // generated via QT2 Designer. The new form supports | 2 | // generated via QT2 Designer. The new form supports |
3 | // selection of target devices, as opposed to sending to | 3 | // selection of target devices, as opposed to sending to |
4 | // all. | 4 | // all. |
5 | 5 | ||
6 | #include "obex.h" | 6 | #include "obex.h" |
7 | #include "btobex.h" | 7 | #include "btobex.h" |
8 | #include "obexsend.h" | 8 | #include "obexsend.h" |
9 | using namespace OpieObex; | 9 | using namespace OpieObex; |
10 | 10 | ||
11 | /* OPIE */ | 11 | /* OPIE */ |
12 | #include <opie2/odebug.h> | 12 | #include <opie2/odebug.h> |
13 | #include <qpe/qcopenvelope_qws.h> | 13 | #include <qpe/qcopenvelope_qws.h> |
14 | #include <qpe/resource.h> | 14 | #include <opie2/oresource.h> |
15 | 15 | ||
16 | using namespace Opie::Core; | 16 | using namespace Opie::Core; |
17 | 17 | ||
18 | /* QT */ | 18 | /* QT */ |
19 | #include <qlabel.h> | 19 | #include <qlabel.h> |
20 | #include <qpushbutton.h> | 20 | #include <qpushbutton.h> |
21 | #include <qpixmap.h> | 21 | #include <qpixmap.h> |
22 | #include <qlistview.h> | 22 | #include <qlistview.h> |
23 | 23 | ||
24 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | /* TRANSLATOR OpieObex::SendWidget */ | 25 | /* TRANSLATOR OpieObex::SendWidget */ |
26 | 26 | ||
27 | SendWidget::SendWidget( QWidget* parent, const char* name ) | 27 | SendWidget::SendWidget( QWidget* parent, const char* name ) |
28 | : obexSendBase( parent, name ) { | 28 | : obexSendBase( parent, name ) { |
29 | initUI(); | 29 | initUI(); |
30 | } | 30 | } |
@@ -61,33 +61,33 @@ void SendWidget::initUI() { | |||
61 | * in send we'll first set everything up | 61 | * in send we'll first set everything up |
62 | * and then wait for a list of devices. | 62 | * and then wait for a list of devices. |
63 | */ | 63 | */ |
64 | void SendWidget::send( const QString& file, const QString& desc ) { | 64 | void SendWidget::send( const QString& file, const QString& desc ) { |
65 | m_file = file; | 65 | m_file = file; |
66 | m_irDa.clear(); | 66 | m_irDa.clear(); |
67 | m_start = 0; | 67 | m_start = 0; |
68 | 68 | ||
69 | fileToSend->setText(desc.isEmpty() ? file : desc ); | 69 | fileToSend->setText(desc.isEmpty() ? file : desc ); |
70 | scan_for_receivers(); | 70 | scan_for_receivers(); |
71 | } | 71 | } |
72 | 72 | ||
73 | int SendWidget::addReceiver(const char *r, const char *icon) | 73 | int SendWidget::addReceiver(const char *r, const char *icon) |
74 | { | 74 | { |
75 | QListViewItem * item = new QListViewItem( receiverList, 0 ); | 75 | QListViewItem * item = new QListViewItem( receiverList, 0 ); |
76 | item->setText( 0, r); | 76 | item->setText( 0, r); |
77 | item->setPixmap( 1, Resource::loadPixmap( icon ) ); | 77 | item->setPixmap( 1, OResource::loadPixmap( icon ) ); |
78 | 78 | ||
79 | int id=receivers.count(); | 79 | int id=receivers.count(); |
80 | receivers[id]=item; | 80 | receivers[id]=item; |
81 | return id; | 81 | return id; |
82 | } | 82 | } |
83 | 83 | ||
84 | bool SendWidget::receiverSelected(int id) | 84 | bool SendWidget::receiverSelected(int id) |
85 | { | 85 | { |
86 | return (bool)(receivers[id]->pixmap(2) != NULL); | 86 | return (bool)(receivers[id]->pixmap(2) != NULL); |
87 | } | 87 | } |
88 | 88 | ||
89 | void SendWidget::setReceiverStatus( int id, const QString& status ) { | 89 | void SendWidget::setReceiverStatus( int id, const QString& status ) { |
90 | if ( !receivers.contains(id) ) return; | 90 | if ( !receivers.contains(id) ) return; |
91 | receivers[id]->setText(3, status ); | 91 | receivers[id]->setText(3, status ); |
92 | } | 92 | } |
93 | 93 | ||
@@ -209,36 +209,36 @@ void SendWidget::scan_for_receivers() | |||
209 | if ( !QCopChannel::isRegistered("QPE/Bluetooth") ) | 209 | if ( !QCopChannel::isRegistered("QPE/Bluetooth") ) |
210 | { | 210 | { |
211 | btStatus->setText(tr("not enabled.")); | 211 | btStatus->setText(tr("not enabled.")); |
212 | } | 212 | } |
213 | else | 213 | else |
214 | { | 214 | { |
215 | QCopEnvelope e1("QPE/Bluetooth", "enableBluetooth()"); | 215 | QCopEnvelope e1("QPE/Bluetooth", "enableBluetooth()"); |
216 | btStatus->setText(tr("searching...")); | 216 | btStatus->setText(tr("searching...")); |
217 | sendButton->setEnabled( true ); | 217 | sendButton->setEnabled( true ); |
218 | QCopEnvelope e3("QPE/Bluetooth", "listDevices()"); | 218 | QCopEnvelope e3("QPE/Bluetooth", "listDevices()"); |
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | void SendWidget::toggle_receiver(QListViewItem* item) | 222 | void SendWidget::toggle_receiver(QListViewItem* item) |
223 | { | 223 | { |
224 | // toggle the state of an individual receiver. | 224 | // toggle the state of an individual receiver. |
225 | if(item->pixmap(2)) | 225 | if (item->pixmap(2)) |
226 | item->setPixmap(2,QPixmap()); | 226 | item->setPixmap(2, QPixmap()); |
227 | else | 227 | else |
228 | item->setPixmap(2,Resource::loadPixmap("obex/check.png")); | 228 | item->setPixmap(2, OResource::loadPixmap("obex/check.png")); |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | void SendWidget::closeEvent( QCloseEvent* evt) { | 232 | void SendWidget::closeEvent( QCloseEvent* evt) { |
233 | delete m_obex; | 233 | delete m_obex; |
234 | m_obex = NULL; | 234 | m_obex = NULL; |
235 | delete m_btobex; | 235 | delete m_btobex; |
236 | m_btobex = NULL; | 236 | m_btobex = NULL; |
237 | obexSendBase::closeEvent(evt); | 237 | obexSendBase::closeEvent(evt); |
238 | { | 238 | { |
239 | QCopEnvelope e("QPE/IrDaApplet", "disableIrda()"); | 239 | QCopEnvelope e("QPE/IrDaApplet", "disableIrda()"); |
240 | } | 240 | } |
241 | { | 241 | { |
242 | QCopEnvelope e("QPE/Bluetooth", "disableBluetooth()"); | 242 | QCopEnvelope e("QPE/Bluetooth", "disableBluetooth()"); |
243 | } | 243 | } |
244 | } | 244 | } |
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 91ab2e1..8498afc 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp | |||
@@ -56,33 +56,33 @@ using namespace Opie::Core; | |||
56 | /* STD */ | 56 | /* STD */ |
57 | #include <device.h> | 57 | #include <device.h> |
58 | 58 | ||
59 | namespace OpieTooth { | 59 | namespace OpieTooth { |
60 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { | 60 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { |
61 | setFixedHeight( AppLnk::smallIconSize() ); | 61 | setFixedHeight( AppLnk::smallIconSize() ); |
62 | setFixedWidth( AppLnk::smallIconSize() ); | 62 | setFixedWidth( AppLnk::smallIconSize() ); |
63 | #if OPIE_VERSION < 102010 | 63 | #if OPIE_VERSION < 102010 |
64 | bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); | 64 | bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); |
65 | bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); | 65 | bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); |
66 | bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass.png" ); | 66 | bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass.png" ); |
67 | bluezReceiveOnPixmap = Resource::loadPixmap( "bluetoothapplet/receive.png" ); | 67 | bluezReceiveOnPixmap = Resource::loadPixmap( "bluetoothapplet/receive.png" ); |
68 | #else | 68 | #else |
69 | bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon ); | 69 | bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon ); |
70 | bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon ); | 70 | bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon ); |
71 | bluezDiscoveryOnPixmap = OResource::loadImage( "bluetoothapplet/bluezondiscovery", Opie::Core::OResource::SmallIcon ); | 71 | bluezDiscoveryOnPixmap = OResource::loadImage( "bluetoothapplet/bluezondiscovery", Opie::Core::OResource::SmallIcon ); |
72 | bluezReceiveOnPixmap = Resource::loadImage( "bluetoothapplet/bluezonreceive", Opie::Core::OResource::SmallIcon ); | 72 | bluezReceiveOnPixmap = OResource::loadImage( "bluetoothapplet/bluezonreceive", Opie::Core::OResource::SmallIcon ); |
73 | #endif | 73 | #endif |
74 | startTimer(2000); | 74 | startTimer(2000); |
75 | btDevice = 0; | 75 | btDevice = 0; |
76 | btManager = 0; | 76 | btManager = 0; |
77 | bluezactive = false; | 77 | bluezactive = false; |
78 | bluezDiscoveryActive = false; | 78 | bluezDiscoveryActive = false; |
79 | bluezReceiveActive = false; | 79 | bluezReceiveActive = false; |
80 | bluezReceiveChanged = false; | 80 | bluezReceiveChanged = false; |
81 | doListDevice = false; | 81 | doListDevice = false; |
82 | isScanning = false; | 82 | isScanning = false; |
83 | m_wasOn = false; | 83 | m_wasOn = false; |
84 | m_sync = false; | 84 | m_sync = false; |
85 | 85 | ||
86 | // TODO: determine whether this channel has to be closed at destruction time. | 86 | // TODO: determine whether this channel has to be closed at destruction time. |
87 | QCopChannel* chan = new QCopChannel("QPE/Bluetooth", this ); | 87 | QCopChannel* chan = new QCopChannel("QPE/Bluetooth", this ); |
88 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), | 88 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), |