Public Types | Public Member Functions

PlotProperties Class Reference

#include <PlotProperties.h>

Collaboration diagram for PlotProperties:
Collaboration graph
[legend]

List of all members.

Public Types

enum  LineStyle { Lines, Dots, DotsLines, ThinLines }

Public Member Functions

 PlotProperties ()
virtual ~PlotProperties ()
void setName (QString name)
QString name ()
void setLineStyle (LineStyle style)
LineStyle lineStyle ()
void enableGrid (bool flag)
bool isGridEnabled ()
void setXAxisAutoscale (bool flag)
bool xAxisAutoscale ()
void setXAxisMinimum (QDate date)
QDate xAxisMinimum ()
void setXAxisMaximum (QDate date)
QDate xAxisMaximum ()
void setYAxisAutoscale (bool flag)
bool yAxisAutoscale ()
void setYAxisMinimum (double minimum)
double yAxisMinimum ()
void setYAxisMaximum (double maximum)
double yAxisMaximum ()
QString stream ()
bool parseElement (QString name, QXmlStreamAttributes attributes)

Member Enumeration Documentation

Enumerator:
Lines 
Dots 
DotsLines 
ThinLines 

{ Lines, Dots, DotsLines, ThinLines };


Constructor & Destructor Documentation

PlotProperties::PlotProperties (  ) 

{
  //qDebug( "PlotProperties::PlotProperties" );

  init();
}

PlotProperties::~PlotProperties (  )  [virtual]

{
  //qDebug( "PlotProperties::~PlotProperties" );
}


Member Function Documentation

void PlotProperties::enableGrid ( bool  flag  )  [inline]

{ m_enableGrid = flag; };

bool PlotProperties::isGridEnabled (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_enableGrid; };

LineStyle PlotProperties::lineStyle (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_lineStyle; };

QString PlotProperties::name (  )  [inline]

{ return m_name; };

bool PlotProperties::parseElement ( QString  name,
QXmlStreamAttributes  attributes 
)

{
  //qDebug( "PlotProperties::parseElement" );

  if ( name == "PlotProperties" )
  {
    m_name = attributes.value( "Name" ).toString();
    m_lineStyle = ( LineStyle )attributes.value( "LineStyle" ).toString().toInt();
    m_enableGrid = ( bool )attributes.value( "EnableGrid" ).toString().toInt();
    m_xAxisAutoscale = ( bool )attributes.value( "XAxisAutoscale" ).toString().toInt();
    m_xAxisMinimum = QDate::fromString( attributes.value( "XAxisMinimum" ).toString(), QLocale::system().dateFormat( QLocale::ShortFormat ) );
    m_xAxisMaximum = QDate::fromString( attributes.value( "XAxisMaximum" ).toString(), QLocale::system().dateFormat( QLocale::ShortFormat ) );
    m_yAxisAutoscale = ( bool )attributes.value( "YAxisAutoscale" ).toString().toInt();
    m_yAxisMinimum = attributes.value( "YAxisMinimum" ).toString().toDouble();
    m_yAxisMaximum = attributes.value( "YAxisMaximum" ).toString().toDouble();
  }

  return true;
}

void PlotProperties::setLineStyle ( LineStyle  style  )  [inline]

{ m_lineStyle = style; };

void PlotProperties::setName ( QString  name  )  [inline]

{ m_name = name; };

void PlotProperties::setXAxisAutoscale ( bool  flag  )  [inline]

{ m_xAxisAutoscale = flag; };

void PlotProperties::setXAxisMaximum ( QDate  date  )  [inline]

{ m_xAxisMaximum = date; };

void PlotProperties::setXAxisMinimum ( QDate  date  )  [inline]

{ m_xAxisMinimum = date; };

void PlotProperties::setYAxisAutoscale ( bool  flag  )  [inline]

{ m_yAxisAutoscale = flag; };

void PlotProperties::setYAxisMaximum ( double  maximum  )  [inline]

{ m_yAxisMaximum = maximum; };

void PlotProperties::setYAxisMinimum ( double  minimum  )  [inline]

{ m_yAxisMinimum = minimum; };

QString PlotProperties::stream (  ) 

{
  //qDebug( "PlotProperties::stream" );

  QString xmlString;
  QTextStream stream( &xmlString );
  QString indent = "  ";

  stream << "<PlotProperties"
         << " Name=\"" << m_name << "\""
         << " LineStyle=\"" << m_lineStyle << "\""
         << " EnableGrid=\"" << m_enableGrid << "\""
         << " XAxisAutoscale=\"" << m_xAxisAutoscale << "\""
         << " XAxisMinimum=\"" << m_xAxisMinimum.toString( QLocale::system().dateFormat( QLocale::ShortFormat ) ) << "\""
         << " XAxisMaximum=\"" << m_xAxisMaximum.toString( QLocale::system().dateFormat( QLocale::ShortFormat ) ) << "\""
         << " YAxisAutoscale=\"" << m_yAxisAutoscale << "\""
         << " YAxisMinimum=\"" << m_yAxisMinimum << "\""
         << " YAxisMaximum=\"" << m_yAxisMaximum << "\""
         << ">\n";
  stream << "</PlotProperties>\n";

  return xmlString;
}

bool PlotProperties::xAxisAutoscale (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_xAxisAutoscale; };

QDate PlotProperties::xAxisMaximum (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_xAxisMaximum; };

QDate PlotProperties::xAxisMinimum (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_xAxisMinimum; };

bool PlotProperties::yAxisAutoscale (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_yAxisAutoscale; };

double PlotProperties::yAxisMaximum (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_yAxisMaximum; };

double PlotProperties::yAxisMinimum (  )  [inline]

Referenced by PlotPropertiesDialog::PlotPropertiesDialog().

{ return m_yAxisMinimum; };


The documentation for this class was generated from the following files: