2
* Copyright (C) 2012 Canonical Ltd
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 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Charles Lindsay <chaz@yorba.org>
20
#ifndef DOCVIEWERAPPLICATION_H
21
#define DOCVIEWERAPPLICATION_H
23
#include <QApplication>
24
#include <QElapsedTimer>
28
class CommandLineParser;
30
class ContentCommunicator;
35
* \brief The DocViewerApplication class
37
class DocViewerApplication : public QApplication
40
Q_PROPERTY(bool desktopMode READ isDesktopMode CONSTANT)
41
Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
42
Q_PROPERTY(QString documentFile READ getDocumentFile WRITE setDocumentFile NOTIFY documentFileChanged)
43
Q_PROPERTY(QString documentsDir READ getDocumentsDir CONSTANT)
46
explicit DocViewerApplication(int& argc, char** argv);
47
virtual ~DocViewerApplication();
52
bool isDesktopMode() const;
53
bool isFullScreen() const;
54
const QString &getDocumentFile() const;
55
const QString &getDocumentsDir() const;
57
Q_INVOKABLE void parseUri(const QString &arg);
58
Q_INVOKABLE void releaseResources();
61
void fullScreenChanged();
62
void documentFileChanged();
65
void setFullScreen(bool fullScreen);
66
void setDocumentFile(const QString &documentFile);
73
CommandLineParser* m_cmdLineParser;
74
UrlHandler *m_urlHandler;
76
QString m_documentFile;
77
bool m_documentLoaded;
80
#endif // DOCVIEWERAPPLICATION_H