1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/examples/exquisite/mainwindow.h

43 lines
752 B
C
Raw Normal View History

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
2017-10-20 20:52:19 +08:00
#include <QMainWindow>
2017-10-20 20:52:19 +08:00
#include <QTimer>
2017-12-27 20:32:58 +08:00
namespace Ui {
class MainWindow;
2017-10-20 20:52:19 +08:00
}
class MainWindow : public QMainWindow
2017-10-20 20:52:19 +08:00
{
Q_OBJECT
public:
explicit MainWindow(QWidget* parent = 0);
~MainWindow();
2017-10-20 20:52:19 +08:00
private slots:
2017-10-22 10:50:59 +08:00
void setValue(int);
2017-10-20 20:52:19 +08:00
void setValue();
void setValueDown();
private:
QTimer* m_timer ;
2017-10-20 23:29:42 +08:00
QTimer* m_timer_down ;
2017-10-20 20:52:19 +08:00
int value;
2017-10-20 23:29:42 +08:00
int curmaxValue;
2017-10-20 20:52:19 +08:00
// QWidget interface
protected:
2017-10-22 10:50:59 +08:00
virtual void keyPressEvent(QKeyEvent* event) override;
virtual void keyReleaseEvent(QKeyEvent* event) override;
2017-10-20 23:29:42 +08:00
// QObject interface
public:
2017-10-22 10:50:59 +08:00
virtual bool eventFilter(QObject* watched, QEvent* event) override;
private:
Ui::MainWindow* ui;
2017-10-20 20:52:19 +08:00
};
#endif // MAINWINDOW_H