extender is not a Plasma Widget (it doesn't follow the API pattern, isn't a button/menu/etc, isn't meant to be used as a general widget in a random layout...)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=841164
This commit is contained in:
Aaron J. Seigo 2008-08-02 17:46:32 +00:00
parent 0dd6b99014
commit 577a64f563
14 changed files with 56 additions and 56 deletions

View File

@ -35,6 +35,8 @@ set(plasma_LIB_SRCS
dataenginemanager.cpp
delegate.cpp
dialog.cpp
extender.cpp
extenderitem.cpp
paintutils.cpp
panelsvg.cpp
plasma.cpp
@ -63,8 +65,6 @@ set(plasma_LIB_SRCS
view.cpp
widgets/checkbox.cpp
widgets/combobox.cpp
widgets/extender.cpp
widgets/extenderitem.cpp
widgets/flash.cpp
widgets/frame.cpp
widgets/groupbox.cpp
@ -135,6 +135,8 @@ set(plasma_LIB_INCLUDES
dataenginemanager.h
delegate.h
dialog.h
extender.h
extenderitem.h
paintutils.h
panelsvg.h
plasma.h
@ -166,8 +168,6 @@ install(FILES
install(FILES
widgets/checkbox.h
widgets/combobox.h
widgets/extender.h
widgets/extenderitem.h
widgets/flash.h
widgets/frame.h
widgets/groupbox.h

View File

@ -63,6 +63,8 @@
#include "containment.h"
#include "corona.h"
#include "dataenginemanager.h"
#include "extender.h"
#include "extenderitem.h"
#include "package.h"
#include "plasma.h"
#include "scripting/appletscript.h"
@ -72,8 +74,6 @@
#include "view.h"
#include "widgets/label.h"
#include "widgets/pushbutton.h"
#include "widgets/extender.h"
#include "widgets/extenderitem.h"
#include "tooltipmanager.h"
#include "private/containment_p.h"

View File

@ -44,12 +44,12 @@ class KActionCollection;
namespace Plasma
{
class AppletPrivate;
class Containment;
class DataEngine;
class Package;
class AppletPrivate;
class ExtenderItem;
class Extender;
class ExtenderItem;
class Package;
/**
* @short The base Applet class

View File

@ -523,10 +523,6 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, co
return d->addApplet(name, args, appletGeometry);
}
//pos must be relative to the containment already. use mapfromscene.
//what we're trying to do here for panels is make the applet go to the requested position,
//or somewhere close to it, and get integrated properly into the containment as if it were created
//there.
void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
{
if (!delayInit && immutability() != Mutable) {

View File

@ -95,7 +95,6 @@ class PLASMA_EXPORT DataContainer : public QObject
void connectVisualization(QObject* visualization, uint pollingInterval, Plasma::IntervalAlignment alignment);
public Q_SLOTS:
/**
* Disconnects an object from this DataContainer.
**/
@ -118,6 +117,7 @@ class PLASMA_EXPORT DataContainer : public QObject
* requests to be updated.
**/
void updateRequested(DataContainer *source);
protected:
/**
* Checks for whether the data has changed and therefore an update
@ -148,7 +148,6 @@ protected Q_SLOTS:
*/
void checkUsage();
private:
friend class SignalRelay;
DataContainerPrivate* const d;

View File

@ -55,11 +55,6 @@ class DataEnginePrivate;
**/
class PLASMA_EXPORT DataEngine : public QObject
{
friend class DataEnginePrivate;
friend class DataEngineScript;
friend class DataEngineManager;
friend class NullEngine;
Q_OBJECT
Q_PROPERTY( QStringList sources READ sources )
Q_PROPERTY( bool valid READ isValid )
@ -424,6 +419,11 @@ class PLASMA_EXPORT DataEngine : public QObject
void removeSource(const QString& source);
private:
friend class DataEnginePrivate;
friend class DataEngineScript;
friend class DataEngineManager;
friend class NullEngine;
Q_PRIVATE_SLOT(d, void internalUpdateSource(DataContainer* source))
DataEnginePrivate* const d;

View File

@ -17,19 +17,20 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#include "extender_p.h"
#include "extender.h"
#include <QGraphicsLinearLayout>
#include <QGraphicsGridLayout>
#include <QAction>
#include <QGraphicsGridLayout>
#include <QGraphicsLinearLayout>
#include "plasma/applet.h"
#include "plasma/private/applet_p.h"
#include "plasma/containment.h"
#include "plasma/corona.h"
#include "plasma/widgets/extenderitem.h"
#include "plasma/widgets/label.h"
#include "applet.h"
#include "containment.h"
#include "corona.h"
#include "extenderitem.h"
#include "widgets/label.h"
#include "private/applet_p.h"
#include "private/extender_p.h"
namespace Plasma
{

View File

@ -31,16 +31,18 @@ class ExtenderItem;
class Applet;
/**
* An extender is a widget where items can be added to. These so called ExtenderItems can be
* detached by the user an dropped in other extenders or somewhere else, in which case a new
* extenderapplet is created and the item is added there.
* This widget allows using ExtenderItems in you applet. Extender takes care of the presentation
* of a collection of extenderitems, and keeps track of extenderItems that originated in it.
* This default extender displays extender items in a vertical layout, and shows spacers in this
* layout when hovering with an extender item over it, which is probably good for most cases.
* An Extender is a widget that visually extends the normal contents of an applet with
* additional dynamic widgets called ExtenderItems. These ExtenderItems can be
* detached by the user and dropped either on another Extender or on the canvas directly.
*
* This widget allows using ExtenderItems in your applet. Extender takes care of the presentation
* of a collection of ExtenderItems and keeps track of ExtenderItems that originate in it.
*
* The default Extender implementation displays extender items in a vertical layout with
* spacers that appear when dropping an ExtenderItem over it.
*
* If you wish to have a different presentation of extender items, you can choose to subclass
* this class. In this case you'll need to reimplement the extenderItem* events and optionally
* the saveState function.
* Extender and reimplement the extenderItem* events and, optionally, the saveState function.
*/
class PLASMA_EXPORT Extender : public QGraphicsWidget
{
@ -175,3 +177,4 @@ class PLASMA_EXPORT Extender : public QGraphicsWidget
} // Plasma namespace
#endif //EXTENDER_H

View File

@ -19,27 +19,28 @@
#include "extenderitem.h"
#include <QtGui/QPainter>
#include <QtGui/QGraphicsSceneResizeEvent>
#include <QtGui/QGraphicsSceneMouseEvent>
#include <QtGui/QGraphicsLinearLayout>
#include <QApplication>
#include <QAction>
#include <QGraphicsSceneResizeEvent>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsLinearLayout>
#include <QPainter>
#include <QTimer>
#include <KDE/KDebug>
#include <KDE/KIcon>
#include <KDE/KWindowSystem>
#include <KDebug>
#include <KIcon>
#include <KWindowSystem>
#include "plasma/corona.h"
#include "plasma/containment.h"
#include "plasma/theme.h"
#include "plasma/view.h"
#include "plasma/applet.h"
#include "plasma/private/applet_p.h"
#include "plasma/panelsvg.h"
#include "plasma/widgets/extender.h"
#include "plasma/widgets/extender_p.h"
#include "applet.h"
#include "containment.h"
#include "corona.h"
#include "extender.h"
#include "panelsvg.h"
#include "theme.h"
#include "view.h"
#include "private/applet_p.h"
#include "private/extender_p.h"
namespace Plasma
{

View File

@ -1,2 +1,2 @@
#include "../../plasma/widgets/extender.h"
#include "../../plasma/extender.h"

View File

@ -1,2 +1,2 @@
#include "../../plasma/widgets/extenderitem.h"
#include "../../plasma/extenderitem.h"