- Don’t call updateGeometry() during a size constraintsEvent and don’t call resize.
If you want to keep the same aspect ratio you may be interested in Applet::setAspectRatioMode( ). - If you want to write a new clock widget, you should inherit from libplasmaclock ClockApplet.
- Don’t do custom things: use default plasma methods and widgets when possible.
Some useful methods are: Applet::setBusy( ) if your applet is busy, Applet::setConfigurationRequired( ) if user needs to configure the widget, etc…
Some useful widgets are: Plasma::CheckBox, Plasma::ComboBox, Plasma::LineEdit, Plasma::PushButton, Plasma::RadioButton, etc… - Don’t reimplement Applet::showConfigurationInterface, reimplement Applet::createConfigurationInterface instead.
void MyApplet:createConfigurationInterface(KConfigDialog *parent)
{
QWidget *widget = new QWidget();
ui.setupUi(widget); //ui is your configuration interface
parent->addPage(widget, i18n("General"), icon());
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
}
- Use Plasma::Animator and fast animations (not slower than 150 milliseconds).
- Use a standard background when possible.
- Avoid installing custom svg graphics when possible.
- Load graphics using Plasma::Svg.
- Don’t forget that the theme may change while your widget is running.
- paintInterface() might be called before init().
Monthly Archives: January 2009
Camp KDE (Day 6)
Camp KDE (Day 5)
Camp KDE (Day 4)
Camp KDE (Day 3)
Thanks to Adrian and to The French Guy for making cookies 😀
Camp KDE :D
Camp KDE is great! 😀