SciFigs/ParallelBand.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of SciFigs.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created : 2004-12-02
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (ULg, Liège, Belgium)
00025 **    Marc Wathelet (LGIT, Grenoble, France)
00026 **
00027 ***************************************************************************/
00028 
00029 #ifndef PARALLELBAND_H
00030 #define PARALLELBAND_H
00031 
00032 #include "SciFigsDLLExport.h"
00033 #include "Pen.h"
00034 #include "Brush.h"
00035 
00036 namespace SciFigs {
00037 
00038 class SCIFIGS_EXPORT ParallelBand : public XMLClass
00039 {
00040 public:
00041   ParallelBand(const Brush& b=Qt::SolidPattern, const Pen& p=Qt::NoPen);
00042   ParallelBand(double value, const Pen& p=Qt::SolidLine);
00043   ParallelBand(double min, double max, const Brush& b=Qt::SolidPattern,
00044                const Pen& p=Qt::NoPen);
00045   virtual ~ParallelBand() {}
00046 
00047   virtual const QString& xml_tagName() const {return xmlParallelBandTag;}
00048   static const QString xmlParallelBandTag;
00049 
00050   void setValue(double v) {_minimum=v; _maximum=v;}
00051   double value() const {return _minimum;}
00052 
00053   void setMinimum(double m) {_minimum=m;}
00054   double minimum() const {return _minimum;}
00055 
00056   void setMaximum(double m) {_maximum=m;}
00057   double maximum() const {return _maximum;}
00058 
00059   void setPen(const Pen& p) {_pen=p;}
00060   const Pen& pen() const {return _pen;}
00061 
00062   void setBrush(const Brush& b) {_brush=b;}
00063   const Brush& brush() const {return _brush;}
00064 protected:
00065   virtual void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00066   virtual bool xml_setProperty(XML_SETPROPERTY_ARGS);
00067   virtual void xml_writeChildren(XML_WRITECHILDREN_ARGS) const;
00068   virtual XMLMember xml_member(XML_MEMBER_ARGS);
00069 protected:
00070   Pen _pen;
00071   Brush _brush;
00072   double _minimum, _maximum;
00073 };
00074 
00075 } // namespace SciFigs
00076 
00077 #endif // PARALLELBAND_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines