1 /* This file is part of the KDE project
3 Copyright (C) 2005 Dario Massarin <nekkar@libero.it>
4 Copyright (C) 2007 by Javier Goday <jgoday@gmail.com>
5 Copyright (C) 2008 by Lukas Appelhans <l.appelhans@gmx.de>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
13 #ifndef NEW_TRANSFER_DIALOG_H
14 #define NEW_TRANSFER_DIALOG_H
19 #include "ui_newtransferwidget.h"
22 * Dialog to allow add one or more transfers to kget.
23 * If only one transfer is added then the dialog shows a KUrlRequester.
24 * If a list of transfers are added then the dialog shows a KListWidget (multiple = true)
25 * with the transfers as checkable items.
26 * Also display a KUrlComboRequester for the destination file (or folder if multiple = true)
27 * And a QComboBox with the groups of transfer in case there are more than one
29 * This class is a singleton, only one instance is allowed.
30 * If a source is added and the dialog is already showed,
31 * the dialog becomes multiple and shows the KListWidget
32 * adding the new transfer to the list of previous ones.
34 class NewTransferDialog
: public KDialog
, Ui::NewTransferWidget
38 NewTransferDialog(QWidget
*parent
= 0);
42 * Returns the current instance of the 'new transfer' dialog
44 static NewTransferDialog
*instance(QWidget
*parent
= 0);
47 * Shows the dialog adding one transfer url.
48 * If the dialog is already displayed,
49 * then add the url to the others or other transfer,
50 * and displayed the sources as a listWidget (multiple = true)
52 void showDialog(const QString
&srcUrl
= QString());
55 * Shows the dialog adding one url list transfers
57 void showDialog(const KUrl::List
&list
);
61 * Called when the transfer group or the urlREquester changed, the dialog sets the default destination
62 * for transfers in the new group
64 void setDefaultDestination();
71 NewTransferDialog::Private
*d
;