mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
plasma: delay calculator and dict applet widgets creation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
653752bbe2
commit
4f7a2c984f
4 changed files with 16 additions and 2 deletions
|
@ -560,8 +560,6 @@ CalculatorApplet::CalculatorApplet(QObject *parent, const QVariantList &args)
|
|||
setAspectRatioMode(Plasma::AspectRatioMode::KeepAspectRatio);
|
||||
setStatus(Plasma::ItemStatus::AcceptingInputStatus);
|
||||
setPopupIcon("accessories-calculator");
|
||||
|
||||
m_calculatorwidget = new CalculatorAppletWidget(this);
|
||||
}
|
||||
|
||||
CalculatorApplet::~CalculatorApplet()
|
||||
|
@ -569,6 +567,13 @@ CalculatorApplet::~CalculatorApplet()
|
|||
delete m_calculatorwidget;
|
||||
}
|
||||
|
||||
void CalculatorApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
m_calculatorwidget = new CalculatorAppletWidget(this);
|
||||
}
|
||||
|
||||
QGraphicsWidget* CalculatorApplet::graphicsWidget()
|
||||
{
|
||||
return m_calculatorwidget;
|
||||
|
|
|
@ -30,6 +30,8 @@ public:
|
|||
CalculatorApplet(QObject *parent, const QVariantList &args);
|
||||
~CalculatorApplet();
|
||||
|
||||
// Plasma::Applet reimplementation
|
||||
void init() final;
|
||||
// Plasma::PopupApplet reimplementation
|
||||
QGraphicsWidget* graphicsWidget() final;
|
||||
|
||||
|
|
|
@ -217,6 +217,11 @@ DictApplet::DictApplet(QObject *parent, const QVariantList &args)
|
|||
setPopupIcon(s_defaultpopupicon);
|
||||
setAspectRatioMode(Plasma::IgnoreAspectRatio);
|
||||
setStatus(Plasma::ItemStatus::AcceptingInputStatus);
|
||||
}
|
||||
|
||||
void DictApplet::init()
|
||||
{
|
||||
Plasma::PopupApplet::init();
|
||||
|
||||
m_dictwidget = new DictAppletWidget(this);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ class DictApplet : public Plasma::PopupApplet
|
|||
public:
|
||||
DictApplet(QObject *parent, const QVariantList &args);
|
||||
|
||||
// Plasma::Applet reimplementation
|
||||
void init() final;
|
||||
// Plasma::PopupApplet reimplementation
|
||||
QGraphicsWidget* graphicsWidget() final;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue