libplasma
borderlayout.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLASMA_BORDER_LAYOUT
00021 #define PLASMA_BORDER_LAYOUT
00022
00023 #include <QtCore/QMap>
00024
00025 #include <plasma/plasma_export.h>
00026 #include <plasma/plasma.h>
00027 #include <plasma/layouts/layout.h>
00028
00029 namespace Plasma {
00030
00037 class PLASMA_EXPORT BorderLayout : public Layout {
00038 public:
00039
00040 explicit BorderLayout(LayoutItem * parent = 0);
00041 virtual ~BorderLayout();
00042
00043 virtual Qt::Orientations expandingDirections() const;
00044
00045 QSizeF sizeHint() const;
00046
00051 void addItem(Plasma::LayoutItem * item);
00052
00056 void addItem(Plasma::LayoutItem * item, Position position);
00057
00058 void removeItem(Plasma::LayoutItem * item);
00059
00060 virtual int count() const;
00061 virtual int indexOf(LayoutItem * item) const;
00062 virtual LayoutItem * itemAt(int i) const;
00063 virtual LayoutItem * takeAt(int i);
00064
00072 void setSize(qreal size, Position border);
00073
00078 void setAutoSize(Position border);
00079
00085 qreal size(Position border);
00086
00087 protected:
00088 void relayout();
00089
00090 private:
00091 class Private;
00092 Private * const d;
00093 };
00094
00095 }
00096
00097 #endif