reimplement showConfigurationInterface
This commit is contained in:
parent
98a681a0e7
commit
5157958c00
@ -379,6 +379,28 @@ void PanelView::restore()
|
||||
emit alignmentChanged();
|
||||
}
|
||||
|
||||
void PanelView::showConfigurationInterface(Plasma::Applet *applet)
|
||||
{
|
||||
if (m_panelConfigView) {
|
||||
m_panelConfigView.data()->hide();
|
||||
m_panelConfigView.data()->deleteLater();
|
||||
}
|
||||
|
||||
if (!applet || !applet->containment()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Plasma::Containment *cont = qobject_cast<Plasma::Containment *>(applet);
|
||||
|
||||
if (cont) {
|
||||
m_panelConfigView = new PanelConfigView(cont, this);
|
||||
} else {
|
||||
m_panelConfigView = new ConfigView(applet);
|
||||
}
|
||||
m_panelConfigView.data()->init();
|
||||
m_panelConfigView.data()->show();
|
||||
}
|
||||
|
||||
void PanelView::resizeEvent(QResizeEvent *ev)
|
||||
{
|
||||
if (containment()->formFactor() == Plasma::Types::Vertical) {
|
||||
|
@ -75,6 +75,12 @@ Q_SIGNALS:
|
||||
void minimumLengthChanged();
|
||||
void screenChanged(QScreen *screen);
|
||||
|
||||
protected Q_SLOTS:
|
||||
/**
|
||||
* It will be called when the configuration is requested
|
||||
*/
|
||||
virtual void showConfigurationInterface(Plasma::Applet *applet);
|
||||
|
||||
private Q_SLOTS:
|
||||
void positionPanel();
|
||||
void restore();
|
||||
@ -84,7 +90,7 @@ private:
|
||||
int m_maxLength;
|
||||
int m_minLength;
|
||||
Qt::Alignment m_alignment;
|
||||
QPointer<PanelConfigView> m_panelConfigView;
|
||||
QPointer<ConfigView> m_panelConfigView;
|
||||
ShellCorona *m_corona;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user