Class

PhoshQuickSetting

[]

Description [src]

class Phosh.QuickSetting : Gtk.Box
  implements Atk.ImplementorIface, Gtk.Buildable, Gtk.Orientable {
  /* No available fields */
}

A PhoshQuickSetting represents a state of an entity (like Wi-Fi, Bluetooth) using an icon and label. It should be added to a PhoshQuickSettingsBox for better integration.

A quick-setting displays the state using an icon and label. The state is set by PhoshStatusIcon, which must be set as a PhoshQuickSetting:status-icon. It can also have a status-page, which can be used to expose additional features. For example, a Wi-Fi quick-setting can show available Wi-Fi hotspots as an extra option. When a status widget is set, the quick-setting displays an arrow at the right end.

A quick-setting itself does not have any provision to display its status-page. It is completely upto the user to display and hide the status-pages as required. However the quick-setting can aid in the task with its PhoshQuickSetting:showing-status property. When showing-status is false, clicking the arrow will cause the quick-setting to emit PhoshQuickSetting::show-status. If showing-status is true, then it will emit PhoshQuickSetting::hide-status. The user of the quick-setting is expected to follow this convention and set showing-status based on whether they are displaying the status-page or not.

A quick-setting might be temporarily prevented from showing its status-page using PhoshQuickSetting:can-show-status. Again, PhoshQuickSettingsBox can take care of this property, such that once you tell the box if showing status-page is allowed, it will ensure that the children’s can-show-status are synchronized with it.

A quick-setting can be in an active or inactive state. However clicking the quick-setting does not toggle its state. The user must set the state using PhoshQuickSetting:active. If the status-icon PhoshStatusIcon has an enabled property it will be automatically bound to the PhoshQuickSetting:active property.

When a quick-setting is clicked, PhoshQuickSetting::clicked is emitted. When it is long-pressed or right-clicked, PhoshQuickSetting::long-pressed is emitted.

The common usecase of long-pressed is to launch an action (like settings.launch-panel). So to avoid duplicating this process for each quick-setting, the user can set PhoshQuickSetting:long-press-action-name and PhoshQuickSetting:long-press-action-target. The quick-setting then launches that appropriate action.

[]

Constructors

phosh_quick_setting_new
No description available.

[]

Instance methods

phosh_quick_setting_get_active
No description available.

phosh_quick_setting_get_can_show_status
No description available.

phosh_quick_setting_get_showing_status
No description available.

phosh_quick_setting_get_status_icon

Get the current status-icon of the quick-setting.

phosh_quick_setting_get_status_page

Get the current status widget of the quick-setting.

phosh_quick_setting_set_active
No description available.

phosh_quick_setting_set_can_show_status
No description available.

phosh_quick_setting_set_showing_status
No description available.

phosh_quick_setting_set_status_icon

Set the status-icon of the quick-setting. Use NULL to remove existing icon.

phosh_quick_setting_set_status_page

Set the status-page of the quick-setting.

Methods inherited from GtkBox (13)
Methods inherited from GtkContainer (33)
Methods inherited from GtkWidget (263)
Methods inherited from GObject (43)
Methods inherited from GtkBuildable (10)
Methods inherited from GtkOrientable (2)
[]

Properties

Phosh.QuickSetting:active

The active state of the child.

Phosh.QuickSetting:can-show-status

If the child can display its status.

Phosh.QuickSetting:long-press-action-name

Action name to trigger on long-press.

Phosh.QuickSetting:long-press-action-target

Action target for long-press-action-name.

Phosh.QuickSetting:showing-status

If the child is displaying its status.

Phosh.QuickSetting:status-icon

The status-icon.

Phosh.QuickSetting:status-page

The status-page.

Properties inherited from GtkBox (3)
Properties inherited from GtkContainer (3)
Properties inherited from GtkWidget (39)
Properties inherited from GtkOrientable (1)
[]

Signals

Phosh.QuickSetting::clicked
No description available.

Phosh.QuickSetting::hide-status
No description available.

Phosh.QuickSetting::long-pressed
No description available.

Phosh.QuickSetting::show-status
No description available.

Signals inherited from GtkContainer (4)
Signals inherited from GtkWidget (69)
Signals inherited from GObject (1)

Class structure