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

Plasma

panel.h

Go to the documentation of this file.
00001 /*
00002 *   Copyright 2007 by Alex Merry <alex.merry@kdemail.net>
00003 *   Copyright 2008 by Alexis Ménard <darktears31@gmail.com>
00004 *
00005 *
00006 *   This program is free software; you can redistribute it and/or modify
00007 *   it under the terms of the GNU Library General Public License version 2,
00008 *   or (at your option) any later version.
00009 *
00010 *   This program is distributed in the hope that it will be useful,
00011 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 *   GNU General Public License for more details
00014 *
00015 *   You should have received a copy of the GNU Library General Public
00016 *   License along with this program; if not, write to the
00017 *   Free Software Foundation, Inc.,
00018 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019 */
00020 
00021 #ifndef PLASMA_PANEL_H
00022 #define PLASMA_PANEL_H
00023 
00024 #include <Plasma/Containment>
00025 
00026 class QComboBox;
00027 class QAction;
00028 class KDialog;
00029 class KIntNumInput;
00030 class Spacer;
00031 
00032 namespace Plasma
00033 {
00034     class FrameSvg;
00035 }
00036 
00037 class Panel : public Plasma::Containment
00038 {
00039     Q_OBJECT
00040 public:
00041     Panel(QObject *parent, const QVariantList &args);
00042     ~Panel();
00043     void init();
00044     QList<QAction*> contextualActions();
00045 
00046     void constraintsEvent(Plasma::Constraints constraints);
00047 
00048     void paintInterface(QPainter *painter,
00049                         const QStyleOptionGraphicsItem *option,
00050                         const QRect &contentsRect);
00051     void paintBackground(QPainter *painter, const QRect &contentsRect);
00052     void showDropZone(const QPoint pos);
00053 
00054 protected:
00055     void saveState(KConfigGroup &config) const;
00056 
00057 private slots:
00058     void themeUpdated();
00059     void backgroundChanged();
00060     void layoutApplet(Plasma::Applet* applet, const QPointF &pos);
00061     void appletRemoved(Plasma::Applet* applet);
00062     void updateSize();
00063     void addPanel();
00064 
00065 private:
00069     void setFormFactorFromLocation(Plasma::Location loc);
00070 
00074     void updateBorders(const QRect &geom);
00075 
00076     Plasma::FrameSvg *m_background;
00077     QAction* m_configureAction;
00078     QAction* m_addPanelAction;
00079 
00080     //cached values
00081     QSize m_currentSize;
00082     QRect m_lastViewGeom;
00083     bool m_maskDirty;
00084     int m_spacerIndex;
00085     Spacer *m_spacer;
00086 
00087     friend class Spacer;
00088 };
00089 
00090 
00091 #endif // PLASMA_PANEL_H

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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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