2 * Copyright 2008 Marco Martin <notmart@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Library General Public License as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef PANELCONTROLLER_H
21 #define PANELCONTROLLER_H
25 #include <Plasma/Plasma>
27 #include "panelview.h"
36 class PanelController
: public QWidget
41 PanelController(QWidget
* parent
= 0);
44 QSize
sizeHint() const;
46 QPoint
positionForPanelGeometry(const QRect
&panelGeom
) const;
47 void setContainment(Plasma::Containment
*containment
);
48 void resizePanel(const QSizeF newSize
);
50 void setLocation(const Plasma::Location
&loc
);
51 Plasma::Location
location() const;
53 void setOffset(int newOffset
);
56 void setAlignment(const Qt::Alignment
&newAlignment
);
57 Qt::Alignment
alignment() const;
59 void setVisibilityMode(PanelView::VisibilityMode
);
60 PanelView::VisibilityMode
panelVisibilityMode() const;
66 void paintEvent(QPaintEvent
*event
);
67 bool eventFilter(QObject
*watched
, QEvent
*event
);
68 void focusOutEvent(QFocusEvent
* event
);
72 * Emitted when the controller requests an add widgets dialog is shown.
74 void offsetChanged(int offset
);
75 void alignmentChanged(Qt::Alignment
);
76 void locationChanged(Plasma::Location
);
77 void panelVisibilityModeChanged(PanelView::VisibilityMode mode
);
80 void mouseMoveFilter(QMouseEvent
*event
);
82 Q_PRIVATE_SLOT(d
, void rulersMoved(int offset
, int minLength
, int minLength
))
83 Q_PRIVATE_SLOT(d
, void alignToggled(bool toggle
))
84 Q_PRIVATE_SLOT(d
, void panelVisibilityModeChanged(bool toggle
))
85 Q_PRIVATE_SLOT(d
, void settingsPopup())
86 Q_PRIVATE_SLOT(d
, void maximizePanel())
95 #endif // multiple inclusion guard