Updated Russian translation
[lxde/liblxqt.git] / lxqtapplication.h
CommitLineData
8966cbec 1/* BEGIN_COMMON_COPYRIGHT_HEADER
2 * (c)LGPL2+
3 *
b9223fe7 4 * LXQt - a lightweight, Qt based, desktop toolset
8966cbec 5 * http://razor-qt.org
6 *
7 * Copyright: 2012-2013 Razor team
8 * Authors:
9 * Petr Vanek <petr@scribus.info>
10 *
11 * This program or library is free software; you can redistribute it
12 * and/or modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20
21 * You should have received a copy of the GNU Lesser General
22 * Public License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301 USA
25 *
26 * END_COMMON_COPYRIGHT_HEADER */
27
077c1e76
AS
28#ifndef LXQTAPPLICATION_H
29#define LXQTAPPLICATION_H
8966cbec 30
371400de
AS
31#include <QApplication>
32#include <QProxyStyle>
f9cba1ba 33#include "lxqtglobals.h"
8966cbec 34
f05ba5af 35namespace LXQt
077c1e76
AS
36{
37
b9223fe7
HJYP
38/*! \brief LXQt wrapper around QApplication.
39 * It loads various LXQt related stuff by default (window icon, icon theme...)
8966cbec 40 *
b9223fe7 41 * \note This wrapper is intended to be used only inside LXQt project. Using it
8966cbec 42 * in external application will automatically require linking to various
b9223fe7 43 * LXQt libraries.
8966cbec 44 *
45 */
f9cba1ba 46class LXQT_API Application : public QApplication
8966cbec 47{
48 Q_OBJECT
49
50public:
b9223fe7 51 /*! Construct a LXQt application object.
8966cbec 52 * \param argc standard argc as in QApplication
53 * \param argv standard argv as in QApplication
8966cbec 54 */
077c1e76 55 Application(int &argc, char **argv);
70dd4459
PK
56 /*! Construct a LXQt application object.
57 * \param argc standard argc as in QApplication
58 * \param argv standard argv as in QApplication
59 * \param handleQuitSignals flag if signals SIGINT, SIGTERM, SIGHUP should be handled internaly (\sa quit() application)
60 */
61 Application(int &argc, char **argv, bool handleQuitSignals);
077c1e76 62 virtual ~Application() {}
70dd4459
PK
63 /*! Install UNIX signal handler for signals defined in \param signalList
64 * Upon receiving of any of this signals the \sa unixSignal signal is emitted
65 */
66 void listenToUnixSignals(QList<int> const & signolList);
63a934d5
AS
67
68private slots:
69 void updateTheme();
8966cbec 70
63a934d5
AS
71signals:
72 void themeChanged();
70dd4459
PK
73 /*! Signal is emitted upon receival of registered unix signal
74 * \param signo the received unix signal number
75 */
76 void unixSignal(int signo);
8966cbec 77};
78
077c1e76
AS
79#if defined(lxqtApp)
80#undef lxqtApp
63a934d5 81#endif
f05ba5af 82#define lxqtApp (static_cast<LXQt::Application *>(qApp))
63a934d5 83
f05ba5af 84} // namespace LXQt
077c1e76 85#endif // LXQTAPPLICATION_H