CuteLogger
Fast and simple logging solution for Qt based applications
frameratewidget.h
1 /*
2  * Copyright (c) 2020 Meltytech, LLC
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef FRAMERATEWIDGET_H
19 #define FRAMERATEWIDGET_H
20 
21 #include <QWidget>
22 
23 class QDoubleSpinBox;
24 class QComboBox;
25 
26 class FrameRateWidget : public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  explicit FrameRateWidget(QWidget* parent = nullptr);
32  double fps();
33 
34 public slots:
35  void setFps(double);
36 
37 signals:
38  void fpsChanged(double);
39 
40 private slots:
41  void on_fpsSpinner_editingFinished();
42  void on_fpsComboBox_activated(const QString &arg1);
43 
44 private:
45  QDoubleSpinBox* m_fpsSpinner;
46  QComboBox* m_fpsComboBox;
47  double m_fps;
48 };
49 
50 #endif // FRAMERATEWIDGET_H