Add support for QSizePolicy to the plasma JS bindings

This way we can properly setup size policies for anchors,
improving the use cases of the QGraphicsAnchorLayout.


svn path=/trunk/KDE/kdebase/runtime/; revision=1045779
This commit is contained in:
Artur Duque de Souza 2009-11-06 18:59:41 +00:00
parent a869f09e00
commit ed65303a82

View File

@ -22,6 +22,7 @@
#define APPLETINTERFACE_H
#include <QObject>
#include <QSizePolicy>
#include <QScriptValue>
#include <Plasma/DataEngine>
@ -45,6 +46,7 @@ class AppletInterface : public QObject
Q_ENUMS(AspectRatioMode)
Q_ENUMS(QtOrientation)
Q_ENUMS(QtAnchorPoint)
Q_ENUMS(QtSizePolicy)
Q_ENUMS(QtAlignment)
Q_PROPERTY(QString activeConfig WRITE setActiveConfig READ activeConfig)
Q_PROPERTY(bool busy WRITE setBusy READ isBusy)
@ -111,6 +113,16 @@ enum QtAnchorPoint {
QtAnchorVerticalCenter = Qt::AnchorVerticalCenter
};
enum QtSizePolicy {
QSizePolicyFixed = QSizePolicy::Fixed,
QSizePolicyMinimum = QSizePolicy::Minimum,
QSizePolicyMaximum = QSizePolicy::Maximum,
QSizePolicyPreferred = QSizePolicy::Preferred,
QSizePolicyExpanding = QSizePolicy::Expanding,
QSizePolicyMinimumExpanding = QSizePolicy::MinimumExpanding,
QSizePolicyIgnored = QSizePolicy::Ignored
};
enum QtAlignment {
QtAlignLeft = 0x0001,
QtAlignRight = 0x0002,