pulsatingscience.h 3.22 KB
Newer Older
Oliver Bock's avatar
Oliver Bock committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/******************************************************************************
 *   Copyright (C) 2008 by Oliver Bock                                        *
 *   oliver.bock[AT]aei.mpg.de                                                *
 *                                                                            *
 *   This file is part of PulsatingScience.                                   *
 *                                                                            *
 *   PulsatingScience is free software: you can redistribute it and/or modify *
 *   it under the terms of the GNU General Public License as published        *
 *   by the Free Software Foundation, version 3 of the License.               *
 *                                                                            *
 *   PulsatingScience is distributed in the hope that it will be useful,      *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the             *
 *   GNU General Public License for more details.                             *
 *                                                                            *
 *   You should have received a copy of the GNU General Public License        *
 *   along with PulsatingScience. If not, see <http://www.gnu.org/licenses/>. *
 *                                                                            *
 ******************************************************************************/

#ifndef PULSATINGSCIENCE_H
#define PULSATINGSCIENCE_H

Oliver Bock's avatar
Oliver Bock committed
24
25
26
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QShortcut>
Oliver Bock's avatar
Oliver Bock committed
27
28
#include <QDesktopServices>
#include <QUrl>
Oliver Bock's avatar
Oliver Bock committed
29

Oliver Bock's avatar
Oliver Bock committed
30
31
#include "ui_pulsatingscience.h"

Oliver Bock's avatar
Oliver Bock committed
32

Oliver Bock's avatar
Oliver Bock committed
33
34
35
36
37
38
39
40
class PulsatingScience : public QMainWindow
{
    Q_OBJECT

public:
    PulsatingScience(QWidget *parent = 0);
    ~PulsatingScience();

Oliver Bock's avatar
Oliver Bock committed
41
42
    void closeEvent(QCloseEvent *event);

43
public slots:
44
45
46
    void on_sliderLHOAngle_valueChanged(int value);
    void on_sliderLLOAngle_valueChanged(int value);
    void on_sliderVirgoAngle_valueChanged(int value);
Oliver Bock's avatar
Oliver Bock committed
47
    void on_sliderSourceIota_valueChanged(int value);
48
    void on_sliderSourceInclination_valueChanged(int value);
49

50
    void on_actionReset_triggered();
51
52
53
54
55
56
57
58
59
60
61
    void fullscreenToggled();
    void on_actionFullscreen_toggled(bool checked);
    void menuBarToggled();
    void on_actionMenu_bar_toggled(bool checked);
    void on_actionStatus_bar_toggled(bool checked);
    void on_dockAnimControl_visibilityChanged(bool visible);
    void on_dockAnimControl_topLevelChanged(bool topLevel);

    void on_actionAbout_triggered();

    void toggleHiddenDemoMode();
Oliver Bock's avatar
Oliver Bock committed
62

63
64
    void userInactivityCallback();

65
66
    void updateAmplitudes(const PlotData& data);

67
68
69
protected:
    bool eventFilter(QObject *obj, QEvent *event);

Oliver Bock's avatar
Oliver Bock committed
70
private:
71
72
73
    void userActivity();
    void saveOrRestoreInitialAnimationSettings();

Oliver Bock's avatar
Oliver Bock committed
74
    Ui::PulsatingScienceClass ui;
75
76
77

    QShortcut *m_menuBarShortcut;
    QShortcut *m_fullscreenShortcut;
78
    QShortcut *m_fullscreenESCShortcut;
Oliver Bock's avatar
Oliver Bock committed
79
    QShortcut *m_hiddenShortcut;
80
81

    bool m_menuBarVisible;
82
83
84
85
    bool m_statusBarVisible;
    bool m_animControlVisible;
    bool m_animControlFloating;
    bool m_hiddenDemoModeActivated;
86
87

    QTimer *m_inactivityTimer;
Oliver Bock's avatar
Oliver Bock committed
88
89
90
};

#endif // PULSATINGSCIENCE_H