plasma-framework/appletLayout.h
Aaron J. Seigo bbaebc6b1b move workspace/plasma/lib to workspace/lib/plasma so that we can do:
#include <plasma/foo.h>

in headers in libplasma. this is important so that they can be used post-install by third party plugins, apps, etc.

also, changed Applet::loadDataEngine to just Applet::dataEngine and make it actually return the data engine; move the applets to using it. safer and fewer LoC

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=670850
2007-06-02 17:29:39 +00:00

50 lines
1.3 KiB
C++

#ifndef APPLET_LAYOUT_H
#define APPLET_LAYOUT_H
#include <QLayout>
#include <QSize>
#include <plasma/plasma_export.h>
class QLayoutItem;
class QRect;
namespace Plasma
{
/**
* AppletLayout is our custom layouting engine
* for applets. It reacts to state transition (removal,addition
* of applets) by emitting corresponding signals which AppletCompositor
* can intercept and respond with some nice animation/effect.
*/
class PLASMA_EXPORT AppletLayout : public QLayout
{
Q_OBJECT
public:
AppletLayout(QWidget *parent);
~AppletLayout();
virtual void addItem(QLayoutItem *item);
virtual Qt::Orientations expandingDirections() const;
virtual bool hasHeightForWidth() const;
virtual int heightForWidth(int) const;
virtual int count() const;
virtual QLayoutItem *itemAt(int index) const;
virtual QSize minimumSize() const;
virtual void setGeometry(const QRect &rect);
virtual QSize sizeHint() const;
virtual QLayoutItem *takeAt(int index);
Q_SIGNALS:
void mergeTwoApplets();
void splitTwoApplets();
protected:
int layoutApplets(const QRect &rect, bool computeHeightOnly) const;
private:
class Private;
Private *d;
};
}
#endif