summaryrefslogtreecommitdiff
path: root/core/obex/obexsend.h
authorzecke <zecke>2003-02-18 20:42:05 (UTC)
committer zecke <zecke>2003-02-18 20:42:05 (UTC)
commitd3f15e100af8a91504ac9e5fb95dce0cadfe4837 (patch) (unidiff)
tree04ddeda0f690aa1d51ba486b114251250eef2ef9 /core/obex/obexsend.h
parent9f5098a6da637e81f6525482456394a68524dc61 (diff)
downloadopie-d3f15e100af8a91504ac9e5fb95dce0cadfe4837.zip
opie-d3f15e100af8a91504ac9e5fb95dce0cadfe4837.tar.gz
opie-d3f15e100af8a91504ac9e5fb95dce0cadfe4837.tar.bz2
Convert the way of storing the devices in the QTextBrowser
we assign ids by now it looks soo nice... but it counts up tries and then say there was a failure but it is working though
Diffstat (limited to 'core/obex/obexsend.h') (more/less context) (show whitespace changes)
-rw-r--r--core/obex/obexsend.h45
1 files changed, 34 insertions, 11 deletions
diff --git a/core/obex/obexsend.h b/core/obex/obexsend.h
index fd819bc..02100f7 100644
--- a/core/obex/obexsend.h
+++ b/core/obex/obexsend.h
@@ -21,2 +21,14 @@ namespace OpieObex {
21 class Obex; 21 class Obex;
22
23 struct Pair {
24 Pair(const QString& first = QString::null,
25 const QString& second = QString::null)
26 : m_first(first), m_second(second ) {
27 }
28 QString first()const{ return m_first; }
29 QString second()const { return m_second; }
30 private:
31 QString m_first;
32 QString m_second;
33 };
22 class SendWidget : public QWidget{ 34 class SendWidget : public QWidget{
@@ -40,3 +52,3 @@ namespace OpieObex {
40 void slotBTDevices( const QMap<QString, QString>& ); 52 void slotBTDevices( const QMap<QString, QString>& );
41 void slotSelectedDevice( const QString& name, int dev ); 53 void slotSelectedDevice( int id, int dev );
42 void dispatchIrda( const QCString& str, const QByteArray& ar ); 54 void dispatchIrda( const QCString& str, const QByteArray& ar );
@@ -55,6 +67,9 @@ namespace OpieObex {
55 int m_start; 67 int m_start;
56 QStringList m_irDa; 68 QMap<int, QString> m_irDa;
57 QMap<QString, QString> m_bt; 69 QMap<int, QString>::Iterator m_irDaIt;
70 QMap<int, Pair > m_bt;
58 QString m_file; 71 QString m_file;
59 Obex* m_obex; 72 Obex* m_obex;
73 int m_irDeSearch; // search of irda and bt devices
74 int m_btDeSearch;
60 }; 75 };
@@ -63,3 +78,3 @@ namespace OpieObex {
63 DeviceItem( const QString& name = QString::null, 78 DeviceItem( const QString& name = QString::null,
64 const QString& status = QString::null, int dev = 3); 79 const QString& status = QString::null, int dev = 3, int id = -1);
65 ~DeviceItem(); 80 ~DeviceItem();
@@ -71,2 +86,3 @@ namespace OpieObex {
71 int device()const; 86 int device()const;
87 int id()const;
72 QString toString()const; 88 QString toString()const;
@@ -76,3 +92,9 @@ namespace OpieObex {
76 int m_dev; 92 int m_dev;
93 int m_id;
77 }; 94 };
95
96 /*
97 * The text field which contains the information about sending...
98 *
99 */
78 class DeviceBox : public QTextBrowser { 100 class DeviceBox : public QTextBrowser {
@@ -85,12 +107,13 @@ namespace OpieObex {
85 void setSource( const QString& str ); 107 void setSource( const QString& str );
86 void addDevice( const QString& name, int dev, 108 int addDevice( const QString& name, int dev,
87 const QString& status = QString::null ); 109 const QString& status = QString::null );
88 void removeDevice( const QString& name ); 110 void removeDevice( int );
89 void setStatus( const QString& name, const QString& ); 111 void setStatus( int, const QString& );
90 signals: 112 signals:
91 void selectedDevice( const QString& name, int dev ); 113 void selectedDevice( int id, int dev );
92 private: 114 private:
93 QMap<QString, DeviceItem> m_dev; 115 /* returns a id for a device from a device range */
94 QStringList m_devices; 116 int idFor (int deviceType );
95 117 QString allText();
118 QMap<int, DeviceItem> m_dev;
96 }; 119 };