00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MARKER_VIEW_H
00023 #define MARKER_VIEW_H
00024
00025 #include "ViewItem.h"
00026
00027 class Marker;
00028 class SheetView;
00029 class LineView;
00030 class QColor;
00031 class PositionIndicator;
00032
00033 class MarkerView : public ViewItem
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 MarkerView(Marker* marker, SheetView* sv, ViewItem* parent);
00039 ~MarkerView() {}
00040
00041 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
00042 void calculate_bounding_rect();
00043 void load_theme_data();
00044 void set_active(bool);
00045 int position();
00046 void set_position(int);
00047 void set_dragging(bool dragging);
00048
00049 Marker* get_marker() const {return m_marker;}
00050
00051 private:
00052 Marker* m_marker;
00053 LineView* m_line;
00054 QColor m_fillColor;
00055 bool m_active;
00056 bool m_dragging;
00057 PositionIndicator* m_posIndicator;
00058 int m_ascent;
00059 int m_width;
00060
00061 private slots:
00062 void update_position();
00063 void update_drawing();
00064 };
00065
00066 #endif
00067
00068