|
hydrogen 1.1.1
|
#include <AutomationPathView.h>
Signals | |
| void | valueChanged () |
| void | pointAdded (float x, float y) |
| void | pointRemoved (float x, float y) |
| void | pointMoved (float ox, float oy, float tx, float ty) |
Public Member Functions | |
| AutomationPathView (QWidget *parent=nullptr) | |
| < Point that is being dragged More... | |
| H2Core::AutomationPath * | getAutomationPath () const noexcept |
| void | setAutomationPath (H2Core::AutomationPath *path) |
| int | getGridWidth () const noexcept |
| void | setGridWidth (int width) |
Public Member Functions inherited from Object | |
| ~Object () | |
| destructor More... | |
| Object (const Object &obj) | |
| copy constructor More... | |
| Object (const char *class_name) | |
| constructor More... | |
| const char * | class_name () const |
| return the class name More... | |
| virtual QString | toQString (const QString &sPrefix, bool bShort=true) const |
| Formatted string version for debugging purposes. More... | |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. More... | |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| Repaint widget. More... | |
| void | mousePressEvent (QMouseEvent *event) override |
| Handle mouse click. More... | |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| Handler for releasing mouse button. More... | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Handler for mouse moves. More... | |
| void | keyPressEvent (QKeyEvent *event) override |
| Handler for key presses. More... | |
| QPoint | translatePoint (float x, float y) const |
| Locate path point on a wdiget surface. More... | |
| QPoint | translatePoint (const std::pair< float, float > &p) const |
| Locate path point on a wdiget surface. More... | |
| bool | checkBounds (QMouseEvent *event) const |
| Check if user clicked within area inside margins. More... | |
| std::pair< const float, float > | locate (QMouseEvent *) const |
| Locate clicked point on a path. More... | |
| void | autoResize () |
| Resize widget to fit everything. More... | |
Private Attributes | |
| H2_OBJECT H2Core::AutomationPath * | _path |
| int | m_nGridWidth |
| int | m_nMarginWidth |
| < Width of song grid cell size - in order to properly align AutomationPathView and SongEditor More... | |
| int | m_nMarginHeight |
| < Width of an empty space on the left side More... | |
| int | m_nMaxPatternSequence |
| < Height of top and bottom margins More... | |
| bool | m_bIsHolding |
| bool | m_bPointAdded |
| < Whether any points are being dragged More... | |
| float | m_fOriginX |
| < Whether a new point was added during mouse move More... | |
| float | m_fOriginY |
| < Original position of selected point More... | |
| H2Core::AutomationPath::iterator | _selectedPoint |
| < Original position of selected point More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | set_count (bool flag) |
| enable/disable class instances counting More... | |
| static bool | count_active () |
| return true if class instances counting is enabled More... | |
| static unsigned | objects_count () |
| return the number of objects More... | |
| static void | write_objects_map_to (std::ostream &out) |
| output the full objects map to a given ostream More... | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr More... | |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! More... | |
| static Logger * | logger () |
| return the logger instance More... | |
Static Public Attributes inherited from Object | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. More... | |
Static Protected Attributes inherited from Object | |
| static Logger * | __logger = nullptr |
| logger instance pointer More... | |
| AutomationPathView | ( | QWidget * | parent = nullptr | ) |
< Point that is being dragged
|
protected |
Resize widget to fit everything.
|
protected |
Check if user clicked within area inside margins.
|
inlinenoexcept |
|
inlinenoexcept |
|
overrideprotected |
Handler for key presses.
Removed selected point
|
protected |
Locate clicked point on a path.
|
overrideprotected |
Handler for mouse moves.
Moves selected point.
|
overrideprotected |
Handle mouse click.
This function locates point within click proximity, moves it along Y axis. If threre's no point to move, new point is created. That point is marked for move by mouseMoveEvent().
|
overrideprotected |
Handler for releasing mouse button.
Ends any point drags
|
overrideprotected |
Repaint widget.
|
signal |
|
signal |
|
signal |
| void setAutomationPath | ( | H2Core::AutomationPath * | path | ) |
| void setGridWidth | ( | int | width | ) |
|
protected |
Locate path point on a wdiget surface.
|
protected |
Locate path point on a wdiget surface.
|
signal |
|
private |
|
private |
< Original position of selected point
|
private |
|
private |
< Whether any points are being dragged
|
private |
< Whether a new point was added during mouse move
|
private |
< Original position of selected point
|
private |
|
private |
< Width of an empty space on the left side
|
private |
< Width of song grid cell size - in order to properly align AutomationPathView and SongEditor
|
private |
< Height of top and bottom margins