Revert "transmission: update from 2.13 to 2.22"
[tomato.git] / release / src / router / transmission / qt / app.h
blob63dc3e98fd00f1d5bb8f1e0a2f93b567756455c6
1 /*
2 * This file Copyright (C) Mnemosyne LLC
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2
6 * as published by the Free Software Foundation.
8 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10 * $Id: app.h 11437 2010-11-25 03:00:25Z charles $
13 #ifndef QTR_APP_H
14 #define QTR_APP_H
16 #include <QApplication>
17 #include <QSet>
18 #include <QTimer>
19 #include <QTranslator>
21 #include "favicon.h"
23 class AddData;
24 class Prefs;
25 class Session;
26 class TorrentModel;
27 class TrMainWindow;
28 class WatchDir;
30 class MyApp: public QApplication
32 Q_OBJECT
34 public:
35 MyApp( int& argc, char ** argv );
36 virtual ~MyApp( );
38 public:
39 void raise( );
40 bool notify( const QString& title, const QString& body ) const;
42 public:
43 Favicons favicons;
45 private:
46 Prefs * myPrefs;
47 Session * mySession;
48 TorrentModel * myModel;
49 TrMainWindow * myWindow;
50 WatchDir * myWatchDir;
51 QTimer myModelTimer;
52 QTimer myStatsTimer;
53 QTimer mySessionTimer;
54 time_t myLastFullUpdateTime;
55 QTranslator qtTranslator;
56 QTranslator appTranslator;
58 private slots:
59 void consentGiven( );
60 void onSessionSourceChanged( );
61 void refreshPref( int key );
62 void refreshTorrents( );
63 void onTorrentsAdded( QSet<int> );
64 void onNewTorrentChanged( int );
66 public slots:
67 void addTorrent( const QString& );
68 void addTorrent( const AddData& );
70 private:
71 void maybeUpdateBlocklist( );
74 #endif