org.kde.koala
public class KPanelApplet extends QFrame
extern "C" { KPanelApplet init(QWidget parent, String configFile) { KGlobal.locale().insertCatalogue("exampleapplet"); return new ExampleApplet(configFile, KPanelApplet.Normal, KPanelApplet.About | KPanelApplet.Help | KPanelApplet.Preferences, parent, "exampleapplet"); } }Note: Don't change the factory function signature or the panel will fail to load your applet. See KPanelAppletSignals for signals emitted by KPanelApplet
UNKNOWN: %KDE Panel Applet class.
Field Summary | |
---|---|
static int | About
This enum holds flags which can be ORed together to describe
which items the context menu over the applet handle contains. |
static int | Center |
static int | Down |
static int | Help |
static int | Left |
static int | LeftTop |
static int | Normal
This enum describes the type of the applet. |
static int | pBottom |
static int | pLeft |
static int | pRight |
static int | pTop |
static int | Preferences |
static int | ReportBug |
static int | Right |
static int | RightBottom |
static int | Stretch |
static int | Up |
Constructor Summary | |
---|---|
protected | KPanelApplet(Class dummy) |
KPanelApplet(String configFile, int t, int actions, QWidget parent, String name, int f)
Constructs a KPanelApplet just like any other widget. | |
KPanelApplet(String configFile, int t, int actions, QWidget parent, String name) | |
KPanelApplet(String configFile, int t, int actions, QWidget parent) | |
KPanelApplet(String configFile, int t, int actions) | |
KPanelApplet(String configFile, int t) | |
KPanelApplet(String configFile) |
Method Summary | |
---|---|
protected void | about()
Is called when the user selects "About" from the applet's RMB menu.
|
void | action(int a)
Generic action dispatcher. |
int | actions() |
protected int | alignment() |
protected void | alignmentChange(int arg1)
The panel on which this applet resides has changed its alignment.
|
String | className() |
KConfig | config()
Always use this KConfig object to save/load your applet's configuration.
|
QPopupMenu | customMenu() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
boolean | eventFilter(QObject arg1, QEvent arg2) |
protected void | finalize() Deletes the wrapped C++ instance |
int | heightForWidth(int width)
Every applet should reimplement this function.
|
protected void | help()
Is called when the user selects "Help" from the applet's RMB menu.
|
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
QMetaObject | metaObject() |
protected void | needsFocus(boolean focus)
Call this whenever focus is needed or not needed. |
protected int | orientation() |
protected int | popupDirection()
A convenience method that translates the position of the applet into which
direction to show a popup. |
protected int | position() |
protected void | positionChange(int p)
The panel on which this applet resides has changed its position.
|
protected void | preferences()
Is called when the user selects "Preferences" from the applet's RMB menu.
|
protected void | reportBug()
Is called when the user selects "Report bug" from the applet's RMB menu.
|
void | setAlignment(int a) |
protected void | setCustomMenu(QPopupMenu arg1)
Use this method to set the custom menu for this applet so that it can be shown
in the applet handle menu and other appropriate places that the applet many not itself
be aware of. |
void | setPosition(int p) |
int | type() |
protected void | watchForFocus(QWidget widget, boolean watch)
Register widgets that can receive keyboard focus with this this method
This call results in an eventFilter being places on the widget. |
protected void | watchForFocus(QWidget widget) |
int | widthForHeight(int height)
Returns a suggested width for a given height.
|
UNKNOWN: This enum holds flags which can be ORed together to describe which items the context menu over the applet handle contains.
UNKNOWN: This enum describes the type of the applet.
Parameters: configFile The configFile handed over in the factory function. t The applet type(). actions Standard RMB menu actions supported by the applet (see action() ). parent The pointer to the parent widget handed over in the factory function. name A Qt object name for your applet. f Window control flags
UNKNOWN: Constructs a KPanelApplet just like any other widget.
UNKNOWN: Is called when the user selects "About" from the applet's RMB menu.
UNKNOWN: Generic action dispatcher.
Returns: int indicating the supported RMB menu actions. Action
UNKNOWN:
Returns: the applet's alignment. (top/left, center, or bottom/right)
UNKNOWN:
UNKNOWN: The panel on which this applet resides has changed its alignment.
UNKNOWN: Always use this KConfig object to save/load your applet's configuration.
Returns: the applet's custom menu, usually the same as the context menu, or 0 if none see setCustomMenu(QPopupMenu*)
UNKNOWN:
width
equal to 'the fixed applet width'
when laying out the applets.
The applet can now choose the other size component (height)
based on the given width.
The height you return is granted.Returns: A suggested height for a given width.
UNKNOWN:
UNKNOWN: Is called when the user selects "Help" from the applet's RMB menu.
Parameters: focus whether to or not to request focus
UNKNOWN: Call this whenever focus is needed or not needed.
Returns: the applet's orientation. (horizontal or vertical)
UNKNOWN:
UNKNOWN: A convenience method that translates the position of the applet into which direction to show a popup.
Returns: the applet's position. (top, left, bottom, or right)
UNKNOWN:
UNKNOWN: The panel on which this applet resides has changed its position.
UNKNOWN: Is called when the user selects "Preferences" from the applet's RMB menu.
UNKNOWN: Is called when the user selects "Report bug" from the applet's RMB menu.
UNKNOWN:
UNKNOWN: Use this method to set the custom menu for this applet so that it can be shown in the applet handle menu and other appropriate places that the applet many not itself be aware of.
UNKNOWN:
Returns: Type indicating the applet's type. Type
UNKNOWN:
Parameters: widget the widget to watch for keyboard focus watch whether to start watching the widget, or to stop doing so
UNKNOWN: Register widgets that can receive keyboard focus with this this method This call results in an eventFilter being places on the widget.
height
equal to 'the fixed applet height'
when laying out the applets.
The applet can now choose the other size component (width)
based on the given height.
The width you return is granted.UNKNOWN: Returns a suggested width for a given height.