00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TRACK_VIEW_H
00023 #define TRACK_VIEW_H
00024
00025 #include "ViewItem.h"
00026
00027 class Track;
00028 class AudioClip;
00029 class AudioClipView;
00030 class TrackPanelView;
00031 class PluginChainView;
00032
00033 class TrackView : public ViewItem
00034 {
00035 Q_OBJECT
00036 Q_CLASSINFO("edit_properties", tr("Edit properties"))
00037 Q_CLASSINFO("add_new_plugin", tr("Add new Plugin"))
00038 Q_CLASSINFO("select_bus", tr("Select Bus"))
00039 Q_CLASSINFO("insert_silence", tr("Insert Silence"))
00040
00041 public:
00042 TrackView(SheetView* sv, Track* track);
00043 ~TrackView();
00044
00045 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
00046
00047 Track* get_track() const;
00048 QList<AudioClipView* >* get_clipviews() {return &m_clipViews;}
00049 TrackPanelView* get_trackpanel_view() const;
00050
00051 int get_childview_y_offset() const;
00052 void move_to(int x, int y);
00053 int get_height();
00054 void set_height(int height);
00055
00056 void calculate_bounding_rect();
00057 void load_theme_data();
00058
00059 void to_front(AudioClipView* view);
00060
00061 private:
00062 Track* m_track;
00063 QList<AudioClipView* > m_clipViews;
00064 TrackPanelView* m_panel;
00065 PluginChainView* m_pluginChainView;
00066 int m_height;
00067 int m_paintBackground;
00068 int m_cliptopmargin;
00069 int m_clipbottommargin;
00070 int m_topborderwidth;
00071 int m_bottomborderwidth;
00072
00073 friend class TrackPanelView;
00074
00075 public slots:
00076 Command* edit_properties();
00077 Command* add_new_plugin();
00078 Command* select_bus();
00079 Command* insert_silence();
00080
00081 private slots:
00082 void add_new_audioclipview(AudioClip* clip);
00083 void remove_audioclipview(AudioClip* clip);
00084 };
00085
00086
00087 #endif
00088
00089