2014-11-13 19:30:51 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 by Ivan Cukic <ivan.cukic+kde@gmail.com>
|
|
|
|
* Copyright (C) 2009 by Ana Cecília Martins <anaceciliamb@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library/Lesser General Public License
|
|
|
|
* version 2, or (at your option) any later version, as published by the
|
|
|
|
* Free Software Foundation
|
|
|
|
*
|
|
|
|
* 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/Lesser 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef WIDGETEXPLORER_H
|
|
|
|
#define WIDGETEXPLORER_H
|
|
|
|
|
2023-09-10 05:42:59 +03:00
|
|
|
#include <QGraphicsWidget>
|
|
|
|
#include <QGraphicsItem>
|
2014-11-13 19:30:51 +02:00
|
|
|
|
2023-09-10 05:42:59 +03:00
|
|
|
#include <Plasma/Corona>
|
|
|
|
#include <Plasma/Containment>
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
#include "plasmagenericshell_export.h"
|
|
|
|
|
|
|
|
namespace Plasma
|
|
|
|
{
|
|
|
|
|
|
|
|
class WidgetExplorerPrivate;
|
|
|
|
|
|
|
|
class PLASMAGENERICSHELL_EXPORT WidgetExplorer : public QGraphicsWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2023-09-10 05:42:59 +03:00
|
|
|
explicit WidgetExplorer(Plasma::Location loc, QGraphicsItem *parent = nullptr);
|
|
|
|
explicit WidgetExplorer(QGraphicsItem *parent = nullptr);
|
2014-11-13 19:30:51 +02:00
|
|
|
~WidgetExplorer();
|
|
|
|
|
|
|
|
/**
|
2023-09-10 05:42:59 +03:00
|
|
|
* Sets the containment to add applets to
|
2014-11-13 19:30:51 +02:00
|
|
|
*/
|
|
|
|
void setContainment(Plasma::Containment *containment);
|
|
|
|
/**
|
2023-09-10 05:42:59 +03:00
|
|
|
* @return the containment to add applets to
|
2014-11-13 19:30:51 +02:00
|
|
|
*/
|
|
|
|
Containment *containment() const;
|
|
|
|
|
|
|
|
void setLocation(const Plasma::Location loc);
|
2023-09-10 05:42:59 +03:00
|
|
|
Plasma::Location location() const;
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void locationChanged(Plasma::Location loc);
|
|
|
|
void closeClicked();
|
|
|
|
|
|
|
|
protected:
|
2023-09-10 05:42:59 +03:00
|
|
|
void keyPressEvent(QKeyEvent *event);
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
private:
|
2023-09-11 04:55:09 +03:00
|
|
|
Q_PRIVATE_SLOT(d, void _k_appletAdded(Plasma::Applet*))
|
|
|
|
Q_PRIVATE_SLOT(d, void _k_appletRemoved(Plasma::Applet*))
|
2023-09-10 05:42:59 +03:00
|
|
|
Q_PRIVATE_SLOT(d, void _k_containmentDestroyed())
|
|
|
|
Q_PRIVATE_SLOT(d, void _k_immutabilityChanged(Plasma::ImmutabilityType))
|
|
|
|
Q_PRIVATE_SLOT(d, void _k_textChanged(QString))
|
|
|
|
Q_PRIVATE_SLOT(d, void _k_closePressed())
|
2023-09-11 04:55:09 +03:00
|
|
|
Q_PRIVATE_SLOT(d, void _k_databaseChanged(QStringList))
|
2014-11-13 19:30:51 +02:00
|
|
|
|
|
|
|
WidgetExplorerPrivate * const d;
|
2023-09-10 05:42:59 +03:00
|
|
|
friend WidgetExplorerPrivate;
|
2014-11-13 19:30:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Plasma
|
|
|
|
|
|
|
|
#endif // WIDGETEXPLORER_H
|