mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
plasma: call the base class init() method
Plasma::Applet::init() marks the applets as movable items for example Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6ff89abb0f
commit
ebde34f06c
20 changed files with 39 additions and 5 deletions
|
@ -406,6 +406,8 @@ BatteryMonitor::~BatteryMonitor()
|
|||
|
||||
void BatteryMonitor::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
configChanged();
|
||||
QTimer::singleShot(500, m_batterywidget, SLOT(slotUpdateLayout()));
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ CalendarApplet::CalendarApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void CalendarApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
Plasma::ToolTipManager::self()->registerWidget(this);
|
||||
slotTimeout();
|
||||
m_timer->start();
|
||||
|
|
|
@ -356,6 +356,8 @@ DeviceNotifier::~DeviceNotifier()
|
|||
|
||||
void DeviceNotifier::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
KConfigGroup configgroup = config();
|
||||
m_devicenotifierwidget->onlyremovable = configgroup.readEntry("showOnlyRemovable", true);
|
||||
QTimer::singleShot(500, m_devicenotifierwidget, SLOT(slotUpdateLayout()));
|
||||
|
|
|
@ -93,6 +93,8 @@ DigitalClockApplet::DigitalClockApplet(QObject *parent, const QVariantList &args
|
|||
|
||||
void DigitalClockApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
m_timer->start();
|
||||
Plasma::ToolTipManager::self()->registerWidget(this);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,8 @@ IconApplet::IconApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void IconApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
|
|
@ -48,6 +48,8 @@ KeyboardApplet::KeyboardApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void KeyboardApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
KConfigGroup configgroup = config();
|
||||
m_showflag = configgroup.readEntry("showFlag", false);
|
||||
m_showtext = configgroup.readEntry("showText", true);
|
||||
|
|
|
@ -1733,6 +1733,8 @@ LauncherApplet::LauncherApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void LauncherApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
setGlobalShortcut(KShortcut(Qt::ALT+Qt::Key_F2));
|
||||
m_shareconfig = KSharedConfig::openConfig(globalConfig().config()->name());
|
||||
m_configgroup = m_shareconfig->group("Plugins");
|
||||
|
|
|
@ -260,6 +260,8 @@ LockoutApplet::~LockoutApplet()
|
|||
|
||||
void LockoutApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
m_layout = new QGraphicsLinearLayout(Qt::Horizontal, this);
|
||||
m_layout->setContentsMargins(0, 0, 0, 0);
|
||||
m_layout->setSpacing(s_spacing);
|
||||
|
|
|
@ -122,6 +122,8 @@ LunaApplet::LunaApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void LunaApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
Plasma::ToolTipManager::self()->registerWidget(this);
|
||||
slotTimeout();
|
||||
m_timer->start();
|
||||
|
|
|
@ -982,6 +982,8 @@ MixerApplet::~MixerApplet()
|
|||
|
||||
void MixerApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
slotThemeChanged();
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(slotThemeChanged()));
|
||||
}
|
||||
|
|
|
@ -88,6 +88,8 @@ NotesApplet::NotesApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void NotesApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
configChanged();
|
||||
}
|
||||
|
||||
|
|
|
@ -328,6 +328,8 @@ PagerApplet::PagerApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void PagerApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
KConfigGroup configgroup = config();
|
||||
const PagerApplet::PagerMode oldpagermode = m_pagermode;
|
||||
m_pagermode = static_cast<PagerApplet::PagerMode>(configgroup.readEntry("pagerMode", static_cast<int>(s_defaultpagermode)));
|
||||
|
|
|
@ -43,10 +43,6 @@ PanelSpacer::PanelSpacer(QObject *parent, const QVariantList &args)
|
|||
setCacheMode(DeviceCoordinateCache);
|
||||
}
|
||||
|
||||
PanelSpacer::~PanelSpacer()
|
||||
{
|
||||
}
|
||||
|
||||
QList<QAction *> PanelSpacer::contextualActions()
|
||||
{
|
||||
return m_actions;
|
||||
|
@ -73,6 +69,8 @@ void PanelSpacer::toggleFixed(bool flexible)
|
|||
|
||||
void PanelSpacer::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
if (containment()) {
|
||||
connect(containment(), SIGNAL(toolBoxVisibilityChanged(bool)), this, SLOT(updateConfigurationMode(bool)));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class PanelSpacer : public Plasma::Applet
|
|||
Q_OBJECT
|
||||
public:
|
||||
PanelSpacer(QObject *parent, const QVariantList &args);
|
||||
~PanelSpacer();
|
||||
|
||||
void init();
|
||||
void paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const QRect &contentsRect);
|
||||
void constraintsEvent(Plasma::Constraints constraints);
|
||||
|
|
|
@ -108,6 +108,8 @@ Quicklaunch::~Quicklaunch()
|
|||
|
||||
void Quicklaunch::init()
|
||||
{
|
||||
Applet::init();
|
||||
|
||||
// Initialize outer layout
|
||||
m_layout = new QGraphicsLinearLayout();
|
||||
m_layout->setContentsMargins(2, 2, 2, 2);
|
||||
|
|
|
@ -823,6 +823,8 @@ SystemMonitor::~SystemMonitor()
|
|||
|
||||
void SystemMonitor::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
slotThemeChanged();
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(slotThemeChanged()));
|
||||
}
|
||||
|
|
|
@ -88,6 +88,8 @@ SystemTrayApplet::~SystemTrayApplet()
|
|||
|
||||
void SystemTrayApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
m_layout = new QGraphicsLinearLayout(Qt::Horizontal, this);
|
||||
m_layout->setContentsMargins(s_margin, s_margin, s_margin, s_margin);
|
||||
m_layout->setSpacing(s_spacing);
|
||||
|
|
|
@ -344,6 +344,8 @@ TasksApplet::TasksApplet(QObject *parent, const QVariantList &args)
|
|||
|
||||
void TasksApplet::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
KConfigGroup configgroup = config();
|
||||
m_tooltipmode = static_cast<TasksApplet::ToolTipMode>(configgroup.readEntry("tooltipMode", static_cast<int>(s_defaultooltipmode)));
|
||||
|
||||
|
|
|
@ -88,6 +88,8 @@ Trash::~Trash()
|
|||
|
||||
void Trash::init()
|
||||
{
|
||||
Plasma::Applet::init();
|
||||
|
||||
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(this);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
|
|
@ -764,6 +764,8 @@ WeatherApplet::~WeatherApplet()
|
|||
|
||||
void WeatherApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
KConfigGroup configgroup = config();
|
||||
m_tempunit = static_cast<KTemperature::KTempUnit>(configgroup.readEntry("weatherTempUnit", static_cast<int>(s_defaulttempunit)));
|
||||
m_location = configgroup.readEntry("weatherLocation", QString());
|
||||
|
|
Loading…
Add table
Reference in a new issue