Rogue Wave Views
Data Access Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IliDbTimer Class Reference

Gadget class. More...

#include <ilviews/dataccess/gadgets/dbtimer.h>

Inheritance diagram for IliDbTimer:
IliDataGem IlvGadget IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface

Public Member Functions

 IliDbTimer (IlvDisplay *display, const IlvPoint &at, IlInt unitPeriod=20, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 This constructor creates a timer with a default period of one second. More...
 
virtual IlvBitmapgetBitmap () const
 Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access. More...
 
IlInt getPeriod () const
 Returns the period of the timer. More...
 
void setPeriod (IlInt units)
 Sets the period of the timer. More...
 
- Public Member Functions inherited from IliDataGem
IlBoolean hasGlobalScope () const
 Indicates the data source scope. More...
 
IlBoolean isSystemUsage () const
 Indicates the system usage flag. More...
 
virtual void setGlobalScope (IlBoolean global)
 Specifies whether the scope of the name of the data gem is local to the container in which it is located or globally visible. More...
 
virtual void usedBySystem (IlBoolean usage)
 Specifies if the object is a system object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IliDataGem
 IliDataGem (IlvDisplay *display, const IlvPoint &at, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a new data gem. More...
 

Detailed Description

Gadget class.

Library: dbgadget

The IliDbTimer class defines the timer like a gadget. The purpose of a timer is to call a function repeatedly, once every defined time period. All timers share the same hardware timer (you can create several timers without running into a system limit problem). The smallest period is 50 ms and periods increment by units of 50 ms. For example, if you want a one-second timer, you should indicate 20 units. If you indicate 0 units, the timer does not work. To associate a callback to the timer in Rogue Wave Views Studio:

This gadget is visible only under Rogue Wave Views Studio. In the final application, the gadget is there but not visible.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class inherits the accessors of its superclass IliDataGem and adds the following ones:

Data accessors

Name Type Equivalent methods
period Int getPeriod(), setPeriod().

Constructor & Destructor Documentation

§ IliDbTimer()

IliDbTimer::IliDbTimer ( IlvDisplay display,
const IlvPoint at,
IlInt  unitPeriod = 20,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

This constructor creates a timer with a default period of one second.

Parameters
displayThe display.
atThe position.
unitPeriodThe period. It is a multiple of 50 ms. For example, 1 is 50 ms, 20 is one second.
thicknessThe border thickness.
paletteThe palette.

Member Function Documentation

§ getBitmap()

virtual IlvBitmap* IliDbTimer::getBitmap ( ) const
virtual

Returns the bitmap that is displayed during the design phase in Rogue Wave Views Data Access.

Returns
The bitmap.

Reimplemented from IliDataGem.

§ getPeriod()

IlInt IliDbTimer::getPeriod ( ) const

Returns the period of the timer.

Returns
The period of the timer. The period is indicated in units.

§ setPeriod()

void IliDbTimer::setPeriod ( IlInt  units)

Sets the period of the timer.

A period is measured in units of 50ms. The smallest period is 50ms (one unit). For one second, you must indicate 20 units. If you indicate 0 units the timer is stopped.

Parameters
unitsThe period.

© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.