diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /WFPalette.hpp | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'WFPalette.hpp')
| -rwxr-xr-x | WFPalette.hpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/WFPalette.hpp b/WFPalette.hpp index 69a2b85f..a2ed4c11 100755 --- a/WFPalette.hpp +++ b/WFPalette.hpp @@ -1,56 +1,56 @@ -#ifndef W_F_PALETTE_HPP__ -#define W_F_PALETTE_HPP__ - -#include <QMetaType> -#include <QList> -#include <QVector> -#include <QColor> - -class QString; - -// -// Class WFPalette -// -// Encapulates a waterfall palette description. A colour gradient -// over 256 intervals is described by a list of RGB colour triplets. -// The list of colours are use to interpolate the full 256 interval -// waterfall colour gradient. -// -// Responsibilities -// -// Construction from a string which is a path to a file containing -// colour descriptions in the form rrr;ggg;bbb on up to 256 -// consecutive lines, where rrr, ggg and, bbb are integral numbers in -// the range 0<=n<256. -// -// Construction from a list of QColor instances. Up to the first 256 -// list elements are used. -// -// Includes a design GUI to create or adjust a WFPalette. -// -class WFPalette -{ -public: - using Colours = QList<QColor>; - - WFPalette () = default; - explicit WFPalette (Colours const&); - explicit WFPalette (QString const& file_path); - WFPalette (WFPalette const&) = default; - WFPalette& operator = (WFPalette const&) = default; - - Colours colours () const {return colours_;} - - // interpolate a gradient over 256 steps - QVector<QColor> interpolate () const; - - // returns true if colours have been modified - bool design (); - -private: - Colours colours_; -}; - -Q_DECLARE_METATYPE (WFPalette::Colours); - -#endif +#ifndef W_F_PALETTE_HPP__
+#define W_F_PALETTE_HPP__
+
+#include <QMetaType>
+#include <QList>
+#include <QVector>
+#include <QColor>
+
+class QString;
+
+//
+// Class WFPalette
+//
+// Encapulates a waterfall palette description. A colour gradient
+// over 256 intervals is described by a list of RGB colour triplets.
+// The list of colours are use to interpolate the full 256 interval
+// waterfall colour gradient.
+//
+// Responsibilities
+//
+// Construction from a string which is a path to a file containing
+// colour descriptions in the form rrr;ggg;bbb on up to 256
+// consecutive lines, where rrr, ggg and, bbb are integral numbers in
+// the range 0<=n<256.
+//
+// Construction from a list of QColor instances. Up to the first 256
+// list elements are used.
+//
+// Includes a design GUI to create or adjust a WFPalette.
+//
+class WFPalette
+{
+public:
+ using Colours = QList<QColor>;
+
+ WFPalette () = default;
+ explicit WFPalette (Colours const&);
+ explicit WFPalette (QString const& file_path);
+ WFPalette (WFPalette const&) = default;
+ WFPalette& operator = (WFPalette const&) = default;
+
+ Colours colours () const {return colours_;}
+
+ // interpolate a gradient over 256 steps
+ QVector<QColor> interpolate () const;
+
+ // returns true if colours have been modified
+ bool design ();
+
+private:
+ Colours colours_;
+};
+
+Q_DECLARE_METATYPE (WFPalette::Colours);
+
+#endif
|
