desarrollostretch
Last change
on this file since 5ce8751 was
1f4adec,
checked in by aosorio <aosorio@…>, 8 years ago
|
Agregado proyecto base, esto luego del dh_make -f
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | |
---|
3 | Copyright 2013 Adam Reichold |
---|
4 | |
---|
5 | This file is part of qpdfview. |
---|
6 | |
---|
7 | qpdfview is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 2 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | qpdfview is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with qpdfview. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef SIGNALHANDLER_H |
---|
23 | #define SIGNALHANDLER_H |
---|
24 | |
---|
25 | #include <QObject> |
---|
26 | |
---|
27 | class QSocketNotifier; |
---|
28 | |
---|
29 | namespace qpdfview |
---|
30 | { |
---|
31 | |
---|
32 | class SignalHandler : public QObject |
---|
33 | { |
---|
34 | Q_OBJECT |
---|
35 | |
---|
36 | public: |
---|
37 | static bool prepareSignals(); |
---|
38 | |
---|
39 | explicit SignalHandler(QObject* parent = 0); |
---|
40 | |
---|
41 | signals: |
---|
42 | void sigIntReceived(); |
---|
43 | void sigTermReceived(); |
---|
44 | |
---|
45 | private slots: |
---|
46 | void on_socketNotifier_activated(); |
---|
47 | |
---|
48 | private: |
---|
49 | Q_DISABLE_COPY(SignalHandler) |
---|
50 | |
---|
51 | static int s_sockets[2]; |
---|
52 | |
---|
53 | static void handleSignals(int sigNumber); |
---|
54 | |
---|
55 | QSocketNotifier* m_socketNotifier; |
---|
56 | |
---|
57 | }; |
---|
58 | |
---|
59 | } // qpdfview |
---|
60 | |
---|
61 | #endif // SIGNALHANDLER_H |
---|
Note: See
TracBrowser
for help on using the repository browser.