~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/ctrl/ctrlcanvas.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-07-18 16:07:06 UTC
  • mfrom: (1.1.12) (10.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120718160706-qy1lydijykeiqqmg
Tags: 2.0-1
* New stable release.
* debian/rules: Exclude muse/widgets/arrangercolumns.{cpp,h}~ from being
  deleted by dh_clean.
* Drop 0002-gcc_hardening.patch, applied upstream.
* Drop 0003-ftbfs_gcc47.patch, applied upstream.
* Refresh 1001-buildsystem.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
//---------------------------------------------------------
54
54
 
55
55
class CEvent {
56
 
   public:
57
 
      //enum State { Normal, Selected };
58
 
   
59
56
   private:
60
57
      MusECore::Event _event;
61
 
      //State _state;
62
58
      int       _val;
63
59
      MusECore::MidiPart* _part;
64
60
      int ex;
67
63
      CEvent(MusECore::Event e, MusECore::MidiPart* part, int v);
68
64
      MusECore::Event event() const          { return _event; }
69
65
      void setEvent(MusECore::Event& ev)     { _event = ev; }
70
 
      //State state() { return _state; }
71
 
      //void setState(State s) { _state = s; }
72
 
      //bool isSelected() { return _state == Selected; }
73
66
      bool selected() const { return !_event.empty() && _event.selected(); }
74
67
      void setSelected(bool v) { if(!_event.empty()) _event.setSelected(v); }
75
68
      int val() const              { return _val;   }
76
69
      void setVal(int v)           { _val = v; }
77
70
      void setEX(int v)            { ex = v; }
78
71
      MusECore::MidiPart* part() const       { return _part;  }
79
 
      bool contains(int /*x1*/, int /*x2*/) const;
80
 
      bool intersects(const MusECore::MidiController*, const QRect&, const int /*tickstep*/, const int /*windowHeight*/) const;
 
72
      bool contains(int x1, int x2) const;
 
73
      bool intersects(const MusECore::MidiController*, const QRect&, const int tickstep, const int windowHeight) const;
81
74
      int x()                      { return ex; }
82
75
      };
83
76
 
111
104
      MusECore::MidiController* _controller;
112
105
      CtrlPanel* _panel;
113
106
      int _cnum;
114
 
      // Current real drum controller number (anote).
115
 
      int _dnum;
116
 
      // Current real drum controller index.
117
 
      int _didx;
 
107
      int _dnum; // Current real drum controller number (anote).
 
108
      int _didx; // Current real drum controller index.
118
109
      int line1x;
119
110
      int line1y;
120
111
      int line2x;
134
125
      void changeValRamp(int x1, int x2, int y1, int y2);
135
126
      void newValRamp(int x1, int y1, int x2, int y2);
136
127
      void changeVal(int x1, int x2, int y);
137
 
      //void newVal(int x1, int x2, int y);
138
128
      void newVal(int x1, int y);
139
129
      void newVal(int x1, int y1, int x2, int y2);
140
130
      void deleteVal(int x1, int x2, int y);
175
165
      void setMidiController(int);
176
166
      void updateItems();
177
167
      void updateSelections();
178
 
 
179
 
      //virtual void closeEvent(QCloseEvent*);
180
168
      
181
169
   private slots:
182
170
      void songChanged(int type);