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.h>
00025
00026 class QComboBox;
00027 class QAction;
00028 class KDialog;
00029 class KIntNumInput;
00030
00031 namespace Plasma
00032 {
00033 class PanelSvg;
00034 }
00035
00036 class Panel : public Plasma::Containment
00037 {
00038 Q_OBJECT
00039 public:
00040 Panel(QObject *parent, const QVariantList &args);
00041 ~Panel();
00042 void init();
00043 QList<QAction*> contextualActions();
00044
00045 void constraintsEvent(Plasma::Constraints constraints);
00046
00047 void paintInterface(QPainter *painter,
00048 const QStyleOptionGraphicsItem *option,
00049 const QRect &contentsRect);
00050 void paintBackground(QPainter *painter, const QRect &contentsRect);
00051
00052 protected:
00053 void saveState(KConfigGroup &config) const;
00054
00055 private slots:
00056 void themeUpdated();
00057 void backgroundChanged();
00058 void layoutApplet(Plasma::Applet* applet, const QPointF &pos);
00059 void appletRemoved(Plasma::Applet* applet);
00060 void addPanel();
00061
00062 private:
00066 void setFormFactorFromLocation(Plasma::Location loc);
00067
00071 void updateBorders(const QRect &geom);
00072
00073 Plasma::PanelSvg *m_background;
00074 QAction* m_configureAction;
00075 QAction* m_addPanelAction;
00076
00077
00078 QSize m_currentSize;
00079 QRect m_lastViewGeom;
00080 };
00081
00082
00083 #endif // PLASMA_PANEL_H