diff layer/WaveformLayer.h @ 285:9dd432665059

* Add a colour database, and Add New Colour function to the colour combo in property box. The colour property is only correctly handled in the waveform layer so far. * Add en_GB translation, to translate those annoying Color texts in the Qt colour picker dialog.
author Chris Cannam
date Wed, 11 Jul 2007 17:21:37 +0000
parents b9380f679f70
children cd2492c5fe45
line wrap: on
line diff
--- a/layer/WaveformLayer.h	Fri Jul 06 15:17:35 2007 +0000
+++ b/layer/WaveformLayer.h	Wed Jul 11 17:21:37 2007 +0000
@@ -46,6 +46,8 @@
     virtual int getVerticalScaleWidth(View *v, QPainter &) const;
     virtual void paintVerticalScale(View *v, QPainter &paint, QRect rect) const;
 
+    virtual bool hasLightBackground() const;
+
     void setModel(const RangeSummarisableTimeValueModel *model);
 
     virtual PropertyList getProperties() const;
@@ -74,13 +76,14 @@
     bool getAutoNormalize() const { return m_autoNormalize; }
 
     /**
-     * Set the basic display colour for waveforms.
+     * Set the basic display colour for waveforms.  The parameter is
+     * a ColourDatabase index.
      *
-     * The default is black.
+     * The default is the first colour in the database.
      *!!! NB should default to white if the associated View !hasLightBackground()
      */
-    void setBaseColour(QColor);
-    QColor getBaseColour() const { return m_colour; }
+    void setBaseColour(int);
+    int getBaseColour() const;
 
     /**
      * Set whether to display mean values as a lighter-coloured area
@@ -209,7 +212,7 @@
 
     float        m_gain;
     bool         m_autoNormalize;
-    QColor       m_colour;
+    int          m_colour;
     bool         m_showMeans;
     bool         m_greyscale;
     ChannelMode  m_channelMode;