CinnamonDesktop.WallClock¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|||
r/w |
The string to format the clock to |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_object |
r |
Class Details¶
- class CinnamonDesktop.WallClock(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod lctime_format(gettext_domain, format_string)¶
- Parameters:
- Returns:
The translated format string.
- Return type:
Returns the translation of the format string according to the LC_TIME locale.
- classmethod new()¶
- Returns:
A pointer to a new
CinnamonDesktop.WallClock
instance.- Return type:
Returns a new
CinnamonDesktop.WallClock
instance
- get_clock()¶
- Returns:
The formatted date/time string.
- Return type:
Returns a formatted date and time based on either default format settings, or via a custom-set format string.
The returned string should be ready to be set on a label.
- get_clock_for_format(format_string)¶
- Parameters:
format_string (
str
) –- Returns:
The formatted date/time string, or
None
if there was a problem with the format string.- Return type:
Returns a formatted date and time based on the provided format string. The returned string should be ready to be set on a label.
- get_default_date_format()¶
- Returns:
The default date format string.
- Return type:
Returns the current date-only format based on current locale defaults and clock settings.
- get_default_time_format()¶
- Returns:
The default time format string.
- Return type:
Returns the current time-only format based on current locale defaults and clock settings.
- set_format_string(format_string)¶
- Parameters:
- Returns:
Whether or not the format string was valid and accepted.
- Return type:
Sets the wall clock to use the provided format string for any subsequent updates. Passing
None
will un-set any custom format, and rely on a default locale format.Any invalid format string passed will cause it to be ignored, and the default locale format used instead.
Property Details¶
- CinnamonDesktop.WallClock.props.clock¶
-
A formatted string representing the current clock display.