Another TODO removed
This commit is contained in:
@@ -13,6 +13,7 @@ set(simulation_HDRS
|
||||
menuwidget.h
|
||||
xcursorwidget.h
|
||||
xmenuwidget.h
|
||||
myslider.h
|
||||
)
|
||||
|
||||
if(SDL_FOUND)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef MYSLIDER_H
|
||||
#define MYSLIDER_H
|
||||
|
||||
#include <QSlider>
|
||||
#include <QtGui>
|
||||
|
||||
class mySlider : public QSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit mySlider(QFrame * parent = 0):
|
||||
QSlider(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void mousePressEvent(QMouseEvent * event)
|
||||
{
|
||||
if (event->button() == Qt::RightButton && event->type() == QEvent::MouseButtonDblClick) {
|
||||
setValue(0);
|
||||
event->accept();
|
||||
}
|
||||
QSlider::mousePressEvent(event);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user