• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

panelview.h

Go to the documentation of this file.
00001 /*
00002 *   Copyright 2007 by Matt Broadstone <mbroadst@kde.org>
00003 *   Copyright 2007 by Robert Knight <robertknight@gmail.com>
00004 *
00005 *   This program is free software; you can redistribute it and/or modify
00006 *   it under the terms of the GNU Library General Public License version 2, 
00007 *   or (at your option) any later version.
00008 *
00009 *   This program is distributed in the hope that it will be useful,
00010 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 *   GNU General Public License for more details
00013 *
00014 *   You should have received a copy of the GNU Library General Public
00015 *   License along with this program; if not, write to the
00016 *   Free Software Foundation, Inc.,
00017 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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 

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal