remove isPopupShowing() and popupPosition()
This commit is contained in:
parent
798be9a407
commit
b37ec71e9f
@ -364,25 +364,6 @@ Package Applet::package() const
|
||||
return d->package ? *d->package : Package();
|
||||
}
|
||||
|
||||
QPoint Applet::popupPosition(const QSize &s) const
|
||||
{
|
||||
return popupPosition(s, Qt::AlignLeft);
|
||||
}
|
||||
|
||||
QPoint Applet::popupPosition(const QSize &s, Qt::AlignmentFlag alignment) const
|
||||
{
|
||||
Containment *cont = containment();
|
||||
Corona *corona = 0;
|
||||
if (cont) {
|
||||
corona = cont->corona();
|
||||
}
|
||||
Q_ASSERT(corona);
|
||||
|
||||
return QPoint();
|
||||
//FIXME: port away from QGV
|
||||
//return corona->popupPosition(this, s, alignment);
|
||||
}
|
||||
|
||||
void Applet::updateConstraints(Plasma::Constraints constraints)
|
||||
{
|
||||
d->scheduleConstraintsUpdate(constraints);
|
||||
@ -674,19 +655,12 @@ void Applet::flushPendingConstraintsEvents()
|
||||
d->positionMessageOverlay();
|
||||
}
|
||||
|
||||
// now take care of constraints in special subclasses: Contaiment and PopupApplet
|
||||
// now take care of constraints in special subclass: Contaiment
|
||||
Containment* containment = qobject_cast<Plasma::Containment*>(this);
|
||||
if (d->isContainment && containment) {
|
||||
containment->d->containmentConstraintsEvent(c);
|
||||
}
|
||||
|
||||
//FIXME: port away from popupapplet
|
||||
/*
|
||||
PopupApplet* popup = qobject_cast<Plasma::PopupApplet*>(this);
|
||||
if (popup) {
|
||||
popup->d->popupConstraintsEvent(c);
|
||||
}*/
|
||||
|
||||
// pass the constraint on to the actual subclass
|
||||
constraintsEvent(c);
|
||||
|
||||
@ -805,11 +779,6 @@ KShortcut Applet::globalShortcut() const
|
||||
return KShortcut();
|
||||
}
|
||||
|
||||
bool Applet::isPopupShowing() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void Applet::addAssociatedWidget(QWidget *widget)
|
||||
{
|
||||
d->actions->addAssociatedWidget(widget);
|
||||
@ -1185,10 +1154,7 @@ Applet *Applet::loadPlasmoid(const QString &path, uint appletId, const QVariantL
|
||||
|
||||
if (types.contains("Plasma/Containment")) {
|
||||
return new Containment(path, appletId, args);
|
||||
}//FIXME: port away popupapplet
|
||||
/* else if (types.contains("Plasma/PopupApplet")) {
|
||||
return new PopupApplet(path, appletId, args);
|
||||
}*/ else {
|
||||
} else {
|
||||
return new Applet(path, appletId, args);
|
||||
}
|
||||
}
|
||||
|
@ -156,13 +156,6 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
*/
|
||||
virtual Location location() const;
|
||||
|
||||
/**
|
||||
* @return true is there is a popup assoiated with this Applet
|
||||
* showing, such as the dialog of a PopupApplet. May be reimplemented
|
||||
* for custom popup implementations.
|
||||
*/
|
||||
virtual bool isPopupShowing() const;
|
||||
|
||||
//CONFIGURATION
|
||||
/**
|
||||
* Returns the KConfigGroup to access the applets configuration.
|
||||
@ -485,24 +478,6 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
bool hasValidAssociatedApplication() const;
|
||||
|
||||
//Completely UI-specific, remove or move to scriptengine
|
||||
/**
|
||||
* Reccomended position for a popup window like a menu or a tooltip
|
||||
* given its size
|
||||
* @param s size of the popup
|
||||
* @returns recommended position
|
||||
*/
|
||||
QPoint popupPosition(const QSize &s) const;
|
||||
|
||||
/**
|
||||
* @since 4.4
|
||||
* Reccomended position for a popup window like a menu or a tooltip
|
||||
* given its size
|
||||
* @param s size of the popup
|
||||
* @param alignment alignment of the popup, valid flags are Qt::AlignLeft, Qt::AlignRight and Qt::AlignCenter
|
||||
* @returns recommended position
|
||||
*/
|
||||
QPoint popupPosition(const QSize &s, Qt::AlignmentFlag alignment) const;
|
||||
|
||||
/**
|
||||
* @return the font currently set for this widget
|
||||
**/
|
||||
|
@ -424,7 +424,7 @@ void Containment::contextMenuEvent(QContextMenuEvent *event)
|
||||
QPoint pos = event->globalPos();
|
||||
if (applet && d->isPanelContainment()) {
|
||||
menu->adjustSize();
|
||||
pos = applet->popupPosition(menu->size());
|
||||
pos = QPoint(); //TODO: port context menus away from Containment applet->popupPosition(menu->size());
|
||||
if (event->reason() == QContextMenuEvent::Mouse) {
|
||||
// if the menu pops up way away from the mouse press, then move it
|
||||
// to the mouse press
|
||||
|
@ -512,7 +512,6 @@ Q_SIGNALS:
|
||||
friend class CoronaBasePrivate;
|
||||
friend class ContainmentPrivate;
|
||||
friend class ContainmentActions;
|
||||
friend class PopupApplet;
|
||||
friend class View;
|
||||
ContainmentPrivate *const d;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user