23#ifndef AUTOMATION_PATH_VIEW_H
24#define AUTOMATION_PATH_VIEW_H
81 std::pair<const float, float>
locate(QMouseEvent *)
const;
AutomationPathView(QWidget *parent=nullptr)
float m_fTick
< Point that is being dragged
void pointMoved(float ox, float oy, float tx, float ty)
H2Core::AutomationPath * _path
bool checkBounds(QMouseEvent *event) const
Check if user clicked within area inside margins.
bool m_bPointAdded
< Whether any points are being dragged
void mouseReleaseEvent(QMouseEvent *event) override
Handler for releasing mouse button.
void pointAdded(float x, float y)
void updatePosition(float fTick)
void mouseMoveEvent(QMouseEvent *event) override
Handler for mouse moves.
void keyPressEvent(QKeyEvent *event) override
Handler for key presses.
void onPreferencesChanged(H2Core::Preferences::Changes changes)
int m_nMarginHeight
< Width of song grid cell size - in order to properly align AutomationPathView and SongEditor
void mousePressEvent(QMouseEvent *event) override
Handle mouse click.
void updateAutomationPath()
H2Core::AutomationPath * getAutomationPath() const noexcept
void pointRemoved(float x, float y)
QPoint translatePoint(float x, float y) const
Locate path point on a wdiget surface.
int getGridWidth() const noexcept
H2Core::AutomationPath::iterator _selectedPoint
< Original position of selected point
void paintEvent(QPaintEvent *event) override
Repaint widget.
std::pair< const float, float > locate(QMouseEvent *) const
Locate clicked point on a path.
float m_fOriginY
< Original position of selected point
QPixmap * m_pBackgroundPixmap
static constexpr int m_nMinimumHeight
float m_fOriginX
< Whether a new point was added during mouse move
void autoResize()
Resize widget to fit everything.
void setGridWidth(int width)
void setAutomationPath(H2Core::AutomationPath *path, bool bUpdate=true)
int m_nMaxPatternSequence
< Height of top and bottom margins
std::map< float, float >::iterator iterator
Changes
Bitwise or-able options showing which part of the Preferences were altered using the PreferencesDialo...