summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/transferdialog.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/transferdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/transferdialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/opie-console/transferdialog.cpp b/noncore/apps/opie-console/transferdialog.cpp
index f89723c..75c4c72 100644
--- a/noncore/apps/opie-console/transferdialog.cpp
+++ b/noncore/apps/opie-console/transferdialog.cpp
@@ -4,33 +4,33 @@
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qpushbutton.h> 5#include <qpushbutton.h>
6#include <qmessagebox.h> 6#include <qmessagebox.h>
7#include <qprogressbar.h> 7#include <qprogressbar.h>
8#include <qradiobutton.h> 8#include <qradiobutton.h>
9#include <qbuttongroup.h> 9#include <qbuttongroup.h>
10 10
11#include <opie/ofiledialog.h> 11#include <opie/ofiledialog.h>
12 12
13#include "file_layer.h" 13#include "file_layer.h"
14#include "receive_layer.h" 14#include "receive_layer.h"
15#include "metafactory.h" 15#include "metafactory.h"
16#include "mainwindow.h" 16#include "mainwindow.h"
17 17
18#include "transferdialog.h" 18#include "transferdialog.h"
19 19
20TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *name) 20TransferDialog::TransferDialog(QWidget *parent, MainWindow *mainwindow, const char *)
21: QDialog(parent, 0l, true), m_win(mainwindow) 21: QDialog(parent, 0l, true), m_win(mainwindow)
22{ 22{
23 m_lay = 0l; 23 m_lay = 0l;
24 m_recvlay = 0l; 24 m_recvlay = 0l;
25 QVBoxLayout *vbox, *vbox2; 25 QVBoxLayout *vbox, *vbox2;
26 QHBoxLayout *hbox, *hbox2, *hbox3; 26 QHBoxLayout *hbox, *hbox2, *hbox3;
27 QLabel *file, *mode, *progress, *status; 27 QLabel *file, *mode, *progress, *status;
28 QButtonGroup *group; 28 QButtonGroup *group;
29 QRadioButton *mode_send, *mode_receive; 29 QRadioButton *mode_send, *mode_receive;
30 30
31 m_autocleanup = 0; 31 m_autocleanup = 0;
32 32
33 group = new QButtonGroup(QObject::tr("Transfer mode"), this); 33 group = new QButtonGroup(QObject::tr("Transfer mode"), this);
34 mode_send = new QRadioButton(QObject::tr("Send"), group); 34 mode_send = new QRadioButton(QObject::tr("Send"), group);
35 mode_receive = new QRadioButton(QObject::tr("Receive"), group); 35 mode_receive = new QRadioButton(QObject::tr("Receive"), group);
36 group->insert(mode_send, id_send); 36 group->insert(mode_send, id_send);
@@ -168,38 +168,38 @@ void TransferDialog::slotCancel()
168 { 168 {
169 cleanup(); 169 cleanup();
170 if(m_autocleanup) close(); 170 if(m_autocleanup) close();
171 else 171 else
172 { 172 {
173 QMessageBox::information(this, 173 QMessageBox::information(this,
174 QObject::tr("Cancelled"), 174 QObject::tr("Cancelled"),
175 QObject::tr("The file transfer has been cancelled.")); 175 QObject::tr("The file transfer has been cancelled."));
176 } 176 }
177 } 177 }
178 else 178 else
179 { 179 {
180 close(); 180 close();
181 } 181 }
182} 182}
183 183
184void TransferDialog::slotProgress(const QString& file, int progress, int speed, int hours, int minutes, int seconds) 184void TransferDialog::slotProgress(const QString& , int progress, int , int , int, int )
185{ 185{
186 progressbar->setProgress(progress); 186 progressbar->setProgress(progress);
187} 187}
188 188
189void TransferDialog::slotError(int error, const QString& message) 189void TransferDialog::slotError(int error, const QString& )
190{ 190{
191 statusbar->setText(QObject::tr("Ready")); 191 statusbar->setText(QObject::tr("Ready"));
192 192
193 switch(error) 193 switch(error)
194 { 194 {
195 case FileTransferLayer::NotSupported: 195 case FileTransferLayer::NotSupported:
196 QMessageBox::critical(this, 196 QMessageBox::critical(this,
197 QObject::tr("Error"), 197 QObject::tr("Error"),
198 QObject::tr("Operation not supported.")); 198 QObject::tr("Operation not supported."));
199 break; 199 break;
200 case FileTransferLayer::StartError: 200 case FileTransferLayer::StartError:
201 QMessageBox::critical(this, 201 QMessageBox::critical(this,
202 QObject::tr("Error"), 202 QObject::tr("Error"),
203 QObject::tr("Transfer could not be started.")); 203 QObject::tr("Transfer could not be started."));
204 break; 204 break;
205 case FileTransferLayer::NoError: 205 case FileTransferLayer::NoError:
@@ -225,33 +225,33 @@ void TransferDialog::slotError(int error, const QString& message)
225 break; 225 break;
226 } 226 }
227 227
228 m_autocleanup = 1; 228 m_autocleanup = 1;
229} 229}
230 230
231void TransferDialog::slotSent() 231void TransferDialog::slotSent()
232{ 232{
233 progressbar->setProgress(100); 233 progressbar->setProgress(100);
234 QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been sent.")); 234 QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been sent."));
235 ok->setEnabled(true); 235 ok->setEnabled(true);
236 progressbar->setProgress(0); 236 progressbar->setProgress(0);
237 statusbar->setText(QObject::tr("Ready")); 237 statusbar->setText(QObject::tr("Ready"));
238 m_autocleanup = 1; 238 m_autocleanup = 1;
239} 239}
240 240
241void TransferDialog::slotReceived(const QString& file) 241void TransferDialog::slotReceived(const QString& )
242{ 242{
243 progressbar->setProgress(100); 243 progressbar->setProgress(100);
244 QMessageBox::information(this, QObject::tr("Received"), QObject::tr("File has been received.")); 244 QMessageBox::information(this, QObject::tr("Received"), QObject::tr("File has been received."));
245 //QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been received as %1.").arg(file)); 245 //QMessageBox::information(this, QObject::tr("Sent"), QObject::tr("File has been received as %1.").arg(file));
246 ok->setEnabled(true); 246 ok->setEnabled(true);
247 progressbar->setProgress(0); 247 progressbar->setProgress(0);
248 statusbar->setText(QObject::tr("Ready")); 248 statusbar->setText(QObject::tr("Ready"));
249 m_autocleanup = 1; 249 m_autocleanup = 1;
250} 250}
251 251
252void TransferDialog::slotMode(int id) 252void TransferDialog::slotMode(int id)
253{ 253{
254 if(id == id_send) 254 if(id == id_send)
255 { 255 {
256 selector->setEnabled(true); 256 selector->setEnabled(true);
257 filename->setEnabled(true); 257 filename->setEnabled(true);