having two methods named the same thing was a bit insane.. WHICH togglePopup? =)
svn path=/trunk/KDE/kdelibs/; revision=903159
This commit is contained in:
parent
ea41519c3c
commit
7c7218cf89
@ -48,7 +48,7 @@ PopupApplet::PopupApplet(QObject *parent, const QVariantList &args)
|
|||||||
{
|
{
|
||||||
int iconSize = IconSize(KIconLoader::Desktop);
|
int iconSize = IconSize(KIconLoader::Desktop);
|
||||||
resize(iconSize, iconSize);
|
resize(iconSize, iconSize);
|
||||||
connect(this, SIGNAL(activate()), this, SLOT(togglePopup()));
|
connect(this, SIGNAL(activate()), this, SLOT(internalTogglePopup()));
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupApplet::~PopupApplet()
|
PopupApplet::~PopupApplet()
|
||||||
@ -72,7 +72,7 @@ void PopupApplet::setPopupIcon(const QIcon &icon)
|
|||||||
|
|
||||||
if (!d->icon) {
|
if (!d->icon) {
|
||||||
d->icon = new Plasma::IconWidget(icon, QString(), this);
|
d->icon = new Plasma::IconWidget(icon, QString(), this);
|
||||||
connect(d->icon, SIGNAL(clicked()), this, SLOT(togglePopup()));
|
connect(d->icon, SIGNAL(clicked()), this, SLOT(internalTogglePopup()));
|
||||||
|
|
||||||
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
|
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
@ -339,7 +339,7 @@ void PopupApplet::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
{
|
{
|
||||||
if (!d->icon &&
|
if (!d->icon &&
|
||||||
(d->clicked - scenePos().toPoint()).manhattanLength() < KGlobalSettings::dndEventDelay()) {
|
(d->clicked - scenePos().toPoint()).manhattanLength() < KGlobalSettings::dndEventDelay()) {
|
||||||
d->togglePopup();
|
d->internalTogglePopup();
|
||||||
} else {
|
} else {
|
||||||
Applet::mouseReleaseEvent(event);
|
Applet::mouseReleaseEvent(event);
|
||||||
}
|
}
|
||||||
@ -402,7 +402,7 @@ void PopupApplet::hidePopup()
|
|||||||
void PopupApplet::togglePopup()
|
void PopupApplet::togglePopup()
|
||||||
{
|
{
|
||||||
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
|
if (d->dialog && (formFactor() == Horizontal || formFactor() == Vertical)) {
|
||||||
d->dialog->setVisible(!d->dialog->isVisible());
|
d->internalTogglePopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ PopupAppletPrivate::~PopupAppletPrivate()
|
|||||||
delete icon;
|
delete icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupAppletPrivate::togglePopup()
|
void PopupAppletPrivate::internalTogglePopup()
|
||||||
{
|
{
|
||||||
if (dialog) {
|
if (dialog) {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
|
@ -138,7 +138,7 @@ protected:
|
|||||||
bool eventFilter(QObject *watched, QEvent *event);
|
bool eventFilter(QObject *watched, QEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_PRIVATE_SLOT(d, void togglePopup())
|
Q_PRIVATE_SLOT(d, void internalTogglePopup())
|
||||||
Q_PRIVATE_SLOT(d, void hideTimedPopup())
|
Q_PRIVATE_SLOT(d, void hideTimedPopup())
|
||||||
Q_PRIVATE_SLOT(d, void clearPopupLostFocus())
|
Q_PRIVATE_SLOT(d, void clearPopupLostFocus())
|
||||||
Q_PRIVATE_SLOT(d, void dialogSizeChanged())
|
Q_PRIVATE_SLOT(d, void dialogSizeChanged())
|
||||||
|
@ -29,7 +29,7 @@ public:
|
|||||||
PopupAppletPrivate(PopupApplet *applet);
|
PopupAppletPrivate(PopupApplet *applet);
|
||||||
~PopupAppletPrivate();
|
~PopupAppletPrivate();
|
||||||
|
|
||||||
void togglePopup();
|
void internalTogglePopup();
|
||||||
void hideTimedPopup();
|
void hideTimedPopup();
|
||||||
void clearPopupLostFocus();
|
void clearPopupLostFocus();
|
||||||
void dialogSizeChanged();
|
void dialogSizeChanged();
|
||||||
|
Loading…
Reference in New Issue
Block a user