A colored time range. More...
#include <TimeWindow.h>
Public Member Functions | |
| const QColor & | color () const |
| void | setColor (const QColor &c) |
| TimeWindow (double start=0.0, double end=0.0, const QColor &c=Qt::black) | |
| TimeWindow (const TimeWindow &o) | |
| virtual void | xml_attributes (XML_ATTRIBUTES_ARGS) const |
| virtual bool | xml_setAttributes (XML_SETATTRIBUTES_ARGS) |
| virtual const QString & | xml_tagName () const |
| virtual | ~TimeWindow () |
Static Public Attributes | |
| static const QString | xmlTimeWindowTag = "TimeWindow" |
A colored time range.
| GeopsyGui::TimeWindow::TimeWindow | ( | double | start = 0.0, |
| double | end = 0.0, |
||
| const QColor & | c = Qt::black |
||
| ) | [inline] |
| GeopsyGui::TimeWindow::TimeWindow | ( | const TimeWindow & | o | ) | [inline] |
| virtual GeopsyGui::TimeWindow::~TimeWindow | ( | ) | [inline, virtual] |
{}
| const QColor& GeopsyGui::TimeWindow::color | ( | ) | const [inline] |
Referenced by MonoStation::AbstractStation::clearGrayWindows(), and MonoStation::AbstractStation::hasGrayWindows().
{return _color;}
| void GeopsyGui::TimeWindow::setColor | ( | const QColor & | c | ) | [inline] |
| void GeopsyGui::TimeWindow::xml_attributes | ( | XML_ATTRIBUTES_ARGS | ) | const [virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References GeopsyCore::TimeRange::end(), and GeopsyCore::TimeRange::start().
Referenced by GeopsyGui::TimeWindowList::xml_writeProperties().
| bool GeopsyGui::TimeWindow::xml_setAttributes | ( | XML_SETATTRIBUTES_ARGS | ) | [virtual] |
Reimplemented from QGpCoreTools::XMLClass.
References QGpCoreTools::endl(), GeopsyCore::TimeRange::setEnd(), GeopsyCore::TimeRange::setStart(), QGpCoreTools::StringSection::toString(), and QGpCoreTools::tr().
Referenced by GeopsyGui::TimeWindowList::xml_setProperty().
{
Q_UNUSED(context);
XMLRestoreAttributeIterator it;
for(it=attributes.begin(); it!=attributes.end();it++) {
const StringSection& att=it.key();
switch(att[0].unicode()) {
case 's':
setStart(it.value().toDouble());
break;
case 'e':
setEnd(it.value().toDouble());
break;
case 'c':
_color.setNamedColor(it.value().toString());
break;
default:
App::stream() << tr("Bad attribute: %1").arg(att.toString()) << endl;
return false;
}
}
return true;
}
| virtual const QString& GeopsyGui::TimeWindow::xml_tagName | ( | ) | const [inline, virtual] |
Implements QGpCoreTools::XMLClass.
{return xmlTimeWindowTag;}
const QString GeopsyGui::TimeWindow::xmlTimeWindowTag = "TimeWindow" [static] |