Public Member Functions | Static Public Member Functions | Public Attributes
Schedule Class Reference

Brief description of class still missing. More...

#include <Schedule.h>

List of all members.

Public Member Functions

void init (LineParser &p)
 Schedule ()
 ~Schedule ()

Static Public Member Functions

static ScheduleList read (const QString &fileName)

Public Attributes

QString array
QDateTime end
QString info
QString site
QDateTime start

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

Description of constructor still missing

References end, start, and TRACE.

{
  TRACE;
  start.setTimeSpec(Qt::UTC);
  end.setTimeSpec(Qt::UTC);
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}

Member Function Documentation

void Schedule::init ( LineParser p)

References array, end, info, site, start, and QGpCoreTools::LineParser::toString().

Referenced by read().

{
  bool ok=true;
  site=p.toString(1, ok);
  array=p.toString(2, ok);
  start.setDate(QDate::fromString(p.toString(3, ok), "yyyy-MM-dd"));
  start.setTime(QTime::fromString(p.toString(4, ok), "hh:mm"));
  end.setDate(QDate::fromString(p.toString(5, ok), "yyyy-MM-dd"));
  end.setTime(QTime::fromString(p.toString(6, ok), "hh:mm"));
  info=p.toString(7, ok);
}
ScheduleList Schedule::read ( const QString &  fileName) [static]

References QGpCoreTools::endl(), info, init(), QGpCoreTools::LineParser::setString(), and QGpCoreTools::tr().

Referenced by Process::setArguments().

{
  QFile f(fileName);
  if(!f.open(QIODevice::ReadOnly)) {
    App::stream() << tr("Cannot open file %1").arg(fileName) << endl;
  }
  ScheduleList list;
  QTextStream s(&f);
  LineParser p;
  while(!s.atEnd()) {
    QString l=s.readLine();
    if(l.left(1)!="#") {
      p.setString(l);
      Schedule e;
      e.init(p);
      if(e.info!="Taurus") {
        list.append(e);
      }
    }
  }
  return list;
}

Member Data Documentation

QString Schedule::array

Referenced by init().

QDateTime Schedule::end

Referenced by init(), and Schedule().

QString Schedule::info

Referenced by init(), and read().

QString Schedule::site

Referenced by init().

QDateTime Schedule::start

Referenced by init(), and Schedule().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines