diff options
Diffstat (limited to 'muse2/muse/arranger/pcanvas.h')
-rw-r--r-- | muse2/muse/arranger/pcanvas.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/muse2/muse/arranger/pcanvas.h b/muse2/muse/arranger/pcanvas.h index 6afe1dca..6a324770 100644 --- a/muse2/muse/arranger/pcanvas.h +++ b/muse2/muse/arranger/pcanvas.h @@ -37,10 +37,13 @@ class NPart : public CItem { Track* track() const { return part()->track(); } }; +enum ControllerVals { doNothing, movingController, addNewController }; struct AutomationObject { CtrlVal *currentCtrl; CtrlList *currentCtrlList; Track *currentTrack; + bool moveController; + ControllerVals controllerState; }; class QLineEdit; @@ -64,9 +67,8 @@ class PartCanvas : public Canvas { bool editMode; AutomationObject automation; - bool moveController; - std::vector<TrackAutomationView*> automationViews; + //std::vector<TrackAutomationView*> automationViews; Q_OBJECT virtual void keyPress(QKeyEvent*); virtual void mousePress(QMouseEvent*); @@ -113,8 +115,13 @@ class PartCanvas : public Canvas { Track* y2Track(int) const; void drawAudioTrack(QPainter& p, const QRect& r, AudioTrack* track); void drawAutomation(QPainter& p, const QRect& r, AudioTrack* track); + void drawTopItem(QPainter& p, const QRect& rect); + void checkAutomation(Track * t, const QPoint& pointer, bool addNewCtrl); void processAutomationMovements(QMouseEvent *event); + double dbToVal(double inDb); + double valToDb(double inV); + protected: |