miniupnpd 1.9 (20160113)
[tomato.git] / release / src / router / transmission / qt / make-dialog.h
blob425981346d2b602d8a5693cb93638fce6616dbb8
1 /*
2 * This file Copyright (C) 2009-2014 Mnemosyne LLC
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
7 * $Id: make-dialog.h 14241 2014-01-21 03:10:30Z jordan $
8 */
10 #ifndef MAKE_DIALOG_H
11 #define MAKE_DIALOG_H
13 #include <QDialog>
14 #include <QTimer>
16 class QAbstractButton;
17 class QPlainTextEdit;
18 class QLineEdit;
19 class QCheckBox;
20 class QLabel;
21 class QPushButton;
22 class QRadioButton;
23 class Session;
24 class QProgressBar;
25 class QDialogButtonBox;
27 extern "C"
29 struct tr_metainfo_builder;
32 class MakeDialog: public QDialog
34 Q_OBJECT
36 private slots:
37 void onSourceChanged ();
38 void onButtonBoxClicked (QAbstractButton*);
39 void onNewButtonBoxClicked (QAbstractButton*);
40 void onNewDialogDestroyed (QObject*);
41 void onProgress ();
43 void onFolderClicked ();
44 void onFolderSelected (const QString&);
45 void onFolderSelected (const QStringList&);
47 void onFileClicked ();
48 void onFileSelected (const QString&);
49 void onFileSelected (const QStringList&);
51 void onDestinationClicked ();
52 void onDestinationSelected (const QString&);
53 void onDestinationSelected (const QStringList&);
55 private:
56 void makeTorrent ();
57 QString getSource () const;
58 void enableBuddyWhenChecked (QCheckBox *, QWidget *);
59 void enableBuddyWhenChecked (QRadioButton *, QWidget *);
61 private:
62 Session& mySession;
63 QString myDestination;
64 QString myTarget;
65 QString myFile;
66 QString myFolder;
67 QTimer myTimer;
68 QRadioButton * myFolderRadio;
69 QRadioButton * myFileRadio;
70 QPushButton * myDestinationButton;
71 QPushButton * myFileButton;
72 QPushButton * myFolderButton;
73 QPlainTextEdit * myTrackerEdit;
74 QCheckBox * myCommentCheck;
75 QLineEdit * myCommentEdit;
76 QCheckBox * myPrivateCheck;
77 QLabel * mySourceLabel;
78 QDialogButtonBox * myButtonBox;
79 QProgressBar * myNewProgress;
80 QLabel * myNewLabel;
81 QDialogButtonBox * myNewButtonBox;
82 QDialog * myNewDialog;
83 struct tr_metainfo_builder * myBuilder;
85 protected:
86 virtual void dragEnterEvent (QDragEnterEvent *);
87 virtual void dropEvent (QDropEvent *);
89 public:
90 MakeDialog (Session&, QWidget * parent = 0);
91 ~MakeDialog ();
94 #endif