OSB_GUI::DcInfoGroup Class Reference

Inheritance diagram for OSB_GUI::DcInfoGroup:

Inheritance graph
[legend]
Collaboration diagram for OSB_GUI::DcInfoGroup:

Collaboration graph
[legend]
List of all members.

Detailed Description

Maintain the configuration of a TPS version.

This group box internally stores the configuration of a TPS version, stored as list
day class -> switch time, tariff period.

Definition at line 208 of file tpscfg.h.

Signals

Public Member Functions

Private Types

Private Slots

Private Member Functions

Private Attributes


Member Typedef Documentation

typedef OSB_LIB::Id<OSB_LIB::DayClass> OSB_GUI::DcInfoGroup::DcId [private]

Short-hand for day class id, needed for Qt signals and slots.

Definition at line 216 of file tpscfg.h.

typedef std::pair<DcInfoToggle*, DcInfo*> OSB_GUI::DcInfoGroup::Info [private]

Information about one day class.

Definition at line 212 of file tpscfg.h.

typedef std::list<Info> OSB_GUI::DcInfoGroup::Infos [private]

STL container to hold the DC widgets.

Definition at line 214 of file tpscfg.h.


Member Enumeration Documentation

anonymous enum [private]

Column position of the widgets.

Enumerator:
colLabels 
colEmpty 
colTicks 
colSpacer 
colHours 

Definition at line 218 of file tpscfg.h.


Constructor & Destructor Documentation

OSB_GUI::DcInfoGroup::DcInfoGroup ( QWidget parent,
const char *  name = "dcGroup_" 
) [explicit]

Constructor with Qt arguments.


Member Function Documentation

Info* OSB_GUI::DcInfoGroup::addDc ( const OSB_LIB::DayClass dc  ) 

Add a day class.

Parameters:
dc Dayclass to add. It is added only if it does not yet exist in the group.
Returns:
true if the day class was added to the group, else false.

void OSB_GUI::DcInfoGroup::addSwitchTime ( const OSB_LIB::DayClass dc,
const OSB_LIB::TariffPeriod tp,
const OSB_LIB::Time stime 
)

Add a switch time.

Parameters:
dc Day class of the switch time.
tp Tariff period of the switch time.
stime Switch time to add.

void OSB_GUI::DcInfoGroup::buildLayout (  )  [private]

Build the layout.

Shows or hides noInfo_, background_ and ticks_ depending on whether day classes have been added.

bool OSB_GUI::DcInfoGroup::clicksOn (  )  const

Handle mouse clicks on toggle buttons?

OSB_LIB::Id<OSB_LIB::DayClass> OSB_GUI::DcInfoGroup::dcId (  )  const

Get selected day class.

Returns:
The object id of the currently selected day class, it is not set if no DcInfoToggle is currently on.

void OSB_GUI::DcInfoGroup::delSwitchTime ( const OSB_LIB::Time stime,
const OSB_LIB::Id< OSB_LIB::DayClass > &  dcId 
)

Remove a switch time.

Parameters:
stime Switch time to remove.
dcId Day class from which to remove stime.
Note that the switch time is unique for each day class, thus the tariff period is not needed.

bool OSB_GUI::DcInfoGroup::exists ( const OSB_LIB::Id< OSB_LIB::DayClass > &  dcId  )  const

Day class already added to infos?

Info* OSB_GUI::DcInfoGroup::find ( const DcId dcId  )  [private]

Find a day class.

Parameters:
dcId Object id of the day class to find.
Returns:
The day class widget for dcId, 0 if not found.

void OSB_GUI::DcInfoGroup::getConfig ( OSB_LIB::TpsConfig config  )  const

Get the configuration.

void OSB_GUI::DcInfoGroup::initInfo ( Info info,
bool  sigLabel = true,
bool  sigHours = true 
) [private]

Initialize an information buffer.

Parameters:
info Buffer to initalize, it's member may be 0.
sigLabel Connect to signals of label?
sigHours Connect to signals of hour info?
Sets the font of the label, the background of the hour info and connects to their signals.

void OSB_GUI::DcInfoGroup::labelClicked ( const DcId dcId  )  [private, slot]

Handle mouse clicks of day class labels.

Parameters:
dcId Id of the day class.
Switches the current selected info off and selected info.

void OSB_GUI::DcInfoGroup::languageChange (  ) 

Process a language change.

void OSB_GUI::DcInfoGroup::setClicks ( bool  on  ) 

Switch handling of mouse clicks on toggle buttons on or off.

void OSB_GUI::DcInfoGroup::setDc ( const OSB_LIB::Id< OSB_LIB::DayClass > &  dcId,
bool  on 
)

Switch a day class on or off.

Parameters:
dcId Id of day class to switch.
on Switch on or off?

void OSB_GUI::DcInfoGroup::sigSelected ( const DcId dcId  )  [signal]

Day class selected or deselected.

Parameters:
dcId The id of the selected day class, it is not set if the current day class is deselected.

void OSB_GUI::DcInfoGroup::sigSwitchTime ( const SwitchTimeEvent event  )  [signal]

Switch time was selected with the mouse.

This signal is sent from switchTimeEvent().

Parameters:
event Information about selected switch time.

void OSB_GUI::DcInfoGroup::switchTimeEvent ( const SwitchTimeEvent event  )  [private, slot]

Handle signals for switch times.

Parameters:
event Information about selected switch time.
Emits sigSwitchTime() with event.


Member Data Documentation

QFrame* OSB_GUI::DcInfoGroup::background_ [private]

Background for switch times and ticks.

Definition at line 372 of file tpscfg.h.

bool OSB_GUI::DcInfoGroup::clicksOn_ [private]

React to mouse clicks on toggle buttons?

Definition at line 374 of file tpscfg.h.

DcId OSB_GUI::DcInfoGroup::curDc_ [private]

Id of the currently selected day class.

It is not set if no DC is currently selected.

Definition at line 370 of file tpscfg.h.

Infos OSB_GUI::DcInfoGroup::infos_ [private]

List of DC widgets.

Definition at line 362 of file tpscfg.h.

QGridLayout* OSB_GUI::DcInfoGroup::layout_ [private]

Layout for the DC widgets.

Definition at line 380 of file tpscfg.h.

Info OSB_GUI::DcInfoGroup::noInfo_ [private]

Empty hours if no day classes are configured.

Definition at line 364 of file tpscfg.h.

QSpacerItem* OSB_GUI::DcInfoGroup::spacer_ [private]

Spacer between labels and switch times.

Definition at line 376 of file tpscfg.h.

DcInfoTicks* OSB_GUI::DcInfoGroup::ticks_ [private]

Hour ticks.

Definition at line 378 of file tpscfg.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:22:12 2006 for OSB Library by  doxygen 1.4.7