• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ksim

KSim::Chart

KSim::Chart Class Reference

#include <chart.h>

Inheritance diagram for KSim::Chart:

Inheritance graph
[legend]

List of all members.


Detailed Description

provides a graph displaying data onscreen using gkrellm themes

Author:
Robbie Ward <linuxphreak@gmx.co.uk>

Definition at line 39 of file chart.h.


Public Types

enum  DataType { DataIn = 0, DataOut }
enum  LabelType { Label = 0, Progress, Led }

Public Slots

void clear ()
void setTitle (const QString &)
void setDisplayMeter (bool)
void setText (const QString &in, const QString &out=QString())
void setMinValue (int)
void setMaxValue (int)
void setValue (int valueIn, int valueOut=0)

Public Member Functions

 Chart (bool displayMeter, int maxValue, const QString &title, QWidget *parent, const char *name=0, Qt::WFlags fl=0)
 Chart (bool displayMeter, int maxValue, QWidget *parent, const char *name=0, Qt::WFlags fl=0)
virtual ~Chart ()
const QString & text (DataType type) const
const QString & title () const
bool displayMeter () const
int minValue () const
int maxValue () const
int value (DataType dataType) const
void setLabelType (LabelType labelType)
LabelType labelType () const
virtual void configureObject (bool repaintWidget=true)
QSize sizeHint () const
QSize minimumSizeHint () const
void disableAutomaticUpdates ()

Protected Slots

void updateDisplay ()

Protected Member Functions

void setConfigValues ()
virtual void extraTypeCall ()
QColor chartColour (const DataType &dataType, int x=1, int y=1) const
virtual void paintEvent (QPaintEvent *)
virtual void fontChange (const QFont &)
virtual void resizeEvent (QResizeEvent *re)

Member Enumeration Documentation

enum KSim::Chart::DataType

Enumerator:
DataIn 
DataOut 

Definition at line 43 of file chart.h.

enum KSim::Chart::LabelType

Enumerator:
Label 
Progress 
Led 

Definition at line 44 of file chart.h.


Constructor & Destructor Documentation

KSim::Chart::Chart ( bool  displayMeter,
int  maxValue,
const QString &  title,
QWidget *  parent,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructs a KSim::Chart.

Parameters:
displayMeter is if the krellbar should be shown
minValue is the minimum value to show
maxValue is the maximum value to show
title is the title off the krell bar (if enabled)
parent is the parent widget

Definition at line 113 of file chart.cpp.

KSim::Chart::Chart ( bool  displayMeter,
int  maxValue,
QWidget *  parent,
const char *  name = 0,
Qt::WFlags  fl = 0 
)

Constructs a KSim::Chart.

Parameters:
showKrell is if the krellbar should be shown
minValue is the minimum value to show
maxValue is the maximum value to show
parent is the parent widget

Definition at line 120 of file chart.cpp.

KSim::Chart::~Chart (  )  [virtual]

destructs KSim::Chart

Definition at line 127 of file chart.cpp.


Member Function Documentation

const QString & KSim::Chart::text ( DataType  type  )  const

returns the current text of the chart

Definition at line 133 of file chart.cpp.

const QString & KSim::Chart::title (  )  const

Returns:
the title of the chart

Definition at line 141 of file chart.cpp.

bool KSim::Chart::displayMeter (  )  const

Returns:
true if the meter is enabled

Definition at line 146 of file chart.cpp.

int KSim::Chart::minValue (  )  const

Returns:
the minimum value

Definition at line 151 of file chart.cpp.

int KSim::Chart::maxValue (  )  const

Returns:
the minimum value

Definition at line 156 of file chart.cpp.

int KSim::Chart::value ( DataType  dataType  )  const

Returns:
the current value

Definition at line 161 of file chart.cpp.

void KSim::Chart::setLabelType ( LabelType  labelType  ) 

sets the type of the label that will appear under the graph

Definition at line 175 of file chart.cpp.

KSim::Chart::LabelType KSim::Chart::labelType (  )  const

Returns:
the current label type, one of: Label, Progress, Led

Definition at line 206 of file chart.cpp.

void KSim::Chart::configureObject ( bool  repaintWidget = true  )  [virtual]

reimplemented for internal reasons

Implements KSim::Base.

Definition at line 256 of file chart.cpp.

QSize KSim::Chart::sizeHint (  )  const

reimplemented for internal reasons

Definition at line 286 of file chart.cpp.

QSize KSim::Chart::minimumSizeHint (  )  const

reimplemented for internal reasons

Definition at line 291 of file chart.cpp.

void KSim::Chart::disableAutomaticUpdates (  ) 

Definition at line 303 of file chart.cpp.

void KSim::Chart::clear (  )  [slot]

Cleats the graphs contents.

Definition at line 308 of file chart.cpp.

void KSim::Chart::setTitle ( const QString &  name  )  [slot]

sets the title of the chart, this function returns if the optional krell widget is disabled

Definition at line 315 of file chart.cpp.

void KSim::Chart::setDisplayMeter ( bool  value  )  [slot]

turns the meter on and off

Definition at line 323 of file chart.cpp.

void KSim::Chart::setText ( const QString &  in,
const QString &  out = QString() 
) [slot]

sets the current text that apears in the top left hand corner

Definition at line 338 of file chart.cpp.

void KSim::Chart::setMinValue ( int  minValue  )  [slot]

Sets the minimum value the graph will display.

Definition at line 356 of file chart.cpp.

void KSim::Chart::setMaxValue ( int  maxValue  )  [slot]

Sets the maximum value the graph will display.

Definition at line 367 of file chart.cpp.

void KSim::Chart::setValue ( int  valueIn,
int  valueOut = 0 
) [slot]

sets the value of the graph

Definition at line 378 of file chart.cpp.

void KSim::Chart::setConfigValues (  )  [protected]

Set the config values depending on the chart type.

Definition at line 411 of file chart.cpp.

void KSim::Chart::extraTypeCall (  )  [protected, virtual]

reimplemented for internal reasons

Reimplemented from KSim::Base.

Definition at line 424 of file chart.cpp.

QColor KSim::Chart::chartColour ( const DataType &  dataType,
int  x = 1,
int  y = 1 
) const [protected]

Definition at line 429 of file chart.cpp.

void KSim::Chart::paintEvent ( QPaintEvent *   )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 443 of file chart.cpp.

void KSim::Chart::fontChange ( const QFont &   )  [protected, virtual]

Definition at line 483 of file chart.cpp.

void KSim::Chart::resizeEvent ( QResizeEvent *  re  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 296 of file chart.cpp.

void KSim::Chart::updateDisplay (  )  [protected, slot]

Definition at line 489 of file chart.cpp.


The documentation for this class was generated from the following files:
  • chart.h
  • chart.cpp

ksim

Skip menu "ksim"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal