1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00
transmission/qt/make-dialog.h

98 lines
2.3 KiB
C
Raw Normal View History

2009-04-09 18:55:47 +00:00
/*
* This file Copyright (C) Mnemosyne LLC
2009-04-09 18:55:47 +00:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
2009-04-09 18:55:47 +00:00
*
* $Id$
2009-04-09 18:55:47 +00:00
*/
#ifndef MAKE_DIALOG_H
#define MAKE_DIALOG_H
#include <QDialog>
#include <QTimer>
class QAbstractButton;
class QPlainTextEdit;
class QLineEdit;
class QCheckBox;
class QLabel;
class QPushButton;
class QRadioButton;
class Session;
class QProgressBar;
class QDialogButtonBox;
2009-04-09 18:55:47 +00:00
extern "C"
{
struct tr_metainfo_builder;
2009-04-09 18:55:47 +00:00
}
class MakeDialog: public QDialog
{
2013-09-14 22:45:04 +00:00
Q_OBJECT
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
private slots:
void onSourceChanged ();
void onButtonBoxClicked (QAbstractButton*);
void onNewButtonBoxClicked (QAbstractButton*);
void onNewDialogDestroyed (QObject*);
void onProgress ();
2013-09-14 22:45:04 +00:00
void onFolderClicked ();
void onFolderSelected (const QString&);
void onFolderSelected (const QStringList&);
2013-09-14 22:45:04 +00:00
void onFileClicked ();
void onFileSelected (const QString&);
void onFileSelected (const QStringList&);
2013-09-14 22:45:04 +00:00
void onDestinationClicked ();
void onDestinationSelected (const QString&);
void onDestinationSelected (const QStringList&);
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
private:
void makeTorrent ();
QString getSource () const;
void enableBuddyWhenChecked (QCheckBox *, QWidget *);
void enableBuddyWhenChecked (QRadioButton *, QWidget *);
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
private:
Session& mySession;
QString myDestination;
QString myTarget;
QString myFile;
QString myFolder;
QTimer myTimer;
QRadioButton * myFolderRadio;
QRadioButton * myFileRadio;
QPushButton * myDestinationButton;
QPushButton * myFileButton;
QPushButton * myFolderButton;
QPlainTextEdit * myTrackerEdit;
QCheckBox * myCommentCheck;
QLineEdit * myCommentEdit;
QCheckBox * myPrivateCheck;
QLabel * mySourceLabel;
QDialogButtonBox * myButtonBox;
QProgressBar * myNewProgress;
QLabel * myNewLabel;
QDialogButtonBox * myNewButtonBox;
QDialog * myNewDialog;
struct tr_metainfo_builder * myBuilder;
2009-04-09 18:55:47 +00:00
2013-09-14 22:45:04 +00:00
protected:
virtual void dragEnterEvent (QDragEnterEvent *);
virtual void dropEvent (QDropEvent *);
2013-09-14 22:45:04 +00:00
public:
MakeDialog (Session&, QWidget * parent = 0);
~MakeDialog ();
2009-04-09 18:55:47 +00:00
};
#endif