00001 /*************************************************************************** 00002 ** 00003 ** This file is part of GeopsyGui. 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: 2011-01-28 00022 ** Authors: 00023 ** Marc Wathelet (ISTerre, Grenoble, France) 00024 ** 00025 ***************************************************************************/ 00026 00027 #ifndef TIMEWINDOW_H 00028 #define TIMEWINDOW_H 00029 00030 #include <QtGui> 00031 00032 #include <GeopsyCore.h> 00033 00034 #include "GeopsyGuiDLLExport.h" 00035 00036 namespace GeopsyGui { 00037 00038 class GEOPSYGUI_EXPORT TimeWindow : public TimeRange, public XMLClass 00039 { 00040 public: 00041 TimeWindow(double start=0.0, double end=0.0, const QColor& c=Qt::black) 00042 : TimeRange(start, end), XMLClass() {_color=c;} 00043 TimeWindow(const TimeWindow& o) 00044 : TimeRange(o), XMLClass() {_color=o._color;} 00045 virtual ~TimeWindow() {} 00046 00047 virtual const QString& xml_tagName() const {return xmlTimeWindowTag;} 00048 static const QString xmlTimeWindowTag; 00049 00050 const QColor& color() const {return _color;} 00051 void setColor(const QColor& c) {_color=c;} 00052 00053 virtual void xml_attributes(XML_ATTRIBUTES_ARGS) const; 00054 virtual bool xml_setAttributes(XML_SETATTRIBUTES_ARGS); 00055 private: 00056 QColor _color; 00057 }; 00058 00059 } // namespace GeopsyGui 00060 00061 #endif // TIMEWINDOW_H