~ubuntu-branches/ubuntu/wily/muse/wily-proposed

« back to all changes in this revision

Viewing changes to muse/arranger/tlist.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2011-12-03 17:12:54 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20111203171254-28b1j4lpb46r5jtl
Tags: 2.0~rc1-1
* New upstream RC release.
* Refresh patches, remove those patches not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//  Linux Music Editor
4
4
//    $Id: tlist.h,v 1.8.2.5 2008/01/19 13:33:46 wschweer Exp $
5
5
//  (C) Copyright 1999 Werner Schweer (ws@seh.de)
 
6
//
 
7
//  This program is free software; you can redistribute it and/or
 
8
//  modify it under the terms of the GNU General Public License
 
9
//  as published by the Free Software Foundation; version 2 of
 
10
//  the License, or (at your option) any later version.
 
11
//
 
12
//  This program is distributed in the hope that it will be useful,
 
13
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
//  GNU General Public License for more details.
 
16
//
 
17
//  You should have received a copy of the GNU General Public License
 
18
//  along with this program; if not, write to the Free Software
 
19
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
20
//
6
21
//=========================================================
7
22
 
8
23
#ifndef __TLIST_H__
14
29
 
15
30
class QKeyEvent;
16
31
class QLineEdit;
 
32
class QSpinBox;
17
33
class QMouseEvent;
18
34
class QPaintEvent;
19
35
class QResizeEvent;
20
36
class QScrollBar;
21
37
class QWheelEvent;
22
 
class QMenu;
 
38
//class QMenu;
23
39
 
24
 
class ScrollScale;
 
40
namespace MusECore {
25
41
class Track;
26
42
class Xml;
 
43
}
 
44
 
 
45
namespace MusEGui {
27
46
class Header;
 
47
class PopupMenu;
 
48
class ScrollScale;
28
49
 
29
50
enum TrackColumn {
30
51
      COL_RECORD = 0,
36
57
      COL_OCHANNEL,
37
58
      COL_TIMELOCK,
38
59
      COL_AUTOMATION,
 
60
      COL_CLEF,
39
61
      COL_NONE = -1
40
62
      };
41
63
 
55
77
      Header* header;
56
78
      QScrollBar* _scroll;
57
79
      QLineEdit* editor;
58
 
      Track* editTrack;
59
 
      Track* editAutomation;
 
80
      QSpinBox* chan_edit;
 
81
      MusECore::Track* editTrack;
 
82
      MusECore::Track* editAutomation;
60
83
 
61
84
      int startY;
62
85
      int curY;
74
97
      virtual void keyPressEvent(QKeyEvent* e);
75
98
      virtual void wheelEvent(QWheelEvent* e);
76
99
 
77
 
      void portsPopupMenu(Track*, int, int);
78
 
      void oportPropertyPopupMenu(Track*, int x, int y);
 
100
      void portsPopupMenu(MusECore::Track*, int, int);
 
101
      void oportPropertyPopupMenu(MusECore::Track*, int x, int y);
79
102
      void moveSelection(int n);
80
103
      void adjustScrollbar();
81
104
      void paint(const QRect& r);
82
 
      virtual void resizeEvent(QResizeEvent*);
 
105
      //virtual void resizeEvent(QResizeEvent*);
83
106
      void redraw(const QRect& r);
84
 
      Track* y2Track(int) const;
85
 
      void classesPopupMenu(Track*, int x, int y);
86
 
      TrackList getRecEnabledTracks();
 
107
      MusECore::Track* y2Track(int) const;
 
108
      void classesPopupMenu(MusECore::Track*, int x, int y);
 
109
      MusECore::TrackList getRecEnabledTracks();
87
110
      void setHeaderToolTips();
88
 
      QMenu* colorMenu(QColor c, int id);
 
111
      //QMenu* colorMenu(QColor c, int id);
 
112
      PopupMenu* colorMenu(QColor c, int id);
89
113
 
90
114
   private slots:
91
115
      void returnPressed();
 
116
      void chanValueChanged(int);
 
117
      void chanValueFinished();
92
118
      void songChanged(int flags);
93
119
      void changeAutomation(QAction*);
94
120
      void changeAutomationColor(QAction*);
95
121
 
96
122
   signals:
97
123
      ///void selectionChanged();
98
 
      void selectionChanged(Track*);
 
124
      void selectionChanged(MusECore::Track*);
99
125
      void keyPressExt(QKeyEvent*);
100
126
      void redirectWheelEvent(QWheelEvent*);
101
127
 
103
129
      void tracklistChanged();
104
130
      void setYPos(int);
105
131
      void redraw();
106
 
      void selectTrack(Track*);
 
132
      void selectTrack(MusECore::Track*);
107
133
      void selectTrackAbove();
108
134
      void selectTrackBelow();
109
135
 
110
136
   public:
111
137
      TList(Header*, QWidget* parent, const char* name);
112
138
      void setScroll(QScrollBar* s) { _scroll = s; }
113
 
      Track* track() const { return editTrack; }
114
 
      void writeStatus(int level, Xml&, const char* name) const;
115
 
      void readStatus(Xml&, const char* name);
 
139
      MusECore::Track* track() const { return editTrack; }
 
140
      void writeStatus(int level, MusECore::Xml&, const char* name) const;
 
141
      void readStatus(MusECore::Xml&, const char* name);
116
142
      };
117
143
 
 
144
} // namespace MusEGui
 
145
 
118
146
#endif
119
147