PyANGKernel.GKContext

class GKContext

Context time for time dependent data (As Time Series).

Details

A GKContext holds the initial and end time for data that depends on time (as time series either produced by a simulator or from real detection data).

It includes also a “now” time used to fetch (or show) data at a given instant.

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

PyANGKernel.GKContext.anyContext
__init__()
getAggregationType()
Return type:

AggregationType

Defines the aggregation type to be used when the context is aggregated.

getFrom()
Return type:

QDateTime

Returns ‘from’ time

getNow()
Return type:

QDateTime

Returns ‘now’ time

getNowAsMS()
Return type:

int

Returns ‘now’ time as MS since epoch

getTo()
Return type:

QDateTime

Returns ‘to’ time

isAggregated()
Return type:

bool

On time series, it returns the aggregated data instead of an interval value.

isValid()
Return type:

bool

Returns true if from, to and now are valid.

__ne__(rhs)
Parameters:

rhsGKContext

Return type:

bool

Different operator.

__eq__(rhs)
Parameters:

rhsGKContext

Return type:

bool

Equal operator.

sameDay()
Return type:

bool

Returns true if the initial and end time are in the same day.

setAggregated(value)
Parameters:

value – bool

On time series, it returns the aggregated data instead of an interval value.

See also

isAggregated()

setAggregationType(t)
Parameters:

tAggregationType

Defines the aggregation type to be used when the context is aggregated.

setFrom(t)
Parameters:

tQDateTime

Sets ‘from’ time

setNow(t)
Parameters:

tQDateTime

Sets ‘now’ time

setTime(f, t, n)
Parameters:

Sets the ‘from’, ‘to’ and ‘now’ times

setTo(t)
Parameters:

tQDateTime

Sets ‘to’ time

toString([withDate=true])
Parameters:

withDate – bool

Return type:

str

Returns a QString description of the context.