Plasma
panel.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
00021 #ifndef PLASMA_PANEL_H
00022 #define PLASMA_PANEL_H
00023
00024 #include <Plasma/Containment>
00025
00026 class QComboBox;
00027 class QAction;
00028 class KDialog;
00029 class KIntNumInput;
00030 class Spacer;
00031
00032 namespace Plasma
00033 {
00034 class FrameSvg;
00035 }
00036
00037 class Panel : public Plasma::Containment
00038 {
00039 Q_OBJECT
00040 public:
00041 Panel(QObject *parent, const QVariantList &args);
00042 ~Panel();
00043 void init();
00044 QList<QAction*> contextualActions();
00045
00046 void constraintsEvent(Plasma::Constraints constraints);
00047
00048 void paintInterface(QPainter *painter,
00049 const QStyleOptionGraphicsItem *option,
00050 const QRect &contentsRect);
00051 void paintBackground(QPainter *painter, const QRect &contentsRect);
00052 void showDropZone(const QPoint pos);
00053
00054 protected:
00055 void saveState(KConfigGroup &config) const;
00056
00057 private slots:
00058 void themeUpdated();
00059 void backgroundChanged();
00060 void layoutApplet(Plasma::Applet* applet, const QPointF &pos);
00061 void appletRemoved(Plasma::Applet* applet);
00062 void updateSize();
00063 void addPanel();
00064
00065 private:
00069 void setFormFactorFromLocation(Plasma::Location loc);
00070
00074 void updateBorders(const QRect &geom);
00075
00076 Plasma::FrameSvg *m_background;
00077 QAction* m_configureAction;
00078 QAction* m_addPanelAction;
00079
00080
00081 QSize m_currentSize;
00082 QRect m_lastViewGeom;
00083 bool m_maskDirty;
00084 int m_spacerIndex;
00085 Spacer *m_spacer;
00086
00087 friend class Spacer;
00088 };
00089
00090
00091 #endif // PLASMA_PANEL_H