Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / plasma / plasma / panelview.h
blob2b49e8ef8ca69b69dd9747db3b737eda0cf5a1ae
1 /*
2 * Copyright 2007 by Matt Broadstone <mbroadst@kde.org>
3 * Copyright 2007 by Robert Knight <robertknight@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License version 2,
7 * or (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 PLASMA_PANELVIEW_H
21 #define PLASMA_PANELVIEW_H
23 #include <plasma/plasma.h>
24 #include <plasma/view.h>
26 class QWidget;
28 namespace Plasma
30 class Containment;
31 class Corona;
32 class Svg;
35 class PanelView : public Plasma::View
37 Q_OBJECT
38 public:
40 /**
41 * Constructs a new panelview.
42 * @arg parent the QWidget this panel is parented to
44 explicit PanelView(Plasma::Containment *panel, QWidget *parent = 0);
46 /**
47 * Sets the location (screen edge) where this panel is positioned.
48 * @param location the location to place the panel at
50 void setLocation(Plasma::Location location);
52 /**
53 * @return the location (screen edge) where this panel is positioned.
55 Plasma::Location location() const;
57 /**
58 * @return the Corona (scene) associated with this panel.
60 Plasma::Corona *corona() const;
62 protected:
63 void updateStruts();
64 virtual void moveEvent(QMoveEvent *event);
65 virtual void resizeEvent(QResizeEvent *event);
67 private slots:
68 void updatePanelGeometry();
69 void showAppletBrowser();
71 private:
72 Plasma::Svg *m_background;
75 #endif