AppStream.Category

g AppStream.Category AppStream.Category GObject.Object GObject.Object GObject.Object->AppStream.Category

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_child (subcat)

add_component (cpt)

add_desktop_group (group_name)

get_children ()

get_components ()

get_desktop_groups ()

get_icon ()

get_id ()

get_name ()

get_summary ()

has_children ()

has_component (cpt)

remove_child (subcat)

set_icon (value)

set_id (id)

set_name (value)

set_summary (value)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

children

int

r

children

icon

str

r/w

icon

id

str

r/w

id

name

str

r/w

name

summary

str

r

summary

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStream.Category(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.CategoryClass

classmethod new()
Returns:

a new AppStream.Category

Return type:

AppStream.Category

Creates a new AppStream.Category.

add_child(subcat)
Parameters:

subcat (AppStream.Category) – A subcategory to add.

Add a subcategory to this category.

add_component(cpt)
Parameters:

cpt (AppStream.Component) – The AppStream.Component to add.

Add a component to this category.

add_desktop_group(group_name)
Parameters:

group_name (str) – A subcategory to add.

Add a desktop-file category to this AppStream.Category.

get_children()
Returns:

A list of subcategories.

Return type:

[AppStream.Category]

get_components()
Returns:

List of AppStream.Category

Return type:

[AppStream.Component]

Get list of components which have been sorted into this category.

get_desktop_groups()
Returns:

A list of desktop-file categories.

Return type:

[str]

get_icon()
Return type:

str

Get the stock icon name for this category.

get_id()
Return type:

str

Get the ID of this category.

get_name()
Return type:

str

Get the name of this category.

get_summary()
Return type:

str

Get the summary (short description) of this category.

has_children()
Returns:

True if this category has any subcategory

Return type:

bool

Test for sub-categories.

has_component(cpt)
Parameters:

cpt (AppStream.Component) – The AppStream.Component to look for.

Returns:

True if the component is present.

Return type:

bool

Check if the exact AppStream.Component cpt is a member of this category already.

remove_child(subcat)
Parameters:

subcat (AppStream.Category) – A subcategory to remove.

Drop a subcategory from this AppStream.Category.

set_icon(value)
Parameters:

value (str) –

Set the stock icon name for this category.

set_id(id)
Parameters:

id (str) –

Set the ID of this category.

set_name(value)
Parameters:

value (str) –

Set the name of this category.

set_summary(value)
Parameters:

value (str) – A new short summary of this category.

Get the summary (short description) of this category.

Property Details

AppStream.Category.props.children
Name:

children

Type:

int

Default Value:

None

Flags:

READABLE

children

AppStream.Category.props.icon
Name:

icon

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

icon

AppStream.Category.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

id

AppStream.Category.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

name

AppStream.Category.props.summary
Name:

summary

Type:

str

Default Value:

None

Flags:

READABLE

summary