Home · All Namespaces · All Classes · Main Classes |
Brief is the descriptor used for constructing the buttons that launches the applet. More...
#include <dcpbrief.h>
Signals | |
void | valuesChanged () |
void | activateSignal () |
Public Member Functions | |
virtual | ~DcpBrief () |
virtual int | widgetTypeID () const |
This method tell what kind of Brief Widget the applet needs. | |
virtual QString | valueText () const |
returns the value that is to be displayed on second line | |
virtual QString | icon () const |
virtual QString | toggleIconId () const |
virtual Qt::Alignment | align () const |
virtual bool | toggle () const |
Returns the initial state of the toggle in the brief widget. | |
virtual void | setToggle (bool toggle) |
Gets called when toggle state changes. | |
virtual QString | image () const |
returns the file name for the image in the brief widget | |
void | activate () |
Sends the activateSignal() signal to activate the applet. | |
virtual QString | titleText () const |
virtual QString | helpId () const |
virtual int | minValue () const |
virtual int | maxValue () const |
virtual int | sliderSteps () const |
virtual void | setValue (const QVariant &value) |
virtual QVariant | value () const |
Brief is the descriptor used for constructing the buttons that launches the applet.
These buttons are displaying the applet name and the current value. Value must be provided and formatted by the applet implementation. Clicking on this widget displays the applet itself This class provides all the information from which a widget describing above can be constructed.
DcpBrief::~DcpBrief | ( | ) | [virtual] |
void DcpBrief::activate | ( | ) |
Sends the activateSignal() signal to activate the applet.
void DcpBrief::activateSignal | ( | ) | [signal] |
The applet can activate itself by sending this signal. The control panel will start up the applet the same way it is activated when the user clicked on the brief widget.
Qt::Alignment DcpBrief::align | ( | ) | const [virtual] |
QString DcpBrief::helpId | ( | ) | const [virtual] |
If the applet has a help, it can override this function and return the id, so controlpanel can put a help button next to its briefview.
By default it is null, so there is no help button.
QString DcpBrief::icon | ( | ) | const [virtual] |
If the applet provides this virtual function the returned string will be used as an icon name to set the image in the brief representing the applet. The icon will be refreshed when the valuesChanged() signal is emitted.
Please note that the image() method overrides this one, if the applet provides an image file name, the icon name will not be used.
QString DcpBrief::image | ( | ) | const [virtual] |
returns the file name for the image in the brief widget
If the applet provides this function the return value will be used as a filename, to load the image shown in the brief widget representing the plugin. The image will be refreshed when the valuesChanged() signal is emitted.
This method overrides the icon() method.
int DcpBrief::maxValue | ( | ) | const [virtual] |
Returns the maximum integer value allowed It is used when brief has a slider Default is 100
int DcpBrief::minValue | ( | ) | const [virtual] |
Returns the minimum integer value allowed It is used when brief has a slider Default is 0
void DcpBrief::setToggle | ( | bool | toggle | ) | [virtual] |
Gets called when toggle state changes.
If the widget type is toggle, and the user changes the toggle button state, this function will be called, so that the applet can handle the setting change.
toggle | The new state |
void DcpBrief::setValue | ( | const QVariant & | value | ) | [virtual] |
sets simple value of an applet It is used currently for the slider to receive its new position if the user changes it. Do not emit valuesChanged() from this function, as the value change has already been noticed by controlpanel.
int DcpBrief::sliderSteps | ( | ) | const [virtual] |
Returns the steps of the slider It is used when brief has a slider For details, see MSlider::steps() Default is 0
QString DcpBrief::titleText | ( | ) | const [virtual] |
By redefining this function you specify the title text for the brief view of the applet.
The other option is to leave this default and specify your title text in the desktop file.
bool DcpBrief::toggle | ( | ) | const [virtual] |
Returns the initial state of the toggle in the brief widget.
If the widget type is toggle, then this function returns the initial state of the toggle button. The default value is false.
QString DcpBrief::toggleIconId | ( | ) | const [virtual] |
QVariant DcpBrief::value | ( | ) | const [virtual] |
returns simple value of an applet It is used currently for the slider to return its current position. The applet should emit valuesChanged() if the value changes and the slider has to be updated.
void DcpBrief::valuesChanged | ( | ) | [signal] |
Should be emitted when some of the values changed. Causes the widget to be refreshed with current values.
QString DcpBrief::valueText | ( | ) | const [virtual] |
returns the value that is to be displayed on second line
Value should be formatted properly as the user should see it. For example language code can be formatted with MLocale or the current time that comes from the system
int DcpBrief::widgetTypeID | ( | ) | const [virtual] |
This method tell what kind of Brief Widget the applet needs.
Returns the brief widget type code for the plugin variant. This value can also defined in the desktop file using the "DCP/WidgetType" key. If none of these specified the "DcpWidgetType::Label" will be used as default.
FIXME: If we are defining all the acceptable IDs the return value of this function should be an enum.
Default implementation of the widgetTypeID() virtual function. This function should return an invalid value so that we know that we should search the desktop file for a textual representation of the required widget type.
Copyright © 2009 Nokia Corporation | Generated on Tue Jul 5 2011 15:01:31 Doxygen 1.7.1 |
Meego control panel |