2007-11-19 02:19:12 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2007 by Aaron Seigo <aseigo@kde.org>
|
2008-04-14 15:05:49 +02:00
|
|
|
* Copyright 2008 by Marco Martin <notmart@gmail.com>
|
2007-11-19 02:19:12 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2008-02-19 10:12:34 +01:00
|
|
|
#ifndef PLASMA_DESKTOPTOOLBOX_P_H
|
|
|
|
#define PLASMA_DESKTOPTOOLBOX_P_H
|
2007-11-19 02:19:12 +01:00
|
|
|
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
#include <QObject>
|
2008-01-30 04:40:17 +01:00
|
|
|
#include <QTime>
|
2007-11-19 02:19:12 +01:00
|
|
|
|
|
|
|
#include <KIcon>
|
|
|
|
|
2008-04-14 15:05:49 +02:00
|
|
|
#include <plasma/toolbox_p.h>
|
|
|
|
|
2008-04-25 05:23:31 +02:00
|
|
|
#include "animator.h"
|
2007-11-19 02:19:12 +01:00
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
class Widget;
|
2008-01-10 22:05:56 +01:00
|
|
|
class EmptyGraphicsItem;
|
2007-11-19 02:19:12 +01:00
|
|
|
|
2008-04-14 15:05:49 +02:00
|
|
|
class DesktopToolbox : public Toolbox
|
2007-11-19 02:19:12 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DesktopToolbox(QGraphicsItem *parent = 0);
|
2008-05-11 23:30:28 +02:00
|
|
|
~DesktopToolbox();
|
2008-04-20 16:23:37 +02:00
|
|
|
QRectF boundingRect() const;
|
2007-11-19 02:19:12 +01:00
|
|
|
QPainterPath shape() const;
|
|
|
|
|
2008-01-21 16:10:19 +01:00
|
|
|
void showToolbox();
|
|
|
|
void hideToolbox();
|
|
|
|
|
2007-11-19 02:19:12 +01:00
|
|
|
protected:
|
|
|
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
|
|
|
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
|
|
|
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
|
|
|
|
|
|
|
protected slots:
|
2008-05-19 02:41:41 +02:00
|
|
|
void animateCircle(qreal progress);
|
|
|
|
void animateHighlight(qreal progress);
|
2007-11-19 02:19:12 +01:00
|
|
|
void toolMoved(QGraphicsItem*);
|
2008-05-19 02:41:41 +02:00
|
|
|
/**
|
|
|
|
* show/hide the toolbox
|
|
|
|
*/
|
|
|
|
void toggle();
|
2007-11-19 02:19:12 +01:00
|
|
|
private:
|
2008-04-14 15:05:49 +02:00
|
|
|
class Private;
|
|
|
|
Private *d;
|
2007-11-19 02:19:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // Plasma namespace
|
|
|
|
#endif // multiple inclusion guard
|
|
|
|
|