Debian Codegraph @

src/djview.h

raw
1 //C- -*- C++ -*-
2 //C- -------------------------------------------------------------------
3 //C- DjView4
4 //C- Copyright (c) 2006- Leon Bottou
5 //C-
6 //C- This software is subject to, and may be distributed under, the
7 //C- GNU General Public License, either version 2 of the license,
8 //C- or (at your option) any later version. The license should have
9 //C- accompanied the software or you may obtain a copy of the license
10 //C- from the Free Software Foundation at http://www.fsf.org .
11 //C-
12 //C- This program is distributed in the hope that it will be useful,
13 //C- but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 //C- GNU General Public License for more details.
16 //C- ------------------------------------------------------------------
17
18 #ifndef DJVIEW_H
19 #define DJVIEW_H
20
21 #if AUTOCONF
22 # include "config.h"
23 #endif
24
25 #include <Qt>
26 #include <QObject>
27 #include <QApplication>
28 #include <QEvent>
29 #include <QPointer>
30 #include <QString>
31 #include <QStringList>
32
33 #include "qdjvu.h"
34
35 class QDjView;
36 class QTranslator;
37
38 class QDjViewApplication : public QApplication
39 {
40 Q_OBJECT
41 QDjVuContext context;
42 QPointer<QDjView> lastWindow;
43 QStringList translationLangs;
44 QStringList translationDirs;
45 public:
46 QDjViewApplication(int &argc, char **argv);
47 QDjVuContext *djvuContext() { return &context; }
48 QDjView *newWindow();
49 bool loadTranslators(QStringList langs, QTranslator *dt, QTranslator *qt);
50 protected:
51 bool event(QEvent *ev);
52 protected slots:
53 void saveSessionState(QSessionManager &sm);
54 private:
55 QStringList getTranslationLangs();
56 QStringList getTranslationDirs();
57 };
58
59
60 #endif
61
62
63 /* -------------------------------------------------------------
64 Local Variables:
65 c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" )
66 End:
67 ------------------------------------------------------------- */