2008-11-04 00:08:39 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2008 by Montel Laurent <montel@kde.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef POPUPAPPLET_P_H
|
|
|
|
#define POPUPAPPLET_P_H
|
|
|
|
|
2010-12-14 04:14:14 +01:00
|
|
|
#include <QBasicTimer>
|
2009-10-15 18:42:41 +02:00
|
|
|
#include <QWeakPointer>
|
|
|
|
|
2009-07-08 16:55:59 +02:00
|
|
|
#include <plasma/plasma.h>
|
|
|
|
|
2008-11-04 00:08:39 +01:00
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
class PopupAppletPrivate
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PopupAppletPrivate(PopupApplet *applet);
|
|
|
|
~PopupAppletPrivate();
|
|
|
|
|
2010-05-25 20:21:04 +02:00
|
|
|
void iconSizeChanged(int group);
|
2008-12-30 03:06:06 +01:00
|
|
|
void internalTogglePopup();
|
2008-11-04 00:08:39 +01:00
|
|
|
void hideTimedPopup();
|
|
|
|
void clearPopupLostFocus();
|
|
|
|
void dialogSizeChanged();
|
|
|
|
void dialogStatusChanged(bool status);
|
2010-04-04 03:55:56 +02:00
|
|
|
void restoreDialogSize();
|
2008-11-04 00:08:39 +01:00
|
|
|
void updateDialogPosition();
|
|
|
|
void popupConstraintsEvent(Plasma::Constraints constraints);
|
2008-12-08 19:03:23 +01:00
|
|
|
void checkExtenderAppearance(Plasma::FormFactor f);
|
2009-11-11 22:47:56 +01:00
|
|
|
KConfigGroup popupConfigGroup();
|
2010-04-15 21:25:30 +02:00
|
|
|
void appletActivated();
|
2011-02-05 02:51:12 +01:00
|
|
|
void statusChangeWhileShown(Plasma::ItemStatus status);
|
|
|
|
|
2008-11-04 00:08:39 +01:00
|
|
|
|
|
|
|
PopupApplet *q;
|
|
|
|
Plasma::IconWidget *icon;
|
2009-11-11 21:51:59 +01:00
|
|
|
QWeakPointer<Plasma::Dialog> dialogPtr;
|
2009-10-15 18:42:41 +02:00
|
|
|
QWeakPointer<QGraphicsProxyWidget>proxy;
|
2009-07-17 14:31:08 +02:00
|
|
|
QWidget *widget;
|
|
|
|
QGraphicsWidget *graphicsWidget;
|
2008-11-04 00:08:39 +01:00
|
|
|
Plasma::PopupPlacement popupPlacement;
|
2010-09-13 01:54:30 +02:00
|
|
|
Qt::AlignmentFlag popupAlignment;
|
2008-11-04 00:08:39 +01:00
|
|
|
Plasma::AspectRatioMode savedAspectRatio;
|
2010-12-14 04:14:14 +01:00
|
|
|
QTimer *autohideTimer;
|
|
|
|
QBasicTimer delayedShowTimer;
|
2008-11-04 00:08:39 +01:00
|
|
|
QPoint clicked;
|
2011-02-05 02:51:12 +01:00
|
|
|
ItemStatus preShowStatus;
|
2008-11-04 00:08:39 +01:00
|
|
|
bool popupLostFocus : 1;
|
2008-11-27 07:03:53 +01:00
|
|
|
bool passive : 1;
|
2008-11-04 00:08:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Plasma namespace
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|