-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.cpp | 0 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexftpdialog.cpp | 47 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexftpdialog.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexftpdialogbase.ui | 225 |
4 files changed, 130 insertions, 144 deletions
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index d3fdd14..8d7b593 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp | |||
diff --git a/noncore/net/opietooth/manager/obexftpdialog.cpp b/noncore/net/opietooth/manager/obexftpdialog.cpp index 80a81b4..f479ca2 100644 --- a/noncore/net/opietooth/manager/obexftpdialog.cpp +++ b/noncore/net/opietooth/manager/obexftpdialog.cpp | |||
@@ -21,2 +21,3 @@ | |||
21 | #include <qmultilineedit.h> | 21 | #include <qmultilineedit.h> |
22 | #include <qlineedit.h> | ||
22 | #include <qspinbox.h> | 23 | #include <qspinbox.h> |
@@ -28,2 +29,5 @@ | |||
28 | #include <errno.h> | 29 | #include <errno.h> |
30 | #include <qfile.h> | ||
31 | #include <qtextstream.h> | ||
32 | #include <qstringlist.h> | ||
29 | #include "obexftpdialog.h" | 33 | #include "obexftpdialog.h" |
@@ -36,2 +40,3 @@ | |||
36 | #include <opie2/ofileselector.h> | 40 | #include <opie2/ofileselector.h> |
41 | #include <opie2/ofiledialog.h> | ||
37 | 42 | ||
@@ -90,2 +95,8 @@ ObexFtpDialog::ObexFtpDialog(const QString& device, int port, | |||
90 | SLOT(updateDir(const QString&))); | 95 | SLOT(updateDir(const QString&))); |
96 | connect(saveButton, | ||
97 | SIGNAL(clicked()), | ||
98 | SLOT(slotSaveLog())); | ||
99 | connect(browseButton, | ||
100 | SIGNAL(clicked()), | ||
101 | SLOT(slotBrowseLog())); | ||
91 | } | 102 | } |
@@ -138,3 +149,3 @@ void ObexFtpDialog::slotBrowse() | |||
138 | if (!cli_connect_uuid(use_uuid, len)) { | 149 | if (!cli_connect_uuid(use_uuid, len)) { |
139 | log("Connection failed"); | 150 | log(tr("Connection failed: ") + tr(strerror(errno))); |
140 | errBox("Connection failed"); | 151 | errBox("Connection failed"); |
@@ -227,3 +238,3 @@ void ObexFtpDialog::slotCd(QListViewItem* item) | |||
227 | if (obexftp_setpath(client, curdir, 0) < 0) | 238 | if (obexftp_setpath(client, curdir, 0) < 0) |
228 | log("CD failed"); | 239 | log(tr("CD failed: ") + tr(strerror(errno))); |
229 | slotBrowse(); | 240 | slotBrowse(); |
@@ -266,3 +277,3 @@ void ObexFtpDialog::getFile() | |||
266 | if (result < 0) { | 277 | if (result < 0) { |
267 | log(file2get + QString(" receive ERROR")); | 278 | log(file2get + QString(" receive ERROR: ") + tr(strerror(errno))); |
268 | errBox(file2get + QString(" receive ERROR")); | 279 | errBox(file2get + QString(" receive ERROR")); |
@@ -316,3 +327,3 @@ void ObexFtpDialog::putFile() | |||
316 | if (result < 0) { | 327 | if (result < 0) { |
317 | log(local + QString(" send ERROR")); | 328 | log(local + QString(" send ERROR: ") + tr(strerror(errno))); |
318 | errBox(local + QString(" send ERROR")); | 329 | errBox(local + QString(" send ERROR")); |
@@ -405,2 +416,30 @@ void ObexFtpDialog::updateDir(const QString& newdir) | |||
405 | 416 | ||
417 | /** | ||
418 | * Save Log to the specified file | ||
419 | */ | ||
420 | void ObexFtpDialog::slotSaveLog() | ||
421 | { | ||
422 | QFile logFile(saveLogEdit->text()); | ||
423 | if (!logFile.open(IO_WriteOnly)) { | ||
424 | errBox(tr("Unable to open file ") + saveLogEdit->text() + tr(" ") + | ||
425 | tr(strerror(errno))); | ||
426 | return; | ||
427 | } | ||
428 | QTextStream stream(&logFile); | ||
429 | stream << browseLog->text() << endl; | ||
430 | QMessageBox::information(this, tr("Saving"), | ||
431 | tr("Log file saved to ") + saveLogEdit->text()); | ||
432 | } | ||
433 | |||
434 | void ObexFtpDialog::slotBrowseLog() | ||
435 | { | ||
436 | MimeTypes types; | ||
437 | QStringList all; | ||
438 | all << "*/*"; | ||
439 | types.insert("All Files", all ); | ||
440 | |||
441 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); | ||
442 | saveLogEdit->setText(str); | ||
443 | } | ||
444 | |||
406 | /* | 445 | /* |
diff --git a/noncore/net/opietooth/manager/obexftpdialog.h b/noncore/net/opietooth/manager/obexftpdialog.h index 7000f61..81c8921 100644 --- a/noncore/net/opietooth/manager/obexftpdialog.h +++ b/noncore/net/opietooth/manager/obexftpdialog.h | |||
@@ -65,2 +65,4 @@ namespace OpieTooth { | |||
65 | void updateDir(const QString& newdir); | 65 | void updateDir(const QString& newdir); |
66 | void slotSaveLog(); | ||
67 | void slotBrowseLog(); | ||
66 | }; | 68 | }; |
diff --git a/noncore/net/opietooth/manager/obexftpdialogbase.ui b/noncore/net/opietooth/manager/obexftpdialogbase.ui index b372b9d..2447007 100644 --- a/noncore/net/opietooth/manager/obexftpdialogbase.ui +++ b/noncore/net/opietooth/manager/obexftpdialogbase.ui | |||
@@ -13,3 +13,3 @@ | |||
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>267</width> | 14 | <width>283</width> |
15 | <height>312</height> | 15 | <height>312</height> |
@@ -34,3 +34,3 @@ | |||
34 | </property> | 34 | </property> |
35 | <vbox> | 35 | <grid> |
36 | <property stdset="1"> | 36 | <property stdset="1"> |
@@ -43,3 +43,3 @@ | |||
43 | </property> | 43 | </property> |
44 | <widget> | 44 | <widget row="0" column="0" > |
45 | <class>QTabWidget</class> | 45 | <class>QTabWidget</class> |
@@ -65,17 +65,2 @@ | |||
65 | </attribute> | 65 | </attribute> |
66 | <vbox> | ||
67 | <property stdset="1"> | ||
68 | <name>margin</name> | ||
69 | <number>0</number> | ||
70 | </property> | ||
71 | <property stdset="1"> | ||
72 | <name>spacing</name> | ||
73 | <number>0</number> | ||
74 | </property> | ||
75 | <widget> | ||
76 | <class>QLayoutWidget</class> | ||
77 | <property stdset="1"> | ||
78 | <name>name</name> | ||
79 | <cstring>Layout13</cstring> | ||
80 | </property> | ||
81 | <grid> | 66 | <grid> |
@@ -87,40 +72,5 @@ | |||
87 | <name>spacing</name> | 72 | <name>spacing</name> |
88 | <number>6</number> | 73 | <number>0</number> |
89 | </property> | ||
90 | <widget row="0" column="0" > | ||
91 | <class>QListView</class> | ||
92 | <column> | ||
93 | <property> | ||
94 | <name>text</name> | ||
95 | <string>Name</string> | ||
96 | </property> | ||
97 | <property> | ||
98 | <name>clickable</name> | ||
99 | <bool>true</bool> | ||
100 | </property> | ||
101 | <property> | ||
102 | <name>resizeable</name> | ||
103 | <bool>true</bool> | ||
104 | </property> | ||
105 | </column> | ||
106 | <column> | ||
107 | <property> | ||
108 | <name>text</name> | ||
109 | <string>Size</string> | ||
110 | </property> | ||
111 | <property> | ||
112 | <name>clickable</name> | ||
113 | <bool>true</bool> | ||
114 | </property> | ||
115 | <property> | ||
116 | <name>resizeable</name> | ||
117 | <bool>true</bool> | ||
118 | </property> | ||
119 | </column> | ||
120 | <property stdset="1"> | ||
121 | <name>name</name> | ||
122 | <cstring>fileList</cstring> | ||
123 | </property> | 74 | </property> |
124 | </widget> | 75 | <widget row="1" column="0" rowspan="1" colspan="3" > |
125 | <widget row="1" column="0" > | ||
126 | <class>QProgressBar</class> | 76 | <class>QProgressBar</class> |
@@ -131,18 +81,14 @@ | |||
131 | </widget> | 81 | </widget> |
132 | <widget row="2" column="0" > | 82 | <widget row="3" column="0" rowspan="1" colspan="3" > |
133 | <class>QLayoutWidget</class> | 83 | <class>QLabel</class> |
134 | <property stdset="1"> | 84 | <property stdset="1"> |
135 | <name>name</name> | 85 | <name>name</name> |
136 | <cstring>Layout11</cstring> | 86 | <cstring>statusBar</cstring> |
137 | </property> | ||
138 | <hbox> | ||
139 | <property stdset="1"> | ||
140 | <name>margin</name> | ||
141 | <number>0</number> | ||
142 | </property> | 87 | </property> |
143 | <property stdset="1"> | 88 | <property stdset="1"> |
144 | <name>spacing</name> | 89 | <name>text</name> |
145 | <number>6</number> | 90 | <string></string> |
146 | </property> | 91 | </property> |
147 | <widget> | 92 | </widget> |
93 | <widget row="2" column="0" > | ||
148 | <class>QPushButton</class> | 94 | <class>QPushButton</class> |
@@ -157,3 +103,3 @@ | |||
157 | </widget> | 103 | </widget> |
158 | <widget> | 104 | <widget row="2" column="1" > |
159 | <class>QPushButton</class> | 105 | <class>QPushButton</class> |
@@ -168,3 +114,3 @@ | |||
168 | </widget> | 114 | </widget> |
169 | <widget> | 115 | <widget row="2" column="2" > |
170 | <class>QPushButton</class> | 116 | <class>QPushButton</class> |
@@ -179,13 +125,35 @@ | |||
179 | </widget> | 125 | </widget> |
180 | </hbox> | 126 | <widget row="0" column="0" rowspan="1" colspan="3" > |
181 | </widget> | 127 | <class>QListView</class> |
182 | <widget row="3" column="0" > | 128 | <column> |
183 | <class>QLabel</class> | 129 | <property> |
184 | <property stdset="1"> | 130 | <name>text</name> |
185 | <name>name</name> | 131 | <string>Name</string> |
186 | <cstring>statusBar</cstring> | ||
187 | </property> | 132 | </property> |
188 | <property stdset="1"> | 133 | <property> |
134 | <name>clickable</name> | ||
135 | <bool>true</bool> | ||
136 | </property> | ||
137 | <property> | ||
138 | <name>resizeable</name> | ||
139 | <bool>true</bool> | ||
140 | </property> | ||
141 | </column> | ||
142 | <column> | ||
143 | <property> | ||
189 | <name>text</name> | 144 | <name>text</name> |
190 | <string></string> | 145 | <string>Size</string> |
146 | </property> | ||
147 | <property> | ||
148 | <name>clickable</name> | ||
149 | <bool>true</bool> | ||
150 | </property> | ||
151 | <property> | ||
152 | <name>resizeable</name> | ||
153 | <bool>true</bool> | ||
154 | </property> | ||
155 | </column> | ||
156 | <property stdset="1"> | ||
157 | <name>name</name> | ||
158 | <cstring>fileList</cstring> | ||
191 | </property> | 159 | </property> |
@@ -194,4 +162,2 @@ | |||
194 | </widget> | 162 | </widget> |
195 | </vbox> | ||
196 | </widget> | ||
197 | <widget> | 163 | <widget> |
@@ -217,36 +183,6 @@ | |||
217 | </attribute> | 183 | </attribute> |
218 | <widget> | 184 | <grid> |
219 | <class>QLayoutWidget</class> | ||
220 | <property stdset="1"> | ||
221 | <name>name</name> | ||
222 | <cstring>Layout5</cstring> | ||
223 | </property> | ||
224 | <property stdset="1"> | ||
225 | <name>geometry</name> | ||
226 | <rect> | ||
227 | <x>45</x> | ||
228 | <y>5</y> | ||
229 | <width>162</width> | ||
230 | <height>63</height> | ||
231 | </rect> | ||
232 | </property> | ||
233 | <vbox> | ||
234 | <property stdset="1"> | ||
235 | <name>margin</name> | ||
236 | <number>0</number> | ||
237 | </property> | ||
238 | <property stdset="1"> | ||
239 | <name>spacing</name> | ||
240 | <number>6</number> | ||
241 | </property> | ||
242 | <widget> | ||
243 | <class>QLayoutWidget</class> | ||
244 | <property stdset="1"> | ||
245 | <name>name</name> | ||
246 | <cstring>Layout3</cstring> | ||
247 | </property> | ||
248 | <hbox> | ||
249 | <property stdset="1"> | 185 | <property stdset="1"> |
250 | <name>margin</name> | 186 | <name>margin</name> |
251 | <number>0</number> | 187 | <number>11</number> |
252 | </property> | 188 | </property> |
@@ -256,3 +192,3 @@ | |||
256 | </property> | 192 | </property> |
257 | <widget> | 193 | <widget row="0" column="0" > |
258 | <class>QLabel</class> | 194 | <class>QLabel</class> |
@@ -267,3 +203,3 @@ | |||
267 | </widget> | 203 | </widget> |
268 | <widget> | 204 | <widget row="0" column="1" rowspan="1" colspan="2" > |
269 | <class>QComboBox</class> | 205 | <class>QComboBox</class> |
@@ -286,20 +222,3 @@ | |||
286 | </widget> | 222 | </widget> |
287 | </hbox> | 223 | <widget row="1" column="0" rowspan="1" colspan="2" > |
288 | </widget> | ||
289 | <widget> | ||
290 | <class>QLayoutWidget</class> | ||
291 | <property stdset="1"> | ||
292 | <name>name</name> | ||
293 | <cstring>Layout4</cstring> | ||
294 | </property> | ||
295 | <hbox> | ||
296 | <property stdset="1"> | ||
297 | <name>margin</name> | ||
298 | <number>0</number> | ||
299 | </property> | ||
300 | <property stdset="1"> | ||
301 | <name>spacing</name> | ||
302 | <number>6</number> | ||
303 | </property> | ||
304 | <widget> | ||
305 | <class>QLabel</class> | 224 | <class>QLabel</class> |
@@ -314,3 +233,3 @@ | |||
314 | </widget> | 233 | </widget> |
315 | <widget> | 234 | <widget row="1" column="2" > |
316 | <class>QSpinBox</class> | 235 | <class>QSpinBox</class> |
@@ -325,6 +244,3 @@ | |||
325 | </widget> | 244 | </widget> |
326 | </hbox> | 245 | </grid> |
327 | </widget> | ||
328 | </vbox> | ||
329 | </widget> | ||
330 | </widget> | 246 | </widget> |
@@ -340,3 +256,3 @@ | |||
340 | </attribute> | 256 | </attribute> |
341 | <hbox> | 257 | <grid> |
342 | <property stdset="1"> | 258 | <property stdset="1"> |
@@ -349,3 +265,32 @@ | |||
349 | </property> | 265 | </property> |
350 | <widget> | 266 | <widget row="1" column="1" > |
267 | <class>QLineEdit</class> | ||
268 | <property stdset="1"> | ||
269 | <name>name</name> | ||
270 | <cstring>saveLogEdit</cstring> | ||
271 | </property> | ||
272 | </widget> | ||
273 | <widget row="1" column="2" > | ||
274 | <class>QPushButton</class> | ||
275 | <property stdset="1"> | ||
276 | <name>name</name> | ||
277 | <cstring>saveButton</cstring> | ||
278 | </property> | ||
279 | <property stdset="1"> | ||
280 | <name>text</name> | ||
281 | <string>save</string> | ||
282 | </property> | ||
283 | </widget> | ||
284 | <widget row="1" column="0" > | ||
285 | <class>QPushButton</class> | ||
286 | <property stdset="1"> | ||
287 | <name>name</name> | ||
288 | <cstring>browseButton</cstring> | ||
289 | </property> | ||
290 | <property stdset="1"> | ||
291 | <name>text</name> | ||
292 | <string>Save as:</string> | ||
293 | </property> | ||
294 | </widget> | ||
295 | <widget row="0" column="0" rowspan="1" colspan="3" > | ||
351 | <class>QMultiLineEdit</class> | 296 | <class>QMultiLineEdit</class> |
@@ -356,6 +301,6 @@ | |||
356 | </widget> | 301 | </widget> |
357 | </hbox> | 302 | </grid> |
358 | </widget> | 303 | </widget> |
359 | </widget> | 304 | </widget> |
360 | </vbox> | 305 | </grid> |
361 | </widget> | 306 | </widget> |