author | zecke <zecke> | 2002-07-12 17:18:12 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-07-12 17:18:12 (UTC) |
commit | d0401e1888a9a1af6be3a737484afca699642d15 (patch) (side-by-side diff) | |
tree | e72f54007424a2f8717584933c9a1040184feb81 | |
parent | 89dce758480cc90502ad14b6c4cf80774e6c1845 (diff) | |
download | opie-d0401e1888a9a1af6be3a737484afca699642d15.zip opie-d0401e1888a9a1af6be3a737484afca699642d15.tar.gz opie-d0401e1888a9a1af6be3a737484afca699642d15.tar.bz2 |
The files
-rw-r--r-- | noncore/net/opietooth/manager/btconnectionitem.cpp | 23 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btconnectionitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btdeviceitem.cpp | 30 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btdeviceitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btserviceitem.cpp | 23 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btserviceitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.h | 15 |
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 @@ +#include <connection.h> +#include "btconnectionitem.h" + +using namespace OpieTooth; + +BTConnectionItem::BTConnectionItem( QListView* parent, const ConnectionState& con ) + : BTListItem( parent ){ + m_con = con; + setText(0, m_con.mac() ); +} +BTConnectionItem::~BTConnectionItem() { + +} +QString BTConnectionItem::type() const { + return QString::fromLatin1("connection"); +} +int BTConnectionItem::typeId() const { + return Connection; +} +ConnectionState BTConnectionItem::connection() const { + return m_con; +} + 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 @@ + +#ifndef OPIE_TOOTH_BT_CONNECTION_ITEM_H +#define OPIE_TOOTH_BT_CONNECTION_ITEM_H + + +#include "btlistitem.h" + +namespace OpieTooth { + + class ConnectionState; + class BTConnectionItem : public BTListItem { + public: + BTConnectionItem( QListView* parent, const ConnectionState& state ); + ~BTConnectionItem(); + QString type()const; + int typeId() const; + ConnectionState connection()const; + private: + ConnectionState m_con; + + }; + +}; + + +#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 @@ + +#include "btdeviceitem.h" + +using namespace OpieTooth; + + +BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev ) + : BTListItem( parent ) { + + setText( 0, dev.name() ); + m_device = dev; +}; +BTDeviceItem::~BTDeviceItem() { +// nothing I'm aware of +} +RemoteDevice BTDeviceItem::remoteDevice() const { + return m_device; +} +QString BTDeviceItem::mac()const { + return m_device.mac(); +} +QString BTDeviceItem::name() const { + return m_device.name(); +} +QString BTDeviceItem::type() const { + return QString::fromLatin1("device"); +} +int BTDeviceItem::typeId() const { + return Device; +} 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 @@ + +#ifndef OPIE_TOOTH_BT_DEVIVE_ITEM +#define OPIE_TOOTH_BT_DEVIVE_ITEM + + +#include <remotedevice.h> +#include "btlistitem.h" + +namespace OpieTooth { + class BTDeviceItem : public BTListItem { + public: + BTDeviceItem( QListView* parent, const RemoteDevice& dev ); + ~BTDeviceItem(); + RemoteDevice remoteDevice() const; + QString type()const; + int typeId()const; + QString mac()const; + QString name() const; + private: + RemoteDevice m_device; + }; + +}; + + +#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 @@ + +#include <qobject.h> +#include "btserviceitem.h" + +using namespace OpieTooth; + +BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv ) + : BTListItem( item ) { + m_service = serv; + setText(0, QObject::tr(serv.serviceName() ) ); +} +BTServiceItem::~BTServiceItem() { + +} +QString BTServiceItem::type() const { + return QString::fromLatin1("Service"); +} +int BTServiceItem::typeId() const { + return Service; +} +Services BTServiceItem::services() const { + return m_service; +} 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 @@ + + +#ifndef OPIE_TOOTH_BT_SERVICE_ITEM +#define OPIE_TOOTH_BT_SERVICE_ITEM + +#include <services.h> + +#include "btlistitem.h" + +namespace OpieTooth { + + class BTServiceItem : public BTListItem { + public: + BTServiceItem( QListViewItem* item, const Services& ); + ~BTServiceItem(); + QString type() const; + int typeId() const; + Services services() const; + private: + Services m_service; + + }; +}; + + +#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 @@ + +#include "stdpopups.h" + + +QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* ) { + return 0l; +} +QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* ) { + return 0l; +} 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 @@ + +#ifndef OPIE_TOOTH_STD_POPUPS +#define OPIE_TOOTH_STD_POPUPS + +#include <qlistview.h> +#include <qpopupmenu.h> + +#include <services.h> + +extern "C" { +QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* ); +QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* ); +} + +#endif |