~ubuntu-branches/ubuntu/karmic/transmission/karmic-proposed

« back to all changes in this revision

Viewing changes to qt/.svn/text-base/make-dialog.h.svn-base

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2009-12-06 19:11:34 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20091206191134-t0ayk0mv6xuoyt0t
Tags: 1.75-0ubuntu2.1
* debian/patches/25_new_inhibition_api.diff:
  - Port Transmission to the new gnome-session inhibit API in order
    to make suspend/hibernate inhibiting work again on Karmic (LP: #457123)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
 
3
 *
 
4
 * This file is licensed by the GPL version 2.  Works owned by the
 
5
 * Transmission project are granted a special exemption to clause 2(b)
 
6
 * so that the bulk of its code can remain under the MIT license.
 
7
 * This exemption does not extend to derived works not owned by
 
8
 * the Transmission project.
 
9
 *
 
10
 * $Id$
 
11
 */
 
12
 
 
13
#ifndef MAKE_DIALOG_H
 
14
#define MAKE_DIALOG_H
 
15
 
 
16
#include <QDialog>
 
17
#include <QTimer>
 
18
 
 
19
struct QAbstractButton;
 
20
struct QPlainTextEdit;
 
21
struct QLineEdit;
 
22
struct QCheckBox;
 
23
struct QLabel;
 
24
struct QProgressBar;
 
25
struct QPushButton;
 
26
struct Session;
 
27
 
 
28
extern "C"
 
29
{
 
30
    struct tr_metainfo_builder;
 
31
}
 
32
 
 
33
class MakeDialog: public QDialog
 
34
{
 
35
        Q_OBJECT
 
36
 
 
37
    private slots:
 
38
        void onFolderButtonPressed( );
 
39
        void onFileButtonPressed( );
 
40
        void onFileSelectedInDialog( const QString& path );
 
41
        void onSourceChanged( );
 
42
        void onButtonBoxClicked( QAbstractButton* );
 
43
        void onProgress( );
 
44
        void refresh( );
 
45
 
 
46
    private:
 
47
        void makeTorrent( );
 
48
        void refreshButtons( );
 
49
        void setIsBuilding( bool );
 
50
        QString getResult( ) const;
 
51
 
 
52
 
 
53
    private:
 
54
        QTimer myTimer;
 
55
        QLineEdit * mySourceEdit;
 
56
        QLabel * mySourceLabel;
 
57
        QPlainTextEdit * myTrackerEdit;
 
58
        QLineEdit * myCommentEdit;
 
59
        QCheckBox * myPrivateCheck;
 
60
        QProgressBar * myProgressBar;
 
61
        QLabel * myProgressLabel;
 
62
        QPushButton * myMakeButton;
 
63
        QPushButton * myCloseButton;
 
64
        QPushButton * myStopButton;
 
65
        struct tr_metainfo_builder * myBuilder;
 
66
        bool myIsBuilding;
 
67
 
 
68
    public:
 
69
        MakeDialog( Session&, QWidget * parent = 0 );
 
70
        ~MakeDialog( );
 
71
};
 
72
 
 
73
#endif