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 PICKFORMAT_H
00029 #define PICKFORMAT_H
00030
00031 #include <QGpGuiTools.h>
00032
00033 #include "GeopsyGuiDLLExport.h"
00034
00035 namespace GeopsyGui {
00036
00037 class GEOPSYGUI_EXPORT PickFormat : public XMLClass
00038 {
00039 public:
00040 PickFormat() {}
00041 PickFormat(const PickFormat& o);
00042
00043 virtual const QString& xml_tagName() const {return xmlPickFormatTag;}
00044 static const QString xmlPickFormatTag;
00045
00046 QList<int> indexList() const {return _formats.keys();}
00047
00048 bool isVisible(const QString& pickName) const;
00049 QColor color(const QString& pickName) const;
00050
00051 void setVisible(const QString& pickName, bool v);
00052 void setColor(const QString& pickName, const QColor& c);
00053 protected:
00054 virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00055 virtual XMLMember xml_member(XML_MEMBER_ARGS);
00056 virtual bool xml_setProperty(XML_SETPROPERTY_ARGS);
00057 private:
00058 class Format {
00059 public:
00060 Format(bool v=false, QColor c=Qt::blue) {visible=v;color=c;}
00061 Format(const Format& o) {visible=o.visible;color=o.color;}
00062
00063 bool visible;
00064 QColor color;
00065 };
00066
00067 QMap<int, Format> _formats;
00068 };
00069
00070 }
00071
00072 #endif // PICKFORMAT_H