UPowerGlib.HistoryItem

g GObject.Object GObject.Object UPowerGlib.HistoryItem UPowerGlib.HistoryItem GObject.Object->UPowerGlib.HistoryItem

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_state ()

get_time ()

get_value ()

set_from_string (text)

set_state (state)

set_time (time)

set_time_to_present ()

set_value (value)

to_string ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

state

int

r/w

time

int

r/w

value

float

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class UPowerGlib.HistoryItem(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

UPowerGlib.HistoryItemClass

classmethod new()
Returns:

a new UPowerGlib.HistoryItem object.

Return type:

UPowerGlib.HistoryItem

New in version 0.9.0.

get_state()
Return type:

UPowerGlib.DeviceState

Gets the item state.

New in version 0.9.0.

get_time()
Return type:

int

Gets the item time.

New in version 0.9.0.

get_value()
Return type:

float

Gets the item value.

New in version 0.9.0.

set_from_string(text)
Parameters:

text (str) –

Return type:

bool

Converts the history item to a string representation.

New in version 0.9.1.

set_state(state)
Parameters:

state (UPowerGlib.DeviceState) – the new value

Sets the item state.

New in version 0.9.0.

set_time(time)
Parameters:

time (int) – the new value

Sets the item time.

New in version 0.9.0.

set_time_to_present()

Sets the item time to the present value.

New in version 0.9.1.

set_value(value)
Parameters:

value (float) – the new value

Sets the item value.

New in version 0.9.0.

to_string()
Return type:

str

Converts the history item to a string representation.

New in version 0.9.1.

Property Details

UPowerGlib.HistoryItem.props.state
Name:

state

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.9.0.

UPowerGlib.HistoryItem.props.time
Name:

time

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.9.0.

UPowerGlib.HistoryItem.props.value
Name:

value

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

New in version 0.9.0.