• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • workspace API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • libs
  • lancelot
  • widgets
Panel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007, 2008, 2009, 2010 Ivan Cukic <ivan.cukic(at)kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser/Library General Public License version 2,
6  * or (at your option) any later version, as published by the Free
7  * Software Foundation
8  *
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 Lesser/Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Lesser/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.
18  */
19 
20 #ifndef LANCELOT_PANEL_H
21 #define LANCELOT_PANEL_H
22 
23 #include <QtGui/QIcon>
24 
25 #include <Plasma/Plasma>
26 
27 #include <lancelot/lancelot_export.h>
28 #include <lancelot/widgets/Widget.h>
29 
30 namespace Lancelot
31 {
32 
38 class LANCELOT_EXPORT Panel: public Lancelot::Widget
39 {
40  Q_OBJECT
41 
42  Q_PROPERTY ( QIcon icon READ icon WRITE setIcon )
43  Q_PROPERTY ( QSize iconSize READ iconSize WRITE setIconSize )
44  Q_PROPERTY ( QString title READ title WRITE setTitle ) L_EXTRA ( i18n )
45  Q_PROPERTY ( bool showingTitle READ isShowingTitle WRITE setShowingTitle )
46 
47  // @puck L_WIDGET
48  // @puck L_INCLUDE(lancelot/widgets/Panel.h QIcon QSize QString)
49 
50 public:
55  Panel(QGraphicsItem * parent = 0);
56 
63  explicit Panel(QIcon icon, QString title = QString(),
64  QGraphicsItem * parent = 0);
65 
71  explicit Panel(QString title, QGraphicsItem * parent = 0);
72 
76  virtual ~Panel();
77 
82  void setTitle(const QString & title);
83 
87  QString title() const;
88 
93  void setIcon(QIcon icon);
94 
98  QIcon icon() const;
99 
104  void setIconSize(QSize size);
105 
109  QSize iconSize() const;
110 
114  void setShowingTitle(bool value);
115 
119  bool isShowingTitle() const;
120 
126  void setLayoutItem(QGraphicsLayoutItem * layoutItem);
127 
131  QGraphicsLayoutItem * layoutItem() const;
132 
137  qreal borderSize(Plasma::MarginEdge edge) const;
138 
139  L_Override void setGroup(Group * group = NULL);
140 
141 protected:
142  // L_Override void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0);
143  L_Override QSizeF sizeHint(Qt::SizeHint which,
144  const QSizeF & constraint = QSizeF()) const;
145  L_Override void resizeEvent(QGraphicsSceneResizeEvent * event);
146 
147 private:
148  class Private;
149  Private * const d;
150 };
151 
152 } // namespace Lancelot
153 
154 #endif /* LANCELOT_PANEL_H */
155 
QGraphicsItem
L_Override
#define L_Override
Definition: lancelot_export.h:41
lancelot_export.h
Lancelot::Widget
Base class for Widgets that want to use Lancelot framework.
Definition: Widget.h:37
Lancelot::Group
Represents a group of object.
Definition: Global.h:63
LANCELOT_EXPORT
#define LANCELOT_EXPORT
Definition: lancelot_export.h:32
L_EXTRA
#define L_EXTRA(A)
Definition: lancelot_export.h:47
Lancelot::Panel
A container widget with optional title-bar.
Definition: Panel.h:38
QString
QGraphicsSceneResizeEvent
QSize
Widget.h
QSizeF
QGraphicsLayoutItem
QIcon
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

Skip menu "liblancelot"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal