2009-05-13 15:54:04 +00:00
|
|
|
/*
|
2010-01-04 21:00:47 +00:00
|
|
|
* This file Copyright (C) 2009-2010 Mnemosyne LLC
|
2009-05-13 15:54:04 +00:00
|
|
|
*
|
|
|
|
* This file is licensed by the GPL version 2. Works owned by the
|
|
|
|
* Transmission project are granted a special exemption to clause 2(b)
|
|
|
|
* so that the bulk of its code can remain under the MIT license.
|
|
|
|
* This exemption does not extend to derived works not owned by
|
|
|
|
* the Transmission project.
|
|
|
|
*
|
2009-05-31 19:33:48 +00:00
|
|
|
* $Id$
|
2009-05-13 15:54:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef RELOCATE_DIALOG_H
|
|
|
|
#define RELOCATE_DIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2009-05-13 19:16:31 +00:00
|
|
|
#include <QSet>
|
2009-05-13 15:54:04 +00:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class QPushButton;
|
|
|
|
class QRadioButton;
|
|
|
|
class Session;
|
2010-06-04 01:00:27 +00:00
|
|
|
class Torrent;
|
|
|
|
class TorrentModel;
|
2009-05-13 15:54:04 +00:00
|
|
|
|
|
|
|
class RelocateDialog: public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
2010-06-04 01:00:27 +00:00
|
|
|
QString myPath;
|
2009-05-13 15:54:04 +00:00
|
|
|
static bool myMoveFlag;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Session & mySession;
|
2010-06-04 01:00:27 +00:00
|
|
|
TorrentModel& myModel;
|
2009-05-13 19:16:31 +00:00
|
|
|
QSet<int> myIds;
|
2009-05-13 15:54:04 +00:00
|
|
|
QPushButton * myDirButton;
|
|
|
|
QRadioButton * myMoveRadio;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onFileSelected( const QString& path );
|
|
|
|
void onDirButtonClicked( );
|
|
|
|
void onSetLocation( );
|
|
|
|
void onMoveToggled( bool );
|
|
|
|
|
|
|
|
public:
|
2010-06-04 01:00:27 +00:00
|
|
|
RelocateDialog( Session&, TorrentModel&, const QSet<int>& ids, QWidget * parent = 0 );
|
2009-05-13 15:54:04 +00:00
|
|
|
~RelocateDialog( ) { }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|