source: terepaima/terepaima-0.4.16/sources/signalhandler.h

desarrollostretch
Last change on this file 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
3Copyright 2013 Adam Reichold
4
5This file is part of qpdfview.
6
7qpdfview is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12qpdfview is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along 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
27class QSocketNotifier;
28
29namespace qpdfview
30{
31
32class SignalHandler : public QObject
33{
34    Q_OBJECT
35
36public:
37    static bool prepareSignals();
38
39    explicit SignalHandler(QObject* parent = 0);
40
41signals:
42    void sigIntReceived();
43    void sigTermReceived();
44
45private slots:
46    void on_socketNotifier_activated();
47
48private:
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.