-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 1 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.h | 13 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlgbase.ui | 244 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 2 |
4 files changed, 170 insertions, 90 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 54f096e..7d60d6c 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc | |||
@@ -17,12 +17,13 @@ PinDlg::PinDlg( const QString& status, | |||
17 | const char* name ) | 17 | const char* name ) |
18 | : PinDlgBase( parent, name, WType_Modal ) | 18 | : PinDlgBase( parent, name, WType_Modal ) |
19 | { | 19 | { |
20 | m_mac = mac; | 20 | m_mac = mac; |
21 | test( mac ); | 21 | test( mac ); |
22 | txtStatus->setText(status); | 22 | txtStatus->setText(status); |
23 | showMaximized(); | ||
23 | } | 24 | } |
24 | PinDlg::~PinDlg() { | 25 | PinDlg::~PinDlg() { |
25 | 26 | ||
26 | } | 27 | } |
27 | void PinDlg::setMac( const QString& mac ) { | 28 | void PinDlg::setMac( const QString& mac ) { |
28 | txtStatus->setText( mac ); | 29 | txtStatus->setText( mac ); |
diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h index b4f5ff8..5e5a763 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.h +++ b/noncore/net/opietooth/blue-pin/pindlg.h | |||
@@ -1,26 +1,29 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <qdialog.h> | 3 | #include <qdialog.h> |
4 | |||
5 | #include "pindlgbase.h" | 4 | #include "pindlgbase.h" |
6 | 5 | ||
7 | namespace OpieTooth { | 6 | namespace OpieTooth { |
7 | |||
8 | class PinDlg : public PinDlgBase { | 8 | class PinDlg : public PinDlgBase { |
9 | Q_OBJECT | 9 | |
10 | Q_OBJECT | ||
11 | |||
10 | public: | 12 | public: |
11 | PinDlg(const QString& text, | 13 | PinDlg(const QString& text, |
12 | const QString& mac, | 14 | const QString& mac, |
13 | QWidget* parent = 0, | 15 | QWidget* parent = 0, |
14 | const char* name= 0 ); | 16 | const char* name= 0 ); |
15 | ~PinDlg(); | 17 | ~PinDlg(); |
16 | void setMac( const QString& ); | 18 | void setMac( const QString& ); |
17 | QString pin() const; | 19 | QString pin() const; |
20 | |||
18 | private: | 21 | private: |
19 | void test( const QString& mac ); | 22 | void test( const QString& mac ); |
20 | QString m_mac; | 23 | QString m_mac; |
21 | protected slots: | ||
22 | void accept(); | ||
23 | }; | ||
24 | 24 | ||
25 | protected slots: | ||
26 | void accept(); | ||
25 | 27 | ||
28 | }; | ||
26 | }; | 29 | }; |
diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui index 6966a03..889a25e 100644 --- a/noncore/net/opietooth/blue-pin/pindlgbase.ui +++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui | |||
@@ -9,77 +9,190 @@ | |||
9 | </property> | 9 | </property> |
10 | <property stdset="1"> | 10 | <property stdset="1"> |
11 | <name>geometry</name> | 11 | <name>geometry</name> |
12 | <rect> | 12 | <rect> |
13 | <x>0</x> | 13 | <x>0</x> |
14 | <y>0</y> | 14 | <y>0</y> |
15 | <width>248</width> | 15 | <width>258</width> |
16 | <height>167</height> | 16 | <height>245</height> |
17 | </rect> | 17 | </rect> |
18 | </property> | 18 | </property> |
19 | <property stdset="1"> | 19 | <property stdset="1"> |
20 | <name>caption</name> | 20 | <name>caption</name> |
21 | <string>Please enter pin</string> | 21 | <string>Please enter pin</string> |
22 | </property> | 22 | </property> |
23 | <grid> | 23 | <vbox> |
24 | <property stdset="1"> | 24 | <property stdset="1"> |
25 | <name>margin</name> | 25 | <name>margin</name> |
26 | <number>11</number> | 26 | <number>11</number> |
27 | </property> | 27 | </property> |
28 | <property stdset="1"> | 28 | <property stdset="1"> |
29 | <name>spacing</name> | 29 | <name>spacing</name> |
30 | <number>6</number> | 30 | <number>6</number> |
31 | </property> | 31 | </property> |
32 | <widget row="0" column="0" > | 32 | <widget> |
33 | <class>QLabel</class> | ||
34 | <property stdset="1"> | ||
35 | <name>name</name> | ||
36 | <cstring>txtStatus</cstring> | ||
37 | </property> | ||
38 | <property stdset="1"> | ||
39 | <name>text</name> | ||
40 | <string></string> | ||
41 | </property> | ||
42 | <property stdset="1"> | ||
43 | <name>textFormat</name> | ||
44 | <enum>RichText</enum> | ||
45 | </property> | ||
46 | </widget> | ||
47 | <spacer> | ||
48 | <property> | ||
49 | <name>name</name> | ||
50 | <cstring>Spacer4_2</cstring> | ||
51 | </property> | ||
52 | <property stdset="1"> | ||
53 | <name>orientation</name> | ||
54 | <enum>Vertical</enum> | ||
55 | </property> | ||
56 | <property stdset="1"> | ||
57 | <name>sizeType</name> | ||
58 | <enum>Expanding</enum> | ||
59 | </property> | ||
60 | <property> | ||
61 | <name>sizeHint</name> | ||
62 | <size> | ||
63 | <width>20</width> | ||
64 | <height>20</height> | ||
65 | </size> | ||
66 | </property> | ||
67 | </spacer> | ||
68 | <widget> | ||
33 | <class>QLayoutWidget</class> | 69 | <class>QLayoutWidget</class> |
34 | <property stdset="1"> | 70 | <property stdset="1"> |
35 | <name>name</name> | 71 | <name>name</name> |
36 | <cstring>Layout6</cstring> | 72 | <cstring>Layout6</cstring> |
37 | </property> | 73 | </property> |
38 | <grid> | 74 | <vbox> |
39 | <property stdset="1"> | 75 | <property stdset="1"> |
40 | <name>margin</name> | 76 | <name>margin</name> |
41 | <number>0</number> | 77 | <number>0</number> |
42 | </property> | 78 | </property> |
43 | <property stdset="1"> | 79 | <property stdset="1"> |
44 | <name>spacing</name> | 80 | <name>spacing</name> |
45 | <number>6</number> | 81 | <number>6</number> |
46 | </property> | 82 | </property> |
47 | <widget row="3" column="0" rowspan="1" colspan="3" > | 83 | <widget> |
48 | <class>QLineEdit</class> | 84 | <class>QLabel</class> |
49 | <property stdset="1"> | 85 | <property stdset="1"> |
50 | <name>name</name> | 86 | <name>name</name> |
51 | <cstring>lnePin</cstring> | 87 | <cstring>TextLabel3</cstring> |
52 | </property> | 88 | </property> |
53 | <property stdset="1"> | 89 | <property stdset="1"> |
54 | <name>echoMode</name> | 90 | <name>text</name> |
55 | <enum>Password</enum> | 91 | <string>Please enter PIN:</string> |
56 | </property> | 92 | </property> |
57 | </widget> | 93 | </widget> |
58 | <spacer row="5" column="4" > | 94 | <widget> |
59 | <property> | 95 | <class>QLayoutWidget</class> |
96 | <property stdset="1"> | ||
60 | <name>name</name> | 97 | <name>name</name> |
61 | <cstring>Spacer2</cstring> | 98 | <cstring>Layout5</cstring> |
62 | </property> | 99 | </property> |
100 | <hbox> | ||
101 | <property stdset="1"> | ||
102 | <name>margin</name> | ||
103 | <number>0</number> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>spacing</name> | ||
107 | <number>6</number> | ||
108 | </property> | ||
109 | <widget> | ||
110 | <class>QLineEdit</class> | ||
111 | <property stdset="1"> | ||
112 | <name>name</name> | ||
113 | <cstring>lnePin</cstring> | ||
114 | </property> | ||
115 | <property stdset="1"> | ||
116 | <name>echoMode</name> | ||
117 | <enum>Password</enum> | ||
118 | </property> | ||
119 | </widget> | ||
120 | <spacer> | ||
121 | <property> | ||
122 | <name>name</name> | ||
123 | <cstring>Spacer4</cstring> | ||
124 | </property> | ||
125 | <property stdset="1"> | ||
126 | <name>orientation</name> | ||
127 | <enum>Horizontal</enum> | ||
128 | </property> | ||
129 | <property stdset="1"> | ||
130 | <name>sizeType</name> | ||
131 | <enum>Fixed</enum> | ||
132 | </property> | ||
133 | <property> | ||
134 | <name>sizeHint</name> | ||
135 | <size> | ||
136 | <width>21</width> | ||
137 | <height>20</height> | ||
138 | </size> | ||
139 | </property> | ||
140 | </spacer> | ||
141 | </hbox> | ||
142 | </widget> | ||
143 | <widget> | ||
144 | <class>QCheckBox</class> | ||
63 | <property stdset="1"> | 145 | <property stdset="1"> |
64 | <name>orientation</name> | 146 | <name>name</name> |
65 | <enum>Horizontal</enum> | 147 | <cstring>ckbPin</cstring> |
66 | </property> | 148 | </property> |
67 | <property stdset="1"> | 149 | <property stdset="1"> |
68 | <name>sizeType</name> | 150 | <name>text</name> |
69 | <enum>Fixed</enum> | 151 | <string>Save pin</string> |
70 | </property> | ||
71 | <property> | ||
72 | <name>sizeHint</name> | ||
73 | <size> | ||
74 | <width>16</width> | ||
75 | <height>20</height> | ||
76 | </size> | ||
77 | </property> | 152 | </property> |
78 | </spacer> | 153 | </widget> |
79 | <spacer row="5" column="0" > | 154 | </vbox> |
155 | </widget> | ||
156 | <spacer> | ||
157 | <property> | ||
158 | <name>name</name> | ||
159 | <cstring>Spacer5</cstring> | ||
160 | </property> | ||
161 | <property stdset="1"> | ||
162 | <name>orientation</name> | ||
163 | <enum>Vertical</enum> | ||
164 | </property> | ||
165 | <property stdset="1"> | ||
166 | <name>sizeType</name> | ||
167 | <enum>Expanding</enum> | ||
168 | </property> | ||
169 | <property> | ||
170 | <name>sizeHint</name> | ||
171 | <size> | ||
172 | <width>20</width> | ||
173 | <height>20</height> | ||
174 | </size> | ||
175 | </property> | ||
176 | </spacer> | ||
177 | <widget> | ||
178 | <class>QLayoutWidget</class> | ||
179 | <property stdset="1"> | ||
180 | <name>name</name> | ||
181 | <cstring>Layout7</cstring> | ||
182 | </property> | ||
183 | <hbox> | ||
184 | <property stdset="1"> | ||
185 | <name>margin</name> | ||
186 | <number>0</number> | ||
187 | </property> | ||
188 | <property stdset="1"> | ||
189 | <name>spacing</name> | ||
190 | <number>6</number> | ||
191 | </property> | ||
192 | <spacer> | ||
80 | <property> | 193 | <property> |
81 | <name>name</name> | 194 | <name>name</name> |
82 | <cstring>Spacer1</cstring> | 195 | <cstring>Spacer1</cstring> |
83 | </property> | 196 | </property> |
84 | <property stdset="1"> | 197 | <property stdset="1"> |
85 | <name>orientation</name> | 198 | <name>orientation</name> |
@@ -94,95 +207,58 @@ | |||
94 | <size> | 207 | <size> |
95 | <width>30</width> | 208 | <width>30</width> |
96 | <height>20</height> | 209 | <height>20</height> |
97 | </size> | 210 | </size> |
98 | </property> | 211 | </property> |
99 | </spacer> | 212 | </spacer> |
100 | <spacer row="3" column="3" > | 213 | <widget> |
101 | <property> | ||
102 | <name>name</name> | ||
103 | <cstring>Spacer4</cstring> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>orientation</name> | ||
107 | <enum>Horizontal</enum> | ||
108 | </property> | ||
109 | <property stdset="1"> | ||
110 | <name>sizeType</name> | ||
111 | <enum>Fixed</enum> | ||
112 | </property> | ||
113 | <property> | ||
114 | <name>sizeHint</name> | ||
115 | <size> | ||
116 | <width>21</width> | ||
117 | <height>20</height> | ||
118 | </size> | ||
119 | </property> | ||
120 | </spacer> | ||
121 | <widget row="0" column="0" rowspan="1" colspan="5" > | ||
122 | <class>QLabel</class> | ||
123 | <property stdset="1"> | ||
124 | <name>name</name> | ||
125 | <cstring>txtStatus</cstring> | ||
126 | </property> | ||
127 | <property stdset="1"> | ||
128 | <name>text</name> | ||
129 | <string></string> | ||
130 | </property> | ||
131 | <property stdset="1"> | ||
132 | <name>textFormat</name> | ||
133 | <enum>RichText</enum> | ||
134 | </property> | ||
135 | </widget> | ||
136 | <widget row="2" column="0" rowspan="1" colspan="5" > | ||
137 | <class>QLabel</class> | ||
138 | <property stdset="1"> | ||
139 | <name>name</name> | ||
140 | <cstring>TextLabel3</cstring> | ||
141 | </property> | ||
142 | <property stdset="1"> | ||
143 | <name>text</name> | ||
144 | <string>Please enter PIN:</string> | ||
145 | </property> | ||
146 | </widget> | ||
147 | <widget row="5" column="1" > | ||
148 | <class>QPushButton</class> | 214 | <class>QPushButton</class> |
149 | <property stdset="1"> | 215 | <property stdset="1"> |
150 | <name>name</name> | 216 | <name>name</name> |
151 | <cstring>PushButton1</cstring> | 217 | <cstring>PushButton1</cstring> |
152 | </property> | 218 | </property> |
153 | <property stdset="1"> | 219 | <property stdset="1"> |
154 | <name>text</name> | 220 | <name>text</name> |
155 | <string>&Ok</string> | 221 | <string>&Ok</string> |
156 | </property> | 222 | </property> |
157 | </widget> | 223 | </widget> |
158 | <widget row="5" column="2" rowspan="1" colspan="2" > | 224 | <widget> |
159 | <class>QPushButton</class> | 225 | <class>QPushButton</class> |
160 | <property stdset="1"> | 226 | <property stdset="1"> |
161 | <name>name</name> | 227 | <name>name</name> |
162 | <cstring>PushButton2</cstring> | 228 | <cstring>PushButton2</cstring> |
163 | </property> | 229 | </property> |
164 | <property stdset="1"> | 230 | <property stdset="1"> |
165 | <name>text</name> | 231 | <name>text</name> |
166 | <string>&Cancel</string> | 232 | <string>&Cancel</string> |
167 | </property> | 233 | </property> |
168 | </widget> | 234 | </widget> |
169 | <widget row="4" column="0" rowspan="1" colspan="5" > | 235 | <spacer> |
170 | <class>QCheckBox</class> | 236 | <property> |
171 | <property stdset="1"> | ||
172 | <name>name</name> | 237 | <name>name</name> |
173 | <cstring>ckbPin</cstring> | 238 | <cstring>Spacer2</cstring> |
174 | </property> | 239 | </property> |
175 | <property stdset="1"> | 240 | <property stdset="1"> |
176 | <name>text</name> | 241 | <name>orientation</name> |
177 | <string>Save pin</string> | 242 | <enum>Horizontal</enum> |
178 | </property> | 243 | </property> |
179 | </widget> | 244 | <property stdset="1"> |
180 | </grid> | 245 | <name>sizeType</name> |
246 | <enum>Fixed</enum> | ||
247 | </property> | ||
248 | <property> | ||
249 | <name>sizeHint</name> | ||
250 | <size> | ||
251 | <width>16</width> | ||
252 | <height>20</height> | ||
253 | </size> | ||
254 | </property> | ||
255 | </spacer> | ||
256 | </hbox> | ||
181 | </widget> | 257 | </widget> |
182 | </grid> | 258 | </vbox> |
183 | </widget> | 259 | </widget> |
184 | <connections> | 260 | <connections> |
185 | <connection> | 261 | <connection> |
186 | <sender>PushButton1</sender> | 262 | <sender>PushButton1</sender> |
187 | <signal>clicked()</signal> | 263 | <signal>clicked()</signal> |
188 | <receiver>Form1</receiver> | 264 | <receiver>Form1</receiver> |
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 935c11a..54808fa 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -147,13 +147,13 @@ void BlueBase::writeConfig() { | |||
147 | * Modify the hcid.conf file to our needs | 147 | * Modify the hcid.conf file to our needs |
148 | */ | 148 | */ |
149 | void BlueBase::writeToHciConfig() { | 149 | void BlueBase::writeToHciConfig() { |
150 | qWarning("writeToHciConfig"); | 150 | qWarning("writeToHciConfig"); |
151 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 151 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
152 | hciconf.load(); | 152 | hciconf.load(); |
153 | hciconf.setPinHelper( "/bin/QtPalmtop/bin/blue-pin" ); | 153 | hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); |
154 | hciconf.setName( m_deviceName ); | 154 | hciconf.setName( m_deviceName ); |
155 | hciconf.setEncrypt( m_useEncryption ); | 155 | hciconf.setEncrypt( m_useEncryption ); |
156 | hciconf.setAuth( m_enableAuthentification ); | 156 | hciconf.setAuth( m_enableAuthentification ); |
157 | hciconf.setPscan( m_enablePagescan ); | 157 | hciconf.setPscan( m_enablePagescan ); |
158 | hciconf.setIscan( m_enableInquiryscan ); | 158 | hciconf.setIscan( m_enableInquiryscan ); |
159 | hciconf.save(); | 159 | hciconf.save(); |