Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ABSTRACTLINE_H
00029 #define ABSTRACTLINE_H
00030
00031 #include "SciFigsDLLExport.h"
00032 #include "Symbol.h"
00033
00034 namespace SciFigs {
00035
00036 class SCIFIGS_EXPORT AbstractLine : public XMLClass
00037 {
00038 public:
00039 AbstractLine() {_selected=false; _visible=true; _editable=true;}
00040 virtual ~AbstractLine() {}
00041
00042 virtual const QString& xml_tagName() const {return xmlAbstractLineTag;}
00043 static const QString xmlAbstractLineTag;
00044
00045 virtual AbstractLine * clone() const=0;
00046 virtual void operator=(const AbstractLine& o);
00047
00048 virtual int count() const=0;
00049 virtual void clear()=0;
00050 virtual void append()=0;
00051 virtual void insert(int index)=0;
00052 virtual void removeLast()=0;
00053 virtual bool isValid(int) const {return true;}
00054 virtual void setValid(int, bool) {}
00055 virtual Point point(int index, const CurvePointOptions * options) const=0;
00056 virtual void setX(int index, double v)=0;
00057 virtual void setY(int index, double v, const CurvePointOptions * options)=0;
00058 virtual void setZ(int index, double v, const CurvePointOptions * options)=0;
00059
00060 virtual QString toString(int index, const CurvePointOptions * options) const {return point(index, options).toString(20);}
00061 virtual bool fromString(int index, const StringSection& str, const QChar *& ptr, const CurvePointOptions * options);
00062
00063 void setPen(const Pen& p) {_pen=p;}
00064 const Pen& pen() const {return _pen;}
00065
00066 void setSymbol(const Symbol& s) {_symbol=s;}
00067 const Symbol& symbol() const {return _symbol;}
00068
00069 bool isSelected() const {return _selected;}
00070 void setSelected(bool s) {_selected=s;}
00071
00072 bool isVisible() const {return _visible;}
00073 void setVisible(bool v) {_visible=v;}
00074
00075 bool isEditable() const {return _editable;}
00076 void setEditable(bool e) {_editable=e;}
00077 protected:
00078 Pen _pen;
00079 Symbol _symbol;
00080 uint _selected: 1;
00081 uint _visible: 1;
00082 uint _editable: 1;
00083 uint _unused: 29;
00084 protected:
00085 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00086 virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const;
00087 virtual bool xml_setProperty(XML_SETPROPERTY_ARGS);
00088 virtual XMLMember xml_member(XML_MEMBER_ARGS);
00089 };
00090
00091 }
00092
00093 #endif // ABSTRACTLINE_H