summaryrefslogtreecommitdiff
authorzecke <zecke>2002-07-12 17:18:12 (UTC)
committer zecke <zecke>2002-07-12 17:18:12 (UTC)
commitd0401e1888a9a1af6be3a737484afca699642d15 (patch) (unidiff)
treee72f54007424a2f8717584933c9a1040184feb81
parent89dce758480cc90502ad14b6c4cf80774e6c1845 (diff)
downloadopie-d0401e1888a9a1af6be3a737484afca699642d15.zip
opie-d0401e1888a9a1af6be3a737484afca699642d15.tar.gz
opie-d0401e1888a9a1af6be3a737484afca699642d15.tar.bz2
The files
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/btconnectionitem.cpp23
-rw-r--r--noncore/net/opietooth/manager/btconnectionitem.h26
-rw-r--r--noncore/net/opietooth/manager/btdeviceitem.cpp30
-rw-r--r--noncore/net/opietooth/manager/btdeviceitem.h26
-rw-r--r--noncore/net/opietooth/manager/btserviceitem.cpp23
-rw-r--r--noncore/net/opietooth/manager/btserviceitem.h26
-rw-r--r--noncore/net/opietooth/manager/stdpopups.cpp10
-rw-r--r--noncore/net/opietooth/manager/stdpopups.h15
8 files changed, 179 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/btconnectionitem.cpp b/noncore/net/opietooth/manager/btconnectionitem.cpp
new file mode 100644
index 0000000..6fb9c11
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btconnectionitem.cpp
@@ -0,0 +1,23 @@
1#include <connection.h>
2#include "btconnectionitem.h"
3
4using namespace OpieTooth;
5
6BTConnectionItem::BTConnectionItem( QListView* parent, const ConnectionState& con )
7 : BTListItem( parent ){
8 m_con = con;
9 setText(0, m_con.mac() );
10}
11BTConnectionItem::~BTConnectionItem() {
12
13}
14QString BTConnectionItem::type() const {
15 return QString::fromLatin1("connection");
16}
17int BTConnectionItem::typeId() const {
18 return Connection;
19}
20ConnectionState BTConnectionItem::connection() const {
21 return m_con;
22}
23
diff --git a/noncore/net/opietooth/manager/btconnectionitem.h b/noncore/net/opietooth/manager/btconnectionitem.h
new file mode 100644
index 0000000..3c0cd79
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btconnectionitem.h
@@ -0,0 +1,26 @@
1
2#ifndef OPIE_TOOTH_BT_CONNECTION_ITEM_H
3#define OPIE_TOOTH_BT_CONNECTION_ITEM_H
4
5
6#include "btlistitem.h"
7
8namespace OpieTooth {
9
10 class ConnectionState;
11 class BTConnectionItem : public BTListItem {
12 public:
13 BTConnectionItem( QListView* parent, const ConnectionState& state );
14 ~BTConnectionItem();
15 QString type()const;
16 int typeId() const;
17 ConnectionState connection()const;
18 private:
19 ConnectionState m_con;
20
21 };
22
23};
24
25
26#endif
diff --git a/noncore/net/opietooth/manager/btdeviceitem.cpp b/noncore/net/opietooth/manager/btdeviceitem.cpp
new file mode 100644
index 0000000..fb1b1c1
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btdeviceitem.cpp
@@ -0,0 +1,30 @@
1
2#include "btdeviceitem.h"
3
4using namespace OpieTooth;
5
6
7BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev )
8 : BTListItem( parent ) {
9
10 setText( 0, dev.name() );
11 m_device = dev;
12};
13BTDeviceItem::~BTDeviceItem() {
14// nothing I'm aware of
15}
16RemoteDevice BTDeviceItem::remoteDevice() const {
17 return m_device;
18}
19QString BTDeviceItem::mac()const {
20 return m_device.mac();
21}
22QString BTDeviceItem::name() const {
23 return m_device.name();
24}
25QString BTDeviceItem::type() const {
26 return QString::fromLatin1("device");
27}
28int BTDeviceItem::typeId() const {
29 return Device;
30}
diff --git a/noncore/net/opietooth/manager/btdeviceitem.h b/noncore/net/opietooth/manager/btdeviceitem.h
new file mode 100644
index 0000000..ae51483
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btdeviceitem.h
@@ -0,0 +1,26 @@
1
2#ifndef OPIE_TOOTH_BT_DEVIVE_ITEM
3#define OPIE_TOOTH_BT_DEVIVE_ITEM
4
5
6#include <remotedevice.h>
7#include "btlistitem.h"
8
9namespace OpieTooth {
10 class BTDeviceItem : public BTListItem {
11 public:
12 BTDeviceItem( QListView* parent, const RemoteDevice& dev );
13 ~BTDeviceItem();
14 RemoteDevice remoteDevice() const;
15 QString type()const;
16 int typeId()const;
17 QString mac()const;
18 QString name() const;
19 private:
20 RemoteDevice m_device;
21 };
22
23};
24
25
26#endif
diff --git a/noncore/net/opietooth/manager/btserviceitem.cpp b/noncore/net/opietooth/manager/btserviceitem.cpp
new file mode 100644
index 0000000..db71c3c
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btserviceitem.cpp
@@ -0,0 +1,23 @@
1
2#include <qobject.h>
3#include "btserviceitem.h"
4
5using namespace OpieTooth;
6
7BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv )
8 : BTListItem( item ) {
9 m_service = serv;
10 setText(0, QObject::tr(serv.serviceName() ) );
11}
12BTServiceItem::~BTServiceItem() {
13
14}
15QString BTServiceItem::type() const {
16 return QString::fromLatin1("Service");
17}
18int BTServiceItem::typeId() const {
19 return Service;
20}
21Services BTServiceItem::services() const {
22 return m_service;
23}
diff --git a/noncore/net/opietooth/manager/btserviceitem.h b/noncore/net/opietooth/manager/btserviceitem.h
new file mode 100644
index 0000000..6dbd8f1
--- a/dev/null
+++ b/noncore/net/opietooth/manager/btserviceitem.h
@@ -0,0 +1,26 @@
1
2
3#ifndef OPIE_TOOTH_BT_SERVICE_ITEM
4#define OPIE_TOOTH_BT_SERVICE_ITEM
5
6#include <services.h>
7
8#include "btlistitem.h"
9
10namespace OpieTooth {
11
12 class BTServiceItem : public BTListItem {
13 public:
14 BTServiceItem( QListViewItem* item, const Services& );
15 ~BTServiceItem();
16 QString type() const;
17 int typeId() const;
18 Services services() const;
19 private:
20 Services m_service;
21
22 };
23};
24
25
26#endif
diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp
new file mode 100644
index 0000000..43a0f62
--- a/dev/null
+++ b/noncore/net/opietooth/manager/stdpopups.cpp
@@ -0,0 +1,10 @@
1
2#include "stdpopups.h"
3
4
5QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* ) {
6 return 0l;
7}
8QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* ) {
9 return 0l;
10}
diff --git a/noncore/net/opietooth/manager/stdpopups.h b/noncore/net/opietooth/manager/stdpopups.h
new file mode 100644
index 0000000..185d68d
--- a/dev/null
+++ b/noncore/net/opietooth/manager/stdpopups.h
@@ -0,0 +1,15 @@
1
2#ifndef OPIE_TOOTH_STD_POPUPS
3#define OPIE_TOOTH_STD_POPUPS
4
5#include <qlistview.h>
6#include <qpopupmenu.h>
7
8#include <services.h>
9
10extern "C" {
11QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* );
12QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* );
13}
14
15#endif