summaryrefslogtreecommitdiffstats
path: root/src/engine/cuecontrol.h
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2019-01-06 10:40:02 -0600
committerBe <be@mixxx.org>2019-01-06 11:02:56 -0600
commit4257db41cccd9f5e0f1730aea86edbb1be240170 (patch)
tree80b030aa3ffcb664c4e1a4c101d1d6f621e31a7f /src/engine/cuecontrol.h
parent603f5e5ee910b146f0d3d0a00af7acd5a5cdd291 (diff)
move EngineControls to their own folder
Diffstat (limited to 'src/engine/cuecontrol.h')
-rw-r--r--src/engine/cuecontrol.h182
1 files changed, 0 insertions, 182 deletions
diff --git a/src/engine/cuecontrol.h b/src/engine/cuecontrol.h
deleted file mode 100644
index c9d82c06f8..0000000000
--- a/src/engine/cuecontrol.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// cuecontrol.h
-// Created 11/5/2009 by RJ Ryan (rryan@mit.edu)
-
-#ifndef CUECONTROL_H
-#define CUECONTROL_H
-
-#include <QList>
-#include <QMutex>
-
-#include "engine/enginecontrol.h"
-#include "preferences/usersettings.h"
-#include "control/controlproxy.h"
-#include "track/track.h"
-
-#define NUM_HOT_CUES 37
-
-class ControlObject;
-class ControlPushButton;
-class ControlIndicator;
-
-class HotcueControl : public QObject {
- Q_OBJECT
- public:
- HotcueControl(QString group, int hotcueNumber);
- virtual ~HotcueControl();
-
- inline int getHotcueNumber() { return m_iHotcueNumber; }
- inline CuePointer getCue() { return m_pCue; }
- double getPosition() const;
- void setCue(CuePointer pCue);
- void resetCue();
- void setPosition(double position);
-
- // Used for caching the preview state of this hotcue control.
- inline bool isPreviewing() {
- return m_bPreviewing;
- }
- inline void setPreviewing(bool bPreviewing) {
- m_bPreviewing = bPreviewing;
- }
- inline double getPreviewingPosition() {
- return m_previewingPosition;
- }
- inline void setPreviewingPosition(double position) {
- m_previewingPosition = position;
- }
-
- private slots:
- void slotHotcueSet(double v);
- void slotHotcueGoto(double v);
- void slotHotcueGotoAndPlay(double v);
- void slotHotcueGotoAndStop(double v);
- void slotHotcueActivate(double v);
- void slotHotcueActivatePreview(double v);
- void slotHotcueClear(double v);
- void slotHotcuePositionChanged(double newPosition);
-
- signals:
- void hotcueSet(HotcueControl* pHotcue, double v);
- void hotcueGoto(HotcueControl* pHotcue, double v);
- void hotcueGotoAndPlay(HotcueControl* pHotcue, double v);
- void hotcueGotoAndStop(HotcueControl* pHotcue, double v);
- void hotcueActivate(HotcueControl* pHotcue, double v);
- void hotcueActivatePreview(HotcueControl* pHotcue, double v);
- void hotcueClear(HotcueControl* pHotcue, double v);
- void hotcuePositionChanged(HotcueControl* pHotcue, double newPosition);
- void hotcuePlay(double v);
-
- private:
- ConfigKey keyForControl(int hotcue, const char* name);
-
- QString m_group;
- int m_iHotcueNumber;
- CuePointer m_pCue;
-
- // Hotcue state controls
- ControlObject* m_hotcuePosition;
- ControlObject* m_hotcueEnabled;
- // Hotcue button controls
- ControlObject* m_hotcueSet;
- ControlObject* m_hotcueGoto;
- ControlObject* m_hotcueGotoAndPlay;
- ControlObject* m_hotcueGotoAndStop;
- ControlObject* m_hotcueActivate;
- ControlObject* m_hotcueActivatePreview;
- ControlObject* m_hotcueClear;
-
- bool m_bPreviewing;
- double m_previewingPosition;
-};
-
-class CueControl : public EngineControl {
- Q_OBJECT
- public:
- CueControl(QString group,
- UserSettingsPointer pConfig);
- ~CueControl() override;
-
- virtual void hintReader(HintVector* pHintList) override;
- bool updateIndicatorsAndModifyPlay(bool newPlay, bool playPossible);
- void updateIndicators();
- void resetIndicators();
- bool isPlayingByPlayButton();
- bool getPlayFlashingAtPause();
- void trackLoaded(TrackPointer pNewTrack) override;
-
- private slots:
- void cueUpdated();
- void trackCuesUpdated();
- void hotcueSet(HotcueControl* pControl, double v);
- void hotcueGoto(HotcueControl* pControl, double v);
- void hotcueGotoAndPlay(HotcueControl* pControl, double v);
- void hotcueGotoAndStop(HotcueControl* pControl, double v);
- void hotcueActivate(HotcueControl* pControl, double v);
- void hotcueActivatePreview(HotcueControl* pControl, double v);
- void hotcueClear(HotcueControl* pControl, double v);
- void hotcuePositionChanged(HotcueControl* pControl, double newPosition);
-
- void cueSet(double v);
- void cueGoto(double v);
- void cueGotoAndPlay(double v);
- void cueGotoAndStop(double v);
- void cuePreview(double v);
- void cueCDJ(double v);
- void cueDenon(double v);
- void cuePlay(double v);
- void cueDefault(double v);
- void pause(double v);
- void playStutter(double v);
-
- private:
- enum class TrackAt {
- Cue,
- End,
- ElseWhere
- };
-
- // These methods are not thread safe, only call them when the lock is held.
- void createControls();
- void attachCue(CuePointer pCue, int hotcueNumber);
- void detachCue(int hotcueNumber);
- TrackAt getTrackAt() const;
-
- bool m_bPreviewing;
- ControlObject* m_pPlay;
- ControlObject* m_pStopButton;
- int m_iCurrentlyPreviewingHotcues;
- ControlObject* m_pQuantizeEnabled;
- ControlObject* m_pNextBeat;
- ControlObject* m_pClosestBeat;
- bool m_bypassCueSetByPlay;
-
- const int m_iNumHotCues;
- QList<HotcueControl*> m_hotcueControls;
-
- ControlObject* m_pTrackSamples;
- ControlObject* m_pCuePoint;
- ControlObject* m_pCueMode;
- ControlPushButton* m_pCueSet;
- ControlPushButton* m_pCueCDJ;
- ControlPushButton* m_pCueDefault;
- ControlPushButton* m_pPlayStutter;
- ControlIndicator* m_pCueIndicator;
- ControlIndicator* m_pPlayIndicator;
- ControlPushButton* m_pCueGoto;
- ControlPushButton* m_pCueGotoAndPlay;
- ControlPushButton* m_pCuePlay;
- ControlPushButton* m_pCueGotoAndStop;
- ControlPushButton* m_pCuePreview;
- ControlProxy* m_pVinylControlEnabled;
- ControlProxy* m_pVinylControlMode;
-
- TrackPointer m_pLoadedTrack; // is written from an engine worker thread
-
- // Tells us which controls map to which hotcue
- QMap<QObject*, int> m_controlMap;
-
- QMutex m_mutex;
-};
-
-
-#endif /* CUECONTROL_H */