Plasma
panelview.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_PANELVIEW_H
00021 #define PLASMA_PANELVIEW_H
00022
00023 #include <QList>
00024
00025 #include <KConfigGroup>
00026
00027 #include <plasma/plasma.h>
00028 #include <plasma/view.h>
00029
00030 class QWidget;
00031
00032 namespace Plasma
00033 {
00034 class Containment;
00035 class Corona;
00036 class Svg;
00037 }
00038
00039 class PanelController;
00040 class PanelAppletOverlay;
00041
00042 class PanelView : public Plasma::View
00043 {
00044 Q_OBJECT
00045 public:
00046
00051 explicit PanelView(Plasma::Containment *panel, int id = 0, QWidget *parent = 0);
00052 ~PanelView();
00053
00057 Plasma::Location location() const;
00058
00062 Plasma::Corona *corona() const;
00063
00067 int offset() const;
00068
00072 Qt::Alignment alignment() const;
00073
00077 void pinchContainment(const QRect &screenGeometry);
00078
00079 public Q_SLOTS:
00089 void setOffset(int newOffset);
00090
00096 void setAlignment(Qt::Alignment align);
00097
00102 void setLocation(Plasma::Location location);
00103
00104 protected:
00105 void updateStruts();
00106 void moveEvent(QMoveEvent *event);
00107 void resizeEvent(QResizeEvent *event);
00108
00109 private Q_SLOTS:
00110 void showAppletBrowser();
00111 void togglePanelController();
00112 void edittingComplete();
00113
00118 void updatePanelGeometry();
00119
00120 private:
00121 Qt::Alignment alignmentFilter(Qt::Alignment align) const;
00122 bool isHorizontal() const;
00123
00124 Plasma::Svg *m_background;
00125 PanelController *m_panelController;
00126 QList<PanelAppletOverlay*> m_moveOverlays;
00127
00128 int m_offset;
00129 Qt::Alignment m_alignment;
00130 QSizeF m_lastMin;
00131 QSizeF m_lastMax;
00132 int m_lastSeenSize;
00133 bool m_lastHorizontal;
00134 bool m_editting;
00135 };
00136
00137 #endif
00138