author | harlekin <harlekin> | 2002-07-21 20:58:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-21 20:58:37 (UTC) |
commit | 2fb3b8fdf9cb4e660e217ae563a1a49557864ca9 (patch) (unidiff) | |
tree | 975738ed841eb216946191a12d5dd19585fd738d /noncore | |
parent | 99e354d845a38e5366d954c7f8f9c71b65ad0820 (diff) | |
download | opie-2fb3b8fdf9cb4e660e217ae563a1a49557864ca9.zip opie-2fb3b8fdf9cb4e660e217ae563a1a49557864ca9.tar.gz opie-2fb3b8fdf9cb4e660e217ae563a1a49557864ca9.tar.bz2 |
nicer connection state icons
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 16 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.h | 1 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 4 |
4 files changed, 11 insertions, 12 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index ec05a95..f400ce6 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -69,26 +69,27 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
69 | this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); | 69 | this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); |
70 | connect( m_localDevice, SIGNAL( available( const QString&, bool ) ), | 70 | connect( m_localDevice, SIGNAL( available( const QString&, bool ) ), |
71 | this, SLOT( deviceActive( const QString& , bool ) ) ); | 71 | this, SLOT( deviceActive( const QString& , bool ) ) ); |
72 | connect( m_localDevice, SIGNAL( connections( ConnectionState::ValueList ) ), | 72 | connect( m_localDevice, SIGNAL( connections( ConnectionState::ValueList ) ), |
73 | this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); | 73 | this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); |
74 | 74 | ||
75 | 75 | ||
76 | // let hold be rightButtonClicked() | 76 | // let hold be rightButtonClicked() |
77 | QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); | 77 | QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); |
78 | QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); | 78 | QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); |
79 | 79 | ||
80 | //Load all icons needed | 80 | //Load all icons needed |
81 | m_offPix = Resource::loadPixmap( "editdelete" ); | 81 | m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); |
82 | m_onPix = Resource::loadPixmap( "installed" ); | 82 | m_onPix = Resource::loadPixmap( "opietooth/connected" ); |
83 | m_findPix = Resource::loadPixmap( "opietooth/find" ); | ||
83 | 84 | ||
84 | QPalette pal = this->palette(); | 85 | QPalette pal = this->palette(); |
85 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 86 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
86 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 87 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
87 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 88 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
88 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 89 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
89 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 90 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
90 | this->setPalette( pal ); | 91 | this->setPalette( pal ); |
91 | 92 | ||
92 | setCaption( tr( "Bluetooth Manager" ) ); | 93 | setCaption( tr( "Bluetooth Manager" ) ); |
93 | 94 | ||
94 | readConfig(); | 95 | readConfig(); |
@@ -348,38 +349,31 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
348 | service->services(), | 349 | service->services(), |
349 | (BTDeviceItem*)service->parent() ); | 350 | (BTDeviceItem*)service->parent() ); |
350 | }else { | 351 | }else { |
351 | qWarning("Empty"); | 352 | qWarning("Empty"); |
352 | } | 353 | } |
353 | 354 | ||
354 | if ( popup == 0l ) { | 355 | if ( popup == 0l ) { |
355 | qWarning("factory returned 0l"); | 356 | qWarning("factory returned 0l"); |
356 | popup = new QPopupMenu(); | 357 | popup = new QPopupMenu(); |
357 | } | 358 | } |
358 | 359 | ||
359 | int test1 = popup->insertItem( tr("Test1:"), 0); | 360 | int test1 = popup->insertItem( tr("Test1:"), 0); |
360 | int con = popup->insertItem( tr("connect"), 1); | ||
361 | int del = popup->insertItem( tr("delete"), 2); | ||
362 | 361 | ||
363 | ret = popup->exec( point ); | 362 | ret = popup->exec( point ); |
364 | qWarning("returned from exec() "); | 363 | qWarning("returned from exec() "); |
365 | if ( ret == -1 ) | 364 | if ( ret == -1 ) { |
366 | ; | 365 | ; |
367 | else if ( ret == test1 ) | 366 | } else if ( ret == test1 ) { |
368 | ; | 367 | ; |
369 | else if ( ret == con ) | ||
370 | ; | ||
371 | else if ( ret == del ) { | ||
372 | // take item first? -zecke | ||
373 | delete item; | ||
374 | } | 368 | } |
375 | delete popup; | 369 | delete popup; |
376 | } | 370 | } |
377 | delete menu; | 371 | delete menu; |
378 | } | 372 | } |
379 | 373 | ||
380 | 374 | ||
381 | /** | 375 | /** |
382 | * Search and display avail. services for a device (on expand from device listing) | 376 | * Search and display avail. services for a device (on expand from device listing) |
383 | * @param item the service item returned | 377 | * @param item the service item returned |
384 | */ | 378 | */ |
385 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) { | 379 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) { |
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h index a68a04b..0326daf 100644 --- a/noncore/net/opietooth/manager/bluebase.h +++ b/noncore/net/opietooth/manager/bluebase.h | |||
@@ -61,24 +61,25 @@ namespace OpieTooth { | |||
61 | 61 | ||
62 | void deviceActive( const RemoteDevice &device ); | 62 | void deviceActive( const RemoteDevice &device ); |
63 | 63 | ||
64 | QString m_deviceName; | 64 | QString m_deviceName; |
65 | QString m_defaultPasskey; | 65 | QString m_defaultPasskey; |
66 | bool m_useEncryption; | 66 | bool m_useEncryption; |
67 | bool m_enableAuthentification; | 67 | bool m_enableAuthentification; |
68 | bool m_enablePagescan; | 68 | bool m_enablePagescan; |
69 | bool m_enableInquiryscan; | 69 | bool m_enableInquiryscan; |
70 | 70 | ||
71 | QPixmap m_offPix; | 71 | QPixmap m_offPix; |
72 | QPixmap m_onPix; | 72 | QPixmap m_onPix; |
73 | QPixmap m_findPix; | ||
73 | 74 | ||
74 | BTIconLoader *m_iconLoader; | 75 | BTIconLoader *m_iconLoader; |
75 | 76 | ||
76 | private slots: | 77 | private slots: |
77 | void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); | 78 | void addSearchedDevices( const QValueList<RemoteDevice> &newDevices ); |
78 | void addServicesToDevice( BTDeviceItem *item ); | 79 | void addServicesToDevice( BTDeviceItem *item ); |
79 | void addServicesToDevice( const QString& device, Services::ValueList ); | 80 | void addServicesToDevice( const QString& device, Services::ValueList ); |
80 | void addConnectedDevices(); | 81 | void addConnectedDevices(); |
81 | void addConnectedDevices( ConnectionState::ValueList ); | 82 | void addConnectedDevices( ConnectionState::ValueList ); |
82 | void startServiceActionClicked( QListViewItem *item ); | 83 | void startServiceActionClicked( QListViewItem *item ); |
83 | void startServiceActionHold( QListViewItem *, const QPoint &, int ); | 84 | void startServiceActionHold( QListViewItem *, const QPoint &, int ); |
84 | void deviceActive( const QString& mac, bool connected ); | 85 | void deviceActive( const QString& mac, bool connected ); |
diff --git a/noncore/net/opietooth/manager/pppdialog.h b/noncore/net/opietooth/manager/pppdialog.h index 6fdc90a..bb8b734 100644 --- a/noncore/net/opietooth/manager/pppdialog.h +++ b/noncore/net/opietooth/manager/pppdialog.h | |||
@@ -9,25 +9,25 @@ class QVBoxLayout; | |||
9 | class QPushButton; | 9 | class QPushButton; |
10 | class QMultiLineEdit; | 10 | class QMultiLineEdit; |
11 | class QLineEdit; | 11 | class QLineEdit; |
12 | 12 | ||
13 | 13 | ||
14 | namespace OpieTooth { | 14 | namespace OpieTooth { |
15 | 15 | ||
16 | class PPPDialog : public QDialog { | 16 | class PPPDialog : public QDialog { |
17 | 17 | ||
18 | Q_OBJECT | 18 | Q_OBJECT |
19 | 19 | ||
20 | public: | 20 | public: |
21 | PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0, const QString& device = 0); | 21 | PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0, const QString& device = 0); |
22 | ~PPPDialog(); | 22 | ~PPPDialog(); |
23 | 23 | ||
24 | private slots: | 24 | private slots: |
25 | void connectToDevice(); | 25 | void connectToDevice(); |
26 | void fillOutPut( OProcess* pppDial, char* cha, int len ); | 26 | void fillOutPut( OProcess* pppDial, char* cha, int len ); |
27 | protected: | 27 | protected: |
28 | QVBoxLayout* layout; | 28 | QVBoxLayout* layout; |
29 | QLineEdit* cmdLine; | 29 | QLineEdit* cmdLine; |
30 | QPushButton* connectButton; | 30 | QPushButton* connectButton; |
31 | QMultiLineEdit* outPut; | 31 | QMultiLineEdit* outPut; |
32 | 32 | ||
33 | private: | 33 | private: |
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp index 1b53f4b..cc87b6c 100644 --- a/noncore/net/opietooth/manager/rfcpopup.cpp +++ b/noncore/net/opietooth/manager/rfcpopup.cpp | |||
@@ -49,25 +49,29 @@ RfcCommPopup::RfcCommPopup() | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | 51 | ||
52 | RfcCommPopup::~RfcCommPopup() { | 52 | RfcCommPopup::~RfcCommPopup() { |
53 | /* delete m_con; | 53 | /* delete m_con; |
54 | delete m_dis; | 54 | delete m_dis; |
55 | delete m_foo; | 55 | delete m_foo; |
56 | delete m_bar; */ | 56 | delete m_bar; */ |
57 | } | 57 | } |
58 | 58 | ||
59 | 59 | ||
60 | void RfcCommPopup::slotConnect() { | 60 | void RfcCommPopup::slotConnect() { |
61 | |||
61 | qWarning("connect"); | 62 | qWarning("connect"); |
63 | |||
64 | |||
65 | |||
62 | PPPDialog pppDialog; | 66 | PPPDialog pppDialog; |
63 | pppDialog.showMaximized(); | 67 | pppDialog.showMaximized(); |
64 | pppDialog.exec(); | 68 | pppDialog.exec(); |
65 | } | 69 | } |
66 | 70 | ||
67 | 71 | ||
68 | void RfcCommPopup::slotDisconnect() { | 72 | void RfcCommPopup::slotDisconnect() { |
69 | qWarning("slot disconnected"); | 73 | qWarning("slot disconnected"); |
70 | } | 74 | } |
71 | 75 | ||
72 | 76 | ||
73 | void RfcCommPopup::slotFoo() { | 77 | void RfcCommPopup::slotFoo() { |