Showing Knob value on mouse over (#6835)
* Showing Knob value on mouse over * Correcting minors source code issues * Correcting double QTimer include * Removing blank lines * Removing space and add one * Update src/gui/widgets/SimpleTextFloat.cpp Co-authored-by: saker <sakertooth@gmail.com> * Correcting QTimer * Remove a parameter that has the default value --------- Co-authored-by: saker <sakertooth@gmail.com>
This commit is contained in:
@@ -144,6 +144,9 @@ protected:
|
||||
void wheelEvent( QWheelEvent * _me ) override;
|
||||
void changeEvent(QEvent * ev) override;
|
||||
|
||||
void enterEvent(QEvent *event) override;
|
||||
void leaveEvent(QEvent *event) override;
|
||||
|
||||
virtual float getValue( const QPoint & _p );
|
||||
|
||||
private slots:
|
||||
@@ -160,6 +163,7 @@ private:
|
||||
float _innerRadius = 1) const;
|
||||
|
||||
void drawKnob( QPainter * _p );
|
||||
void showTextFloat(int msecBeforeDisplay, int msecDisplayTime);
|
||||
void setPosition( const QPoint & _p );
|
||||
bool updateAngle();
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "lmms_export.h"
|
||||
|
||||
class QLabel;
|
||||
class QTimer;
|
||||
|
||||
namespace lmms::gui
|
||||
{
|
||||
@@ -44,6 +45,8 @@ public:
|
||||
|
||||
void setText(const QString & text);
|
||||
|
||||
void showWithDelay(int msecBeforeDisplay, int msecDisplayTime);
|
||||
|
||||
void setVisibilityTimeOut(int msecs);
|
||||
|
||||
void moveGlobal(QWidget * w, const QPoint & offset)
|
||||
@@ -51,11 +54,14 @@ public:
|
||||
move(w->mapToGlobal(QPoint(0, 0)) + offset);
|
||||
}
|
||||
|
||||
void hide();
|
||||
|
||||
private:
|
||||
QLabel * m_textLabel;
|
||||
QTimer * m_showTimer;
|
||||
QTimer * m_hideTimer;
|
||||
};
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user