GimpUi.UnitStore

g GObject.GInterface GObject.GInterface Gtk.TreeModel Gtk.TreeModel GObject.GInterface->Gtk.TreeModel GObject.Object GObject.Object GimpUi.UnitStore GimpUi.UnitStore GObject.Object->GimpUi.UnitStore Gtk.TreeModel->GimpUi.UnitStore

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gtk.TreeModel (28)

Structs:

GObject.ObjectClass (5)

class

new (num_values)

get_has_percent ()

get_has_pixels ()

get_nth_value (unit, index)

set_has_percent (has_percent)

set_has_pixels (has_pixels)

set_pixel_value (index, value)

set_resolution (index, resolution)

Virtual Methods

Inherited:

GObject.Object (7), Gtk.TreeModel (19)

Properties

Name

Type

Flags

Short Description

has-percent

bool

r/w

Whether the store has Gimp.UnitID.PERCENT

has-pixels

bool

r/w

Whether the store has GIMP_UNIT_PIXELS

long-format

str

r/w

Format string for a long label

num-values

int

r/w/co

The number of values this store provides

short-format

str

r/w

Format string for a short label

Signals

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Fields

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GimpUi.UnitStore(**kwargs)
Bases:

GObject.Object, Gtk.TreeModel

Abstract:

No

Structure:

GimpUi.UnitStoreClass

A model for Gimp.Unit views

classmethod new(num_values)
Parameters:

num_values (int) –

Return type:

GimpUi.UnitStore

get_has_percent()
Return type:

bool

get_has_pixels()
Return type:

bool

get_nth_value(unit, index)
Parameters:
Return type:

float

set_has_percent(has_percent)
Parameters:

has_percent (bool) –

set_has_pixels(has_pixels)
Parameters:

has_pixels (bool) –

set_pixel_value(index, value)
Parameters:
set_resolution(index, resolution)
Parameters:
  • index (int) –

  • resolution (float) –

Property Details

GimpUi.UnitStore.props.has_percent
Name:

has-percent

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the store has Gimp.UnitID.PERCENT

GimpUi.UnitStore.props.has_pixels
Name:

has-pixels

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether the store has GIMP_UNIT_PIXELS

GimpUi.UnitStore.props.long_format
Name:

long-format

Type:

str

Default Value:

'%n'

Flags:

READABLE, WRITABLE

Format string for a long label

GimpUi.UnitStore.props.num_values
Name:

num-values

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The number of values this store provides

GimpUi.UnitStore.props.short_format
Name:

short-format

Type:

str

Default Value:

'%a'

Flags:

READABLE, WRITABLE

Format string for a short label