1 #ifndef coltabsequence_h 2 #define coltabsequence_h 16 #include "generalmod.h" 57 Color color(
float pos)
const;
59 inline bool isEmpty()
const {
return x_.isEmpty(); }
60 inline int size()
const {
return x_.size(); }
61 inline float position(
int idx )
const {
return x_[idx]; }
62 inline unsigned char r(
int idx )
const {
return r_[idx]; }
63 inline unsigned char g(
int idx )
const {
return g_[idx]; }
64 inline unsigned char b(
int idx )
const {
return b_[idx]; }
68 float transparencyAt(
float)
const;
72 void removeTransparencies();
73 void removeTransparencyAt(
int);
74 bool hasTransparency()
const;
86 unsigned char,
unsigned char,
unsigned char);
87 void changePos(
int,
float);
88 int setColor(
float pos,
89 unsigned char,
unsigned char,
unsigned char);
90 void removeColor(
int);
91 void removeAllColors();
93 void flipTransparency();
103 {
return undefcolor_; }
105 { undefcolor_ = c; triggerAll(); }
107 {
return markcolor_; }
109 { markcolor_ = c; triggerAll(); }
111 static const char* sKeyValCol();
112 static const char* sKeyMarkColor();
113 static const char* sKeyUdfColor();
114 static const char* sKeyTransparency();
115 static const char* sKeyCtbl();
116 static const char* sKeyNrSegments();
117 static const char* sKeyRainbow();
133 transparencyChanged.
trigger(); }
134 float snapToSegmentCenter(
float)
const;
150 int size()
const {
return seqs_.size(); }
151 int indexOf(
const char*)
const;
152 const Sequence*
get(
int idx )
const {
return seqs_[idx]; }
155 const Sequence* getAny(
const char* key)
const;
161 bool write(
bool sys=
false,
bool applsetup=
true);
177 void addFromPar(const
IOPar&,
bool);
179 { seqs_ += seq; seqAdded.
trigger(); }
#define mExpClass(module)
Definition: commondefs.h:160
const Color & markColor() const
Definition: coltabsequence.h:106
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Manages Sequences; reads/writes system or user-defined.
Definition: coltabsequence.h:144
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
TypeSet< Geom::Point2D< float > > tr_
Definition: coltabsequence.h:125
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
#define mGlobal(module)
Definition: commondefs.h:163
TypeSet< unsigned char > r_
Definition: coltabsequence.h:122
bool isSys() const
Definition: coltabsequence.h:52
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
unsigned char b(int idx) const
Definition: coltabsequence.h:64
Notifier< Sequence > toBeRemoved
Definition: coltabsequence.h:100
float position(int idx) const
Definition: coltabsequence.h:61
TypeSet< float > x_
Definition: coltabsequence.h:121
int nrsegments_
Definition: coltabsequence.h:130
void triggerAll()
Definition: coltabsequence.h:132
Definition: coltabsequence.h:46
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
Type type_
Definition: coltabsequence.h:129
Notifier< Sequence > transparencyChanged
Definition: coltabsequence.h:99
Notifier< Sequence > colorChanged
Definition: coltabsequence.h:98
Geom::Point2D< float > transparency(int idx) const
Definition: coltabsequence.h:67
Definition: pythonaccess.h:37
int size() const
Definition: coltabsequence.h:60
Notifier< SeqMgr > seqRemoved
Definition: coltabsequence.h:164
Definition: callback.h:254
void setMarkColor(Color c)
Definition: coltabsequence.h:108
Set of pointers to objects.
Definition: commontypes.h:32
TypeSet< unsigned char > b_
Definition: coltabsequence.h:124
int size() const
Definition: coltabsequence.h:150
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
unsigned char r(int idx) const
Definition: coltabsequence.h:62
TypeSet< unsigned char > g_
Definition: coltabsequence.h:123
void setNrSegments(int n)
Definition: coltabsequence.h:77
ObjectSet< Sequence > seqs_
Definition: coltabsequence.h:173
void trigger(T &t)
Definition: callback.h:258
Type type() const
Definition: coltabsequence.h:54
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
Notifier< SeqMgr > seqAdded
Definition: coltabsequence.h:163
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
unsigned char g(int idx) const
Definition: coltabsequence.h:63
void setUndefColor(Color c)
Definition: coltabsequence.h:104
bool isEmpty() const
Definition: coltabsequence.h:59
Object with a name.
Definition: namedobj.h:35
int transparencySize() const
Definition: coltabsequence.h:66
int nrSegments() const
Definition: coltabsequence.h:76
Type
Definition: coltabsequence.h:46
Color Table
Definition: coltab.h:22
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
bool isSegmentized() const
Definition: coltabsequence.h:83
void setType(Type tp)
Definition: coltabsequence.h:55
Color undefcolor_
Definition: coltabsequence.h:127
const Color & undefColor() const
Definition: coltabsequence.h:102
Color markcolor_
Definition: coltabsequence.h:128
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118
~SeqMgr()
Definition: coltabsequence.h:166