TCOView: Make patternviews foreground elements stylable with qproperties
This commit is contained in:
@@ -33,11 +33,15 @@ class AutomationPattern;
|
||||
class AutomationPatternView : public trackContentObjectView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// theming qproperties
|
||||
Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor )
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
|
||||
public:
|
||||
AutomationPatternView( AutomationPattern * _pat, trackView * _parent );
|
||||
virtual ~AutomationPatternView();
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void update();
|
||||
|
||||
@@ -67,7 +71,6 @@ private:
|
||||
bool m_needsUpdate;
|
||||
|
||||
void scaleTimemapToFit( float oldMin, float oldMax );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -88,6 +88,11 @@ signals:
|
||||
class SampleTCOView : public trackContentObjectView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// theming qproperties
|
||||
Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor )
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
|
||||
public:
|
||||
SampleTCOView( SampleTCO * _tco, trackView * _tv );
|
||||
virtual ~SampleTCOView();
|
||||
@@ -108,7 +113,6 @@ protected:
|
||||
|
||||
private:
|
||||
SampleTCO * m_tco;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -147,6 +147,10 @@ private:
|
||||
class patternView : public trackContentObjectView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// theming qproperties
|
||||
Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor )
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
public:
|
||||
patternView( pattern * _pattern, trackView * _parent );
|
||||
virtual ~patternView();
|
||||
@@ -185,7 +189,6 @@ private:
|
||||
pattern * m_pat;
|
||||
QPixmap m_paintPixmap;
|
||||
bool m_needsUpdate;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -163,6 +163,11 @@ private:
|
||||
class trackContentObjectView : public selectableObject, public ModelView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
// theming qproperties
|
||||
Q_PROPERTY( QColor fgColor READ fgColor WRITE setFgColor )
|
||||
Q_PROPERTY( QColor textColor READ textColor WRITE setTextColor )
|
||||
|
||||
public:
|
||||
trackContentObjectView( trackContentObject * _tco, trackView * _tv );
|
||||
virtual ~trackContentObjectView();
|
||||
@@ -173,7 +178,11 @@ public:
|
||||
{
|
||||
return m_tco;
|
||||
}
|
||||
|
||||
// qproperty access func
|
||||
QColor fgColor() const;
|
||||
QColor textColor() const;
|
||||
void setFgColor( const QColor & _c );
|
||||
void setTextColor( const QColor & _c );
|
||||
|
||||
public slots:
|
||||
virtual bool close();
|
||||
@@ -228,6 +237,9 @@ private:
|
||||
|
||||
MidiTime m_oldTime;// used for undo/redo while mouse-button is pressed
|
||||
|
||||
// qproperty fields
|
||||
QColor * m_fgColor;
|
||||
QColor * m_textColor;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user