summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2006-12-01 13:55:58 +0000
committerWerner Schweer <ws.seh.de>2006-12-01 13:55:58 +0000
commit02f1482aa160fc4441d0a2a4ee0352b4e860cc39 (patch)
tree3786a19c471db9da7ad722066481290c6a5db83b
parent436723adc7de2e7e0662ff8275c3ef0ecf495ac9 (diff)
updates
-rw-r--r--muse/muse/ctrl/ctrledit.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/muse/muse/ctrl/ctrledit.h b/muse/muse/ctrl/ctrledit.h
new file mode 100644
index 00000000..c5904ff5
--- /dev/null
+++ b/muse/muse/ctrl/ctrledit.h
@@ -0,0 +1,76 @@
+//=============================================================================
+// MusE
+// Linux Music Editor
+// $Id:$
+//
+// Copyright (C) 2002-2006 by Werner Schweer and others
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//=============================================================================
+
+#ifndef __CTRL_EDIT_H__
+#define __CTRL_EDIT_H__
+
+#include "ctrl/ctrleditor.h"
+#include "gui.h"
+
+class SimpleButton;
+class TimeCanvas;
+
+//---------------------------------------------------------
+// CtrlEdit
+//---------------------------------------------------------
+
+class CtrlEdit : public QObject, public CtrlEditor {
+ Q_OBJECT
+
+ Track* const _track;
+ Ctrl* _ctrl;
+ TimeCanvas* _tc;
+ int _height;
+
+ virtual Ctrl* ctrl() const { return _ctrl; }
+ virtual TimeCanvas* tc() const { return _tc; }
+ virtual Track* track() const { return _track; }
+
+ public:
+ int ctrlId;
+ int y;
+ SimpleButton* minus;
+ SimpleButton* sel;
+ QMenu* ctrlList;
+
+ private slots:
+ void showControllerList();
+ void changeController(int);
+ void controllerListChanged(int);
+
+ public:
+ CtrlEdit(QWidget*, TimeCanvas*, Track*);
+ ~CtrlEdit();
+ int pixel2val(int) const;
+ void setHeight(int val) { _height = val; }
+ int height() const { return _height; }
+ virtual int cheight() const { return _height - splitWidth; }
+ void setCtrl(Ctrl* c) { _ctrl = c; }
+ void setCtrl(int id);
+ Ctrl* ctrl() { return _ctrl; }
+ void setSinglePitch(int);
+ };
+
+
+typedef std::vector<CtrlEdit*> CtrlEditList;
+typedef CtrlEditList::iterator iCtrlEdit;
+typedef CtrlEditList::const_iterator ciCtrlEdit;
+#endif
+