|
hydrogen 1.2.3
|
#include <AutomationPathView.h>
Public Slots | |
| void | onPreferencesChanged (H2Core::Preferences::Changes changes) |
Signals | |
| void | pointAdded (float x, float y) |
| void | pointMoved (float ox, float oy, float tx, float ty) |
| void | pointRemoved (float x, float y) |
| void | valueChanged () |
Public Member Functions | |
| AutomationPathView (QWidget *parent=nullptr) | |
| ~AutomationPathView () | |
| H2Core::AutomationPath * | getAutomationPath () const noexcept |
| int | getGridWidth () const noexcept |
| void | setAutomationPath (H2Core::AutomationPath *path, bool bUpdate=true) |
| void | setGridWidth (int width) |
| void | updateAutomationPath () |
| void | updatePosition (float fTick) |
Public Member Functions inherited from Object< AutomationPathView > | |
| Object () | |
| Object (const Object< AutomationPathView > &other) | |
Public Member Functions inherited from Base | |
| Base () | |
| Base (const Base &other) | |
| virtual const char * | class_name () const |
| void | Print (bool bShort=true) const |
| Prints content of toQString() via DEBUGLOG. | |
| virtual QString | toQString (const QString &sPrefix="", bool bShort=true) const |
| Formatted string version for debugging purposes. | |
Protected Member Functions | |
| void | autoResize () |
| Resize widget to fit everything. | |
| bool | checkBounds (QMouseEvent *event) const |
| Check if user clicked within area inside margins. | |
| void | keyPressEvent (QKeyEvent *event) override |
| Handler for key presses. | |
| std::pair< const float, float > | locate (QMouseEvent *) const |
| Locate clicked point on a path. | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Handler for mouse moves. | |
| void | mousePressEvent (QMouseEvent *event) override |
| Handle mouse click. | |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| Handler for releasing mouse button. | |
| void | paintEvent (QPaintEvent *event) override |
| Repaint widget. | |
| QPoint | translatePoint (const std::pair< float, float > &p) const |
| Locate path point on a wdiget surface. | |
| QPoint | translatePoint (float x, float y) const |
| Locate path point on a wdiget surface. | |
Protected Member Functions inherited from Object< AutomationPathView > | |
| ~Object () | |
Protected Member Functions inherited from Base | |
| ~Base () | |
Private Member Functions | |
| void | createBackground () |
Private Attributes | |
| H2Core::AutomationPath * | _path |
| H2Core::AutomationPath::iterator | _selectedPoint |
| < Original position of selected point | |
| bool | m_bIsHolding |
| bool | m_bPointAdded |
| < Whether any points are being dragged | |
| float | m_fOriginX |
| < Whether a new point was added during mouse move | |
| float | m_fOriginY |
| < Original position of selected point | |
| float | m_fTick |
| < Point that is being dragged | |
| int | m_nGridWidth |
| int | m_nMarginHeight |
| < Width of song grid cell size - in order to properly align AutomationPathView and SongEditor | |
| int | m_nMaxPatternSequence |
| < Height of top and bottom margins | |
| QPixmap * | m_pBackgroundPixmap |
Additional Inherited Members | |
Static Public Member Functions inherited from Base | |
| static const char * | _class_name () |
| return the class name | |
| static QString | base_clock (const QString &sMsg) |
| Measures the current time and stores it in __last_clock. | |
| static QString | base_clock_in (const QString &sMsg) |
| static int | bootstrap (Logger *logger, bool count=false) |
| must be called before any Object instantiation ! | |
| static bool | count_active () |
| static int | getAliveObjectCount () |
| static object_map_t | getObjectMap () |
| static Logger * | logger () |
| return the logger instance | |
| static int | objects_count () |
| static void | printObjectMapDiff (object_map_t map) |
| Creates the difference between a snapshot of the object map and its current state and prints it to std::cout. | |
| static void | set_count (bool flag) |
| enable/disable class instances counting | |
| static void | write_objects_map_to (std::ostream &out, object_map_t *map=nullptr) |
| output the full objects map to a given ostream | |
| static void | write_objects_map_to_cerr () |
| output objects map to stderr | |
Static Public Attributes inherited from Base | |
| static QString | sPrintIndention = " " |
| String used to format the debugging string output of some core classes. | |
Static Protected Member Functions inherited from Base | |
| static void | registerClass (const char *name, const atomic_obj_cpt_t *counters) |
Static Protected Attributes inherited from Base | |
| static bool | __count = false |
| should we count class instances | |
| static timeval | __last_clock = { 0, 0 } |
| static Logger * | __logger = nullptr |
Definition at line 34 of file AutomationPathView.h.
| AutomationPathView | ( | QWidget * | parent = nullptr | ) |
Definition at line 31 of file AutomationPathView.cpp.
| ~AutomationPathView | ( | ) |
Definition at line 55 of file AutomationPathView.cpp.
|
protected |
Resize widget to fit everything.
Definition at line 417 of file AutomationPathView.cpp.
|
protected |
Check if user clicked within area inside margins.
Definition at line 135 of file AutomationPathView.cpp.
|
private |
Definition at line 204 of file AutomationPathView.cpp.
|
inlinenoexcept |
Definition at line 59 of file AutomationPathView.h.
|
inlinenoexcept |
Definition at line 62 of file AutomationPathView.h.
|
overrideprotected |
Handler for key presses.
Removed selected point
Definition at line 388 of file AutomationPathView.cpp.
|
protected |
Locate clicked point on a path.
Definition at line 146 of file AutomationPathView.cpp.
|
overrideprotected |
Handler for mouse moves.
Moves selected point.
Definition at line 362 of file AutomationPathView.cpp.
|
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().
Definition at line 295 of file AutomationPathView.cpp.
|
overrideprotected |
Handler for releasing mouse button.
Ends any point drags
Definition at line 335 of file AutomationPathView.cpp.
|
slot |
Definition at line 62 of file AutomationPathView.cpp.
|
overrideprotected |
Repaint widget.
Definition at line 165 of file AutomationPathView.cpp.
|
signal |
|
signal |
|
signal |
| void setAutomationPath | ( | H2Core::AutomationPath * | path, |
| bool | bUpdate = true ) |
Definition at line 70 of file AutomationPathView.cpp.
| void setGridWidth | ( | int | width | ) |
Definition at line 98 of file AutomationPathView.cpp.
|
protected |
Locate path point on a wdiget surface.
Definition at line 121 of file AutomationPathView.cpp.
|
protected |
Locate path point on a wdiget surface.
Definition at line 112 of file AutomationPathView.cpp.
| void updateAutomationPath | ( | ) |
Definition at line 88 of file AutomationPathView.cpp.
| void updatePosition | ( | float | fTick | ) |
Definition at line 157 of file AutomationPathView.cpp.
|
signal |
|
private |
Definition at line 41 of file AutomationPathView.h.
|
private |
< Original position of selected point
Definition at line 50 of file AutomationPathView.h.
|
private |
Definition at line 46 of file AutomationPathView.h.
|
private |
< Whether any points are being dragged
Definition at line 47 of file AutomationPathView.h.
|
private |
< Whether a new point was added during mouse move
Definition at line 48 of file AutomationPathView.h.
|
private |
< Original position of selected point
Definition at line 49 of file AutomationPathView.h.
|
private |
< Point that is being dragged
Definition at line 52 of file AutomationPathView.h.
|
private |
Definition at line 42 of file AutomationPathView.h.
|
private |
< Width of song grid cell size - in order to properly align AutomationPathView and SongEditor
Definition at line 43 of file AutomationPathView.h.
|
private |
< Height of top and bottom margins
Definition at line 44 of file AutomationPathView.h.
|
private |
Definition at line 53 of file AutomationPathView.h.