C# Class Plasma.Applet

Inheritance: Qyoto.QGraphicsWidget, IDisposable
Afficher le fichier Open project: 0xd34df00d/Qross Class Usage Examples

Private Properties

Свойство Type Description
AddAssociatedWidget void
Applet System
ConfigChanged void
ConstraintsEvent void
ContextualActions List
CreateConfigurationInterface void
Destroy void
EventFilter bool
FlushPendingConstraintsEvents void
FocusInEvent void
HoverEnterEvent void
HoverLeaveEvent void
Init void
InitExtenderItem void
IsPopupShowing bool
IsPublished bool
ItemChange QVariant
Lower void
MouseMoveEvent void
PaintInterface void
PaintWindowFrame void
Publish void
Raise void
RemoveAssociatedWidget void
ResizeEvent void
Restore void
RunAssociatedApplication void
Save void
SaveState void
SceneEventFilter bool
SetBusy void
SetImmutability void
SetStatus void
Shape QPainterPath
ShowConfigurationInterface void
SizeHint QSizeF
SizeHint QSizeF
StartupArguments List
Status Plasma.ItemStatus
TimerEvent void
Unpublish void
formFactor Plasma.FormFactor
location Plasma.Location
type int

Méthodes publiques

Méthode Description
Action ( string name ) : Qyoto.QAction Returns the QAction with the given name from our collection
AddAction ( string name, Qyoto.QAction action ) : void Adds the action to our collection under the given name
Applet ( IQGraphicsItem parent ) : System
Applet ( IQGraphicsItem parent, string serviceId ) : System
Applet ( IQGraphicsItem parent, string serviceId, uint appletId ) : System name="parent" the QGraphicsItem this applet is parented to name="serviceId" the name of the .desktop file containing the information about the widget name="appletId" a unique id used to differentiate between multiple instances of the same Applet type
Applet ( IQGraphicsItem parent, string serviceId, uint appletId, List args ) : System name="parent" the QGraphicsItem this applet is parented to name="serviceId" the name of the .desktop file containing the information about the widget name="appletId" a unique id used to differentiate between multiple instances of the same Applet type name="args" a list of strings containing two entries: the service id and the applet id
Applet ( QObject parent, List args ) : System This constructor is to be used with the plugin loading systems found in KPluginInfo and KService. The argument list is expected to have two elements: the KService service ID for the desktop entry and an applet ID which must be a base 10 number. name="parent" a QObject parent; you probably want to pass in 0 name="args" a list of strings containing two entries: the service id and the applet id
AssociatedApplication ( ) : string
AssociatedApplicationUrls ( ) : List
BackgroundHints ( ) : uint
Config ( ) : Kimono.KConfigGroup Returns the KConfigGroup to access the applets configuration. This config object will write to an instance specific config file named \\rc in the Plasma appdata directory.
Config ( string group ) : Kimono.KConfigGroup Returns a config group with the name provided. This ensures that the group name is properly namespaced to avoid collision with other applets that may be sharing this config file name="group" the name of the group to access
ConfigScheme ( ) : Plasma.ConfigLoader Returns the config skeleton object from this applet's package, if any.
Containment ( ) : Containment
Context ( ) : Plasma.Context Returns the workspace context which the applet is operating in
CustomCategories ( ) : List
DataEngine ( string name ) : DataEngine Loads the given DataEngine Tries to load the data engine given by name. Each engine is only loaded once, and that instance is re-used on all subsequent requests. If the data engine was not found, an invalid data engine is returned (see DataEngine.IsValid()). Note that you should not delete the returned engine. name="name" Name of the data engine to load
Destroyed ( ) : bool
Dispose ( ) : void
Font ( ) : QFont
GlobalConfig ( ) : KConfigGroup Returns a KConfigGroup object to be shared by all applets of this type. This config object will write to an applet-specific config object named plasma_\rc in the local config directory.
GlobalShortcut ( ) : KShortcut
HasAuthorization ( string constraint ) : bool Returns true if the applet is allowed to perform functions covered by the given constraint eg. hasAuthorization("FileDialog") returns true if applets are allowed to show filedialogs.
HasValidAssociatedApplication ( ) : bool
Icon ( ) : string Returns the icon related to this applet
IsContainment ( ) : bool
ListAppletInfo ( ) : List
ListAppletInfo ( string category ) : List
ListAppletInfo ( string category, string parentApp ) : List Returns a list of all known applets. name="category" Only applets matchin this category will be returned. Useful in conjunction with knownCategories. If "Misc" is passed in, then applets without a Categories= entry are also returned. If an empty string is passed in, all applets are returned. name="parentApp" the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of string() will result in a list containing only applets not specifically registered to an application.
ListAppletInfoForMimetype ( string mimetype ) : List Returns a list of all known applets associated with a certain mimetype.
ListAppletInfoForUrl ( QUrl url ) : List Returns a list of all known applets associated with a certain URL.
ListCategories ( ) : List
ListCategories ( string parentApp ) : List
ListCategories ( string parentApp, bool visibleOnly ) : List Returns a list of all the categories used by installed applets. name="parentApp" the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of string() will result in a list containing only applets not specifically registered to an application. name="visibleOnly" true if it should only return applets that are marked as visible
Load ( KPluginInfo info ) : Applet
Load ( KPluginInfo info, uint appletId ) : Applet
Load ( KPluginInfo info, uint appletId, List args ) : Applet Attempts to load an applet Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="info" KPluginInfo object for the desired applet name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
Load ( string name ) : Applet
Load ( string name, uint appletId ) : Applet
Load ( string name, uint appletId, List args ) : Applet Attempts to load an applet Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="name" the plugin name, as returned by KPluginInfo.PluginName() name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
LoadPlasmoid ( string path ) : Applet
LoadPlasmoid ( string path, uint appletId ) : Applet
LoadPlasmoid ( string path, uint appletId, List args ) : Applet Attempts to load an applet from a package Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="path" the path to the package name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
MapFromView ( QGraphicsView view, QRect rect ) : QRectF Maps a QRect from a view's coordinates to local coordinates. name="view" the view from which rect should be mapped name="rect" the rect to be mapped
MapToView ( QGraphicsView view, QRectF rect ) : QRect Maps a QRectF from local coordinates to a view's coordinates. name="view" the view to which rect should be mapped name="rect" the rect to be mapped
Package ( ) : Package Accessor for the associated Package object if any. Generally, only Plasmoids come in a Package.
PackageStructure ( ) : Plasma.PackageStructure
PluginName ( ) : string Returns the plugin name for the applet
PopupPosition ( QSize s ) : QPoint Reccomended position for a popup window like a menu or a tooltip given its size name="s" size of the popup
PopupPosition ( QSize s, Qt alignment ) : QPoint name="s" size of the popup name="alignment" alignment of the popup, valid flags are Qt.AlignLeft, Qt.AlignRight and Qt.AlignCenter
ScreenRect ( ) : QRect This method returns screen coordinates for the widget; this method can be somewhat expensive and should ONLY be called when screen coordinates are required. For example when positioning top level widgets on top of the view to create the appearance of unit. This should NOT be used for popups (@see popupPosition) or for normal widget use (use Plasma. widgets or QGraphicsProxyWidget instead).
SetAspectRatioMode ( Plasma arg1 ) : void Sets the preferred aspect ratio mode for placement and resizing
SetAssociatedApplication ( string arg1 ) : void Sets an application associated to this applet, that will be regarded as a full view of what is represented in the applet name="string" the name of the application. it can be
  • a
  • name understood by KService.ServiceByDesktopName (e.g. "konqueror")
  • a
  • command in $PATH
  • or
  • an absolute path to an executable
    SetAssociatedApplicationUrls ( List urls ) : void Sets a list of urls associated to this application, they will be used as parameters for the associated application name="urls"
    SetBackgroundHints ( uint hints ) : void Sets the BackgroundHints for this applet @see BackgroundHint name="hints" the BackgroundHint combination for this applet
    SetCustomCategories ( List categories ) : void Sets the list of custom categories that are used in addition to the default set of categories known to libplasma for Applets. @arg categories a list of categories
    SetGlobalShortcut ( KShortcut shortcut ) : void Sets the global shorcut to associate with this widget.
    UpdateConstraints ( ) : void
    UpdateConstraints ( uint constraints ) : void Called when any of the geometry constraints have been updated. This method calls constraintsEvent, which may be reimplemented, once the Applet has been prepared for updating the constraints. name="constraints" the type of constraints that were updated
    View ( ) : QGraphicsView Returns the view this widget is visible on, or 0 if none can be found. @warning do NOT assume this will always return a view! a null view probably means that either plasma isn't finished loading, or your applet is on an activity that's not being shown anywhere.
    aspectRatioMode ( ) : Plasma.AspectRatioMode
    category ( KPluginInfo applet ) : string Get the category of the given applet name="applet" a KPluginInfo object for the applet
    category ( string appletName ) : string Get the category of the given applet name="appletName" the name of the applet

    Méthodes protégées

    Méthode Description
    Applet ( Type dummy ) : System
    CreateProxy ( ) : void
    Extender ( ) : Extender
    IsRegisteredAsDragHandle ( IQGraphicsItem item ) : bool name="item" the item to look for if it is registered or not
    RegisterAsDragHandle ( IQGraphicsItem item ) : void Register the widgets that manage mouse clicks but you still want to be able to drag the applet around when holding the mouse pointer on that widget. Calling this results in an eventFilter being places on the widget. name="item" the item to watch for mouse move
    SetConfigurationRequired ( bool needsConfiguring ) : void
    SetConfigurationRequired ( bool needsConfiguring, string reason ) : void When the applet needs to be configured before being usable, this method can be called to show a standard interface prompting the user to configure the applet name="needsConfiguring" true if the applet needs to be configured, or false if it doesn't name="reason" a translated message for the user explaining that the applet needs configuring; this should note what needs to be configured
    SetFailedToLaunch ( bool failed ) : void
    SetFailedToLaunch ( bool failed, string reason ) : void Call this method when the applet fails to launch properly. An optional reason can be provided. Not that all children items will be deleted when this method is called. If you have pointers to these items, you will need to reset them after calling this method. name="failed" true when the applet failed, false when it succeeded name="reason" an optional reason to show the user why the applet failed to launch
    ShowMessage ( QIcon icon, string message, uint buttons ) : void Shows a message as an overlay of the applet: the message has an icon, text and (optional) buttons name="icon" the icon that will be shown name="message" the message string that will be shown. If the message is empty nothng will be shown and if there was a message already it will be hidden name="buttons" an OR combination of all the buttons needed
    UnregisterAsDragHandle ( IQGraphicsItem item ) : void Unregister a widget registered with registerAsDragHandle. name="item" the item to unregister

    Private Methods

    Méthode Description
    AddAssociatedWidget ( QWidget widget ) : void
    Applet ( ) : System
    ConfigChanged ( ) : void
    ConstraintsEvent ( uint constraints ) : void
    ContextualActions ( ) : List
    CreateConfigurationInterface ( KConfigDialog parent ) : void
    Destroy ( ) : void
    EventFilter ( QObject o, QEvent e ) : bool
    FlushPendingConstraintsEvents ( ) : void
    FocusInEvent ( QFocusEvent arg1 ) : void
    HoverEnterEvent ( QGraphicsSceneHoverEvent arg1 ) : void
    HoverLeaveEvent ( QGraphicsSceneHoverEvent arg1 ) : void
    Init ( ) : void
    InitExtenderItem ( Plasma item ) : void
    IsPopupShowing ( ) : bool
    IsPublished ( ) : bool
    ItemChange ( QGraphicsItem change, QVariant value ) : QVariant
    Lower ( ) : void
    MouseMoveEvent ( QGraphicsSceneMouseEvent arg1 ) : void
    PaintInterface ( QPainter painter, QStyleOptionGraphicsItem option, QRect contentsRect ) : void
    PaintWindowFrame ( QPainter painter, QStyleOptionGraphicsItem option, QWidget widget ) : void
    Publish ( uint methods, string resourceName ) : void
    Raise ( ) : void
    RemoveAssociatedWidget ( QWidget widget ) : void
    ResizeEvent ( QGraphicsSceneResizeEvent arg1 ) : void
    Restore ( KConfigGroup group ) : void
    RunAssociatedApplication ( ) : void
    Save ( KConfigGroup group ) : void
    SaveState ( KConfigGroup config ) : void
    SceneEventFilter ( IQGraphicsItem watched, QEvent arg2 ) : bool
    SetBusy ( bool busy ) : void
    SetImmutability ( Plasma immutable ) : void
    SetStatus ( Plasma stat ) : void
    Shape ( ) : QPainterPath
    ShowConfigurationInterface ( ) : void
    SizeHint ( Qt which ) : QSizeF
    SizeHint ( Qt which, QSizeF constraint ) : QSizeF
    StartupArguments ( ) : List
    Status ( ) : Plasma.ItemStatus
    TimerEvent ( QTimerEvent arg1 ) : void
    Unpublish ( ) : void
    formFactor ( ) : Plasma.FormFactor
    location ( ) : Plasma.Location
    type ( ) : int

    Method Details

    Action() public méthode

    Returns the QAction with the given name from our collection
    public Action ( string name ) : Qyoto.QAction
    name string
    Résultat Qyoto.QAction

    AddAction() public méthode

    Adds the action to our collection under the given name
    public AddAction ( string name, Qyoto.QAction action ) : void
    name string
    action Qyoto.QAction
    Résultat void

    Applet() public méthode

    public Applet ( IQGraphicsItem parent ) : System
    parent IQGraphicsItem
    Résultat System

    Applet() public méthode

    public Applet ( IQGraphicsItem parent, string serviceId ) : System
    parent IQGraphicsItem
    serviceId string
    Résultat System

    Applet() public méthode

    name="parent" the QGraphicsItem this applet is parented to name="serviceId" the name of the .desktop file containing the information about the widget name="appletId" a unique id used to differentiate between multiple instances of the same Applet type
    public Applet ( IQGraphicsItem parent, string serviceId, uint appletId ) : System
    parent IQGraphicsItem
    serviceId string
    appletId uint
    Résultat System

    Applet() public méthode

    name="parent" the QGraphicsItem this applet is parented to name="serviceId" the name of the .desktop file containing the information about the widget name="appletId" a unique id used to differentiate between multiple instances of the same Applet type name="args" a list of strings containing two entries: the service id and the applet id
    public Applet ( IQGraphicsItem parent, string serviceId, uint appletId, List args ) : System
    parent IQGraphicsItem
    serviceId string
    appletId uint
    args List
    Résultat System

    Applet() public méthode

    This constructor is to be used with the plugin loading systems found in KPluginInfo and KService. The argument list is expected to have two elements: the KService service ID for the desktop entry and an applet ID which must be a base 10 number. name="parent" a QObject parent; you probably want to pass in 0 name="args" a list of strings containing two entries: the service id and the applet id
    public Applet ( QObject parent, List args ) : System
    parent Qyoto.QObject
    args List
    Résultat System

    Applet() protected méthode

    protected Applet ( Type dummy ) : System
    dummy System.Type
    Résultat System

    AssociatedApplication() public méthode

    public AssociatedApplication ( ) : string
    Résultat string

    AssociatedApplicationUrls() public méthode

    public AssociatedApplicationUrls ( ) : List
    Résultat List

    BackgroundHints() public méthode

    public BackgroundHints ( ) : uint
    Résultat uint

    Config() public méthode

    Returns the KConfigGroup to access the applets configuration. This config object will write to an instance specific config file named \\rc in the Plasma appdata directory.
    public Config ( ) : Kimono.KConfigGroup
    Résultat Kimono.KConfigGroup

    Config() public méthode

    Returns a config group with the name provided. This ensures that the group name is properly namespaced to avoid collision with other applets that may be sharing this config file name="group" the name of the group to access
    public Config ( string group ) : Kimono.KConfigGroup
    group string
    Résultat Kimono.KConfigGroup

    ConfigScheme() public méthode

    Returns the config skeleton object from this applet's package, if any.
    public ConfigScheme ( ) : Plasma.ConfigLoader
    Résultat Plasma.ConfigLoader

    Containment() public méthode

    public Containment ( ) : Containment
    Résultat Containment

    Context() public méthode

    Returns the workspace context which the applet is operating in
    public Context ( ) : Plasma.Context
    Résultat Plasma.Context

    CreateProxy() protected méthode

    protected CreateProxy ( ) : void
    Résultat void

    CustomCategories() public méthode

    public CustomCategories ( ) : List
    Résultat List

    DataEngine() public méthode

    Loads the given DataEngine Tries to load the data engine given by name. Each engine is only loaded once, and that instance is re-used on all subsequent requests. If the data engine was not found, an invalid data engine is returned (see DataEngine.IsValid()). Note that you should not delete the returned engine. name="name" Name of the data engine to load
    public DataEngine ( string name ) : DataEngine
    name string
    Résultat DataEngine

    Destroyed() public méthode

    public Destroyed ( ) : bool
    Résultat bool

    Dispose() public méthode

    public Dispose ( ) : void
    Résultat void

    Extender() protected méthode

    protected Extender ( ) : Extender
    Résultat Extender

    Font() public méthode

    public Font ( ) : QFont
    Résultat QFont

    GlobalConfig() public méthode

    Returns a KConfigGroup object to be shared by all applets of this type. This config object will write to an applet-specific config object named plasma_\rc in the local config directory.
    public GlobalConfig ( ) : KConfigGroup
    Résultat KConfigGroup

    GlobalShortcut() public méthode

    public GlobalShortcut ( ) : KShortcut
    Résultat KShortcut

    HasAuthorization() public méthode

    Returns true if the applet is allowed to perform functions covered by the given constraint eg. hasAuthorization("FileDialog") returns true if applets are allowed to show filedialogs.
    public HasAuthorization ( string constraint ) : bool
    constraint string
    Résultat bool

    HasValidAssociatedApplication() public méthode

    public HasValidAssociatedApplication ( ) : bool
    Résultat bool

    Icon() public méthode

    Returns the icon related to this applet
    public Icon ( ) : string
    Résultat string

    IsContainment() public méthode

    public IsContainment ( ) : bool
    Résultat bool

    IsRegisteredAsDragHandle() protected méthode

    name="item" the item to look for if it is registered or not
    protected IsRegisteredAsDragHandle ( IQGraphicsItem item ) : bool
    item IQGraphicsItem
    Résultat bool

    ListAppletInfo() public static méthode

    public static ListAppletInfo ( ) : List
    Résultat List

    ListAppletInfo() public static méthode

    public static ListAppletInfo ( string category ) : List
    category string
    Résultat List

    ListAppletInfo() public static méthode

    Returns a list of all known applets. name="category" Only applets matchin this category will be returned. Useful in conjunction with knownCategories. If "Misc" is passed in, then applets without a Categories= entry are also returned. If an empty string is passed in, all applets are returned. name="parentApp" the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of string() will result in a list containing only applets not specifically registered to an application.
    public static ListAppletInfo ( string category, string parentApp ) : List
    category string
    parentApp string
    Résultat List

    ListAppletInfoForMimetype() public static méthode

    Returns a list of all known applets associated with a certain mimetype.
    public static ListAppletInfoForMimetype ( string mimetype ) : List
    mimetype string
    Résultat List

    ListAppletInfoForUrl() public static méthode

    Returns a list of all known applets associated with a certain URL.
    public static ListAppletInfoForUrl ( QUrl url ) : List
    url QUrl
    Résultat List

    ListCategories() public static méthode

    public static ListCategories ( ) : List
    Résultat List

    ListCategories() public static méthode

    public static ListCategories ( string parentApp ) : List
    parentApp string
    Résultat List

    ListCategories() public static méthode

    Returns a list of all the categories used by installed applets. name="parentApp" the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of string() will result in a list containing only applets not specifically registered to an application. name="visibleOnly" true if it should only return applets that are marked as visible
    public static ListCategories ( string parentApp, bool visibleOnly ) : List
    parentApp string
    visibleOnly bool
    Résultat List

    Load() public static méthode

    public static Load ( KPluginInfo info ) : Applet
    info KPluginInfo
    Résultat Applet

    Load() public static méthode

    public static Load ( KPluginInfo info, uint appletId ) : Applet
    info KPluginInfo
    appletId uint
    Résultat Applet

    Load() public static méthode

    Attempts to load an applet Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="info" KPluginInfo object for the desired applet name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
    public static Load ( KPluginInfo info, uint appletId, List args ) : Applet
    info KPluginInfo
    appletId uint
    args List
    Résultat Applet

    Load() public static méthode

    public static Load ( string name ) : Applet
    name string
    Résultat Applet

    Load() public static méthode

    public static Load ( string name, uint appletId ) : Applet
    name string
    appletId uint
    Résultat Applet

    Load() public static méthode

    Attempts to load an applet Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="name" the plugin name, as returned by KPluginInfo.PluginName() name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
    public static Load ( string name, uint appletId, List args ) : Applet
    name string
    appletId uint
    args List
    Résultat Applet

    LoadPlasmoid() public static méthode

    public static LoadPlasmoid ( string path ) : Applet
    path string
    Résultat Applet

    LoadPlasmoid() public static méthode

    public static LoadPlasmoid ( string path, uint appletId ) : Applet
    path string
    appletId uint
    Résultat Applet

    LoadPlasmoid() public static méthode

    Attempts to load an applet from a package Returns a pointer to the applet if successful. The caller takes responsibility for the applet, including deleting it when no longer needed. name="path" the path to the package name="appletId" unique ID to assign the applet, or zero to have one assigned automatically. name="args" to send the applet extra arguments
    public static LoadPlasmoid ( string path, uint appletId, List args ) : Applet
    path string
    appletId uint
    args List
    Résultat Applet

    MapFromView() public méthode

    Maps a QRect from a view's coordinates to local coordinates. name="view" the view from which rect should be mapped name="rect" the rect to be mapped
    public MapFromView ( QGraphicsView view, QRect rect ) : QRectF
    view QGraphicsView
    rect QRect
    Résultat QRectF

    MapToView() public méthode

    Maps a QRectF from local coordinates to a view's coordinates. name="view" the view to which rect should be mapped name="rect" the rect to be mapped
    public MapToView ( QGraphicsView view, QRectF rect ) : QRect
    view QGraphicsView
    rect QRectF
    Résultat QRect

    Package() public méthode

    Accessor for the associated Package object if any. Generally, only Plasmoids come in a Package.
    public Package ( ) : Package
    Résultat Package

    PackageStructure() public static méthode

    public static PackageStructure ( ) : Plasma.PackageStructure
    Résultat Plasma.PackageStructure

    PluginName() public méthode

    Returns the plugin name for the applet
    public PluginName ( ) : string
    Résultat string

    PopupPosition() public méthode

    Reccomended position for a popup window like a menu or a tooltip given its size name="s" size of the popup
    public PopupPosition ( QSize s ) : QPoint
    s QSize
    Résultat QPoint

    PopupPosition() public méthode

    name="s" size of the popup name="alignment" alignment of the popup, valid flags are Qt.AlignLeft, Qt.AlignRight and Qt.AlignCenter
    public PopupPosition ( QSize s, Qt alignment ) : QPoint
    s QSize
    alignment Qt
    Résultat QPoint

    RegisterAsDragHandle() protected méthode

    Register the widgets that manage mouse clicks but you still want to be able to drag the applet around when holding the mouse pointer on that widget. Calling this results in an eventFilter being places on the widget. name="item" the item to watch for mouse move
    protected RegisterAsDragHandle ( IQGraphicsItem item ) : void
    item IQGraphicsItem
    Résultat void

    ScreenRect() public méthode

    This method returns screen coordinates for the widget; this method can be somewhat expensive and should ONLY be called when screen coordinates are required. For example when positioning top level widgets on top of the view to create the appearance of unit. This should NOT be used for popups (@see popupPosition) or for normal widget use (use Plasma. widgets or QGraphicsProxyWidget instead).
    public ScreenRect ( ) : QRect
    Résultat QRect

    SetAspectRatioMode() public méthode

    Sets the preferred aspect ratio mode for placement and resizing
    public SetAspectRatioMode ( Plasma arg1 ) : void
    arg1 Plasma
    Résultat void

    SetAssociatedApplication() public méthode

    Sets an application associated to this applet, that will be regarded as a full view of what is represented in the applet name="string" the name of the application. it can be
  • a
  • name understood by KService.ServiceByDesktopName (e.g. "konqueror")
  • a
  • command in $PATH
  • or
  • an absolute path to an executable
    public SetAssociatedApplication ( string arg1 ) : void
    arg1 string
    Résultat void

    SetAssociatedApplicationUrls() public méthode

    Sets a list of urls associated to this application, they will be used as parameters for the associated application name="urls"
    public SetAssociatedApplicationUrls ( List urls ) : void
    urls List
    Résultat void

    SetBackgroundHints() public méthode

    Sets the BackgroundHints for this applet @see BackgroundHint name="hints" the BackgroundHint combination for this applet
    public SetBackgroundHints ( uint hints ) : void
    hints uint
    Résultat void

    SetConfigurationRequired() protected méthode

    protected SetConfigurationRequired ( bool needsConfiguring ) : void
    needsConfiguring bool
    Résultat void

    SetConfigurationRequired() protected méthode

    When the applet needs to be configured before being usable, this method can be called to show a standard interface prompting the user to configure the applet name="needsConfiguring" true if the applet needs to be configured, or false if it doesn't name="reason" a translated message for the user explaining that the applet needs configuring; this should note what needs to be configured
    protected SetConfigurationRequired ( bool needsConfiguring, string reason ) : void
    needsConfiguring bool
    reason string
    Résultat void

    SetCustomCategories() public méthode

    Sets the list of custom categories that are used in addition to the default set of categories known to libplasma for Applets. @arg categories a list of categories
    public SetCustomCategories ( List categories ) : void
    categories List
    Résultat void

    SetFailedToLaunch() protected méthode

    protected SetFailedToLaunch ( bool failed ) : void
    failed bool
    Résultat void

    SetFailedToLaunch() protected méthode

    Call this method when the applet fails to launch properly. An optional reason can be provided. Not that all children items will be deleted when this method is called. If you have pointers to these items, you will need to reset them after calling this method. name="failed" true when the applet failed, false when it succeeded name="reason" an optional reason to show the user why the applet failed to launch
    protected SetFailedToLaunch ( bool failed, string reason ) : void
    failed bool
    reason string
    Résultat void

    SetGlobalShortcut() public méthode

    Sets the global shorcut to associate with this widget.
    public SetGlobalShortcut ( KShortcut shortcut ) : void
    shortcut KShortcut
    Résultat void

    ShowMessage() protected méthode

    Shows a message as an overlay of the applet: the message has an icon, text and (optional) buttons name="icon" the icon that will be shown name="message" the message string that will be shown. If the message is empty nothng will be shown and if there was a message already it will be hidden name="buttons" an OR combination of all the buttons needed
    protected ShowMessage ( QIcon icon, string message, uint buttons ) : void
    icon QIcon
    message string
    buttons uint
    Résultat void

    UnregisterAsDragHandle() protected méthode

    Unregister a widget registered with registerAsDragHandle. name="item" the item to unregister
    protected UnregisterAsDragHandle ( IQGraphicsItem item ) : void
    item IQGraphicsItem
    Résultat void

    UpdateConstraints() public méthode

    public UpdateConstraints ( ) : void
    Résultat void

    UpdateConstraints() public méthode

    Called when any of the geometry constraints have been updated. This method calls constraintsEvent, which may be reimplemented, once the Applet has been prepared for updating the constraints. name="constraints" the type of constraints that were updated
    public UpdateConstraints ( uint constraints ) : void
    constraints uint
    Résultat void

    View() public méthode

    Returns the view this widget is visible on, or 0 if none can be found. @warning do NOT assume this will always return a view! a null view probably means that either plasma isn't finished loading, or your applet is on an activity that's not being shown anywhere.
    public View ( ) : QGraphicsView
    Résultat QGraphicsView

    aspectRatioMode() public méthode

    public aspectRatioMode ( ) : Plasma.AspectRatioMode
    Résultat Plasma.AspectRatioMode

    category() public static méthode

    Get the category of the given applet name="applet" a KPluginInfo object for the applet
    public static category ( KPluginInfo applet ) : string
    applet KPluginInfo
    Résultat string

    category() public static méthode

    Get the category of the given applet name="appletName" the name of the applet
    public static category ( string appletName ) : string
    appletName string
    Résultat string