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
|
|
|
|
|
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();
|
|
|
|
|
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);
|
|
|
|
void updateDialogPosition();
|
|
|
|
void popupConstraintsEvent(Plasma::Constraints constraints);
|
2008-12-08 19:03:23 +01:00
|
|
|
void checkExtenderAppearance(Plasma::FormFactor f);
|
2008-11-04 00:08:39 +01:00
|
|
|
|
|
|
|
PopupApplet *q;
|
|
|
|
Plasma::IconWidget *icon;
|
2009-10-13 23:43:35 +02:00
|
|
|
QWeakPointer<Plasma::Dialog> dialog;
|
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;
|
|
|
|
Plasma::AspectRatioMode savedAspectRatio;
|
|
|
|
QTimer *timer;
|
|
|
|
QPoint clicked;
|
|
|
|
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
|
|
|
|
|