source: trunk/qt/app.h @ 14379

Last change on this file since 14379 was 14379, checked in by mikedld, 8 years ago

Fix various cppcheck comments for Qt client code

  • Property svn:keywords set to Date Rev Author Id
File size: 1.4 KB
Line 
1/*
2 * This file Copyright (C) 2009-2014 Mnemosyne LLC
3 *
4 * It may be used under the GNU GPL versions 2 or 3
5 * or any future license endorsed by Mnemosyne LLC.
6 *
7 * $Id: app.h 14379 2014-12-12 23:52:17Z mikedld $
8 */
9
10#ifndef QTR_APP_H
11#define QTR_APP_H
12
13#include <QApplication>
14#include <QSet>
15#include <QTimer>
16#include <QTranslator>
17
18#include "favicon.h"
19
20class AddData;
21class Prefs;
22class Session;
23class TorrentModel;
24class TrMainWindow;
25class WatchDir;
26
27class MyApp: public QApplication
28{
29    Q_OBJECT
30
31  public:
32    MyApp (int& argc, char ** argv);
33    virtual ~MyApp ();
34
35  public:
36    void raise ();
37    bool notifyApp (const QString& title, const QString& body) const;
38
39  public:
40    Favicons favicons;
41
42  private:
43    Prefs * myPrefs;
44    Session * mySession;
45    TorrentModel * myModel;
46    TrMainWindow * myWindow;
47    WatchDir * myWatchDir;
48    QTimer myModelTimer;
49    QTimer myStatsTimer;
50    QTimer mySessionTimer;
51    time_t myLastFullUpdateTime;
52    QTranslator qtTranslator;
53    QTranslator appTranslator;
54
55  private slots:
56    void consentGiven ();
57    void onSessionSourceChanged ();
58    void refreshPref (int key);
59    void refreshTorrents ();
60    void onTorrentsAdded (const QSet<int>& torrents);
61    void onTorrentCompleted (int);
62    void onNewTorrentChanged (int);
63
64  public slots:
65    void addTorrent (const QString&);
66    void addTorrent (const AddData&);
67
68  private:
69    void maybeUpdateBlocklist ();
70};
71
72#endif
Note: See TracBrowser for help on using the repository browser.