mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-09 05:27:57 +00:00
Work on SoundMacroEditor
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
#include <QSvgRenderer>
|
||||
#include <QMouseEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QApplication>
|
||||
#include <QScrollBar>
|
||||
|
||||
/* Used for generating transform matrices to map coordinate space */
|
||||
/* Used for generating transform matrices to map SVG coordinate space */
|
||||
static QTransform RectToRect(const QRectF& from, const QRectF& to)
|
||||
{
|
||||
QPolygonF orig(from);
|
||||
@@ -193,6 +195,15 @@ void KeyboardWidget::leaveEvent(QEvent* event)
|
||||
m_statusFocus->exit();
|
||||
}
|
||||
|
||||
void KeyboardWidget::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (QScrollArea* scroll = qobject_cast<QScrollArea*>(parentWidget()->parentWidget()))
|
||||
{
|
||||
/* Send wheel event directly to the scroll bar */
|
||||
QApplication::sendEvent(scroll->horizontalScrollBar(), event);
|
||||
}
|
||||
}
|
||||
|
||||
void KeyboardWidget::showEvent(QShowEvent* event)
|
||||
{
|
||||
if (QScrollArea* scroll = qobject_cast<QScrollArea*>(parentWidget()->parentWidget()))
|
||||
|
||||
Reference in New Issue
Block a user