diff layer/TextLayer.h @ 287:cd2492c5fe45

* Add SingleColourLayer to manage colours for layers that have a single predominant colour (i.e. most of them).
author Chris Cannam
date Thu, 12 Jul 2007 16:14:59 +0000
parents e175ade2d6b0
children c0b9eec70639
line wrap: on
line diff
--- a/layer/TextLayer.h	Wed Jul 11 20:46:37 2007 +0000
+++ b/layer/TextLayer.h	Thu Jul 12 16:14:59 2007 +0000
@@ -16,7 +16,7 @@
 #ifndef _TEXT_LAYER_H_
 #define _TEXT_LAYER_H_
 
-#include "Layer.h"
+#include "SingleColourLayer.h"
 #include "data/model/TextModel.h"
 
 #include <QObject>
@@ -25,7 +25,7 @@
 class View;
 class QPainter;
 
-class TextLayer : public Layer
+class TextLayer : public SingleColourLayer
 {
     Q_OBJECT
 
@@ -70,9 +70,6 @@
 					  int value) const;
     virtual void setProperty(const PropertyName &, int value);
 
-    void setBaseColour(QColor);
-    QColor getBaseColour() const { return m_colour; }
-
     virtual bool isLayerScrollable(const View *v) const;
 
     virtual bool isLayerEditable() const { return true; }
@@ -91,6 +88,8 @@
     int getYForHeight(View *v, float height) const;
     float getHeightForY(View *v, int y) const;
 
+    virtual int getDefaultColourHint(bool dark, bool &impose);
+
     TextModel::PointList getLocalPoints(View *v, int x, int y) const;
 
     TextModel *m_model;
@@ -99,7 +98,6 @@
     TextModel::Point m_originalPoint;
     TextModel::Point m_editingPoint;
     TextModel::EditCommand *m_editingCommand;
-    QColor m_colour;
 };
 
 #endif