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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • graphicsview
FrameGraphicsItem.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2009 Bastian Holst <bastianholst@gmx.de>
9 //
10 
11 #ifndef MARBLE_FRAMEGRAPHICSITEM_H
12 #define MARBLE_FRAMEGRAPHICSITEM_H
13 
14 // Marble
15 #include "marble_export.h"
16 #include "ScreenGraphicsItem.h"
17 #include <QPainterPath>
18 class QBrush;
19 
20 namespace Marble
21 {
22 
23 class FrameGraphicsItemPrivate;
24 
25 class MARBLE_EXPORT FrameGraphicsItem : public ScreenGraphicsItem
26 {
27  public:
28  enum FrameType {
29  NoFrame,
30  RectFrame,
31  RoundedRectFrame,
32  ShadowFrame
33  };
34 
35  explicit FrameGraphicsItem( MarbleGraphicsItem *parent = 0 );
36 
37  virtual ~FrameGraphicsItem();
38 
42  FrameType frame() const;
43 
47  void setFrame( FrameType type );
48 
53  qreal margin() const;
54 
58  void setMargin( qreal margin );
59 
63  qreal marginTop() const;
64 
68  void setMarginTop( qreal marginTop );
69 
73  qreal marginBottom() const;
74 
78  void setMarginBottom( qreal marginBottom );
79 
83  qreal marginLeft() const;
84 
88  void setMarginLeft( qreal marginLeft );
89 
93  qreal marginRight() const;
94 
98  void setMarginRight( qreal marginRight );
99 
103  qreal borderWidth() const;
104 
108  void setBorderWidth( qreal width );
109 
114  qreal padding() const;
115 
119  void setPadding( qreal width );
120 
124  QBrush borderBrush() const;
125 
129  void setBorderBrush( const QBrush &brush );
130 
134  Qt::PenStyle borderStyle () const;
135 
139  void setBorderStyle( Qt::PenStyle style );
140 
144  QBrush background() const;
145 
149  void setBackground( const QBrush &background );
150 
151  QRectF paintedRect() const;
152 
153  QRectF contentRect() const;
154  QSizeF contentSize() const;
155 
160  void setContentSize( const QSizeF& size );
161 
162  protected:
166  virtual QPainterPath backgroundShape() const;
167 
171  virtual void paint( QPainter *painter );
172 
176  virtual void paintContent( QPainter *painter );
177 
181  virtual void paintBackground( QPainter *painter );
182 
183  private:
184  Q_DISABLE_COPY( FrameGraphicsItem )
185 
186  FrameGraphicsItemPrivate * const d;
187 };
188 
189 } // namespace Marble
190 
191 #endif
QPainter
Marble::FrameGraphicsItem
Definition: FrameGraphicsItem.h:25
Marble::FrameGraphicsItemPrivate
Definition: FrameGraphicsItem_p.h:25
Marble::FrameGraphicsItem::RoundedRectFrame
Definition: FrameGraphicsItem.h:31
Marble::FrameGraphicsItem::NoFrame
Definition: FrameGraphicsItem.h:29
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::MarbleGraphicsItem
Definition: MarbleGraphicsItem.h:34
ScreenGraphicsItem.h
Marble::FrameGraphicsItem::FrameType
FrameType
Definition: FrameGraphicsItem.h:28
marble_export.h
Marble::ScreenGraphicsItem
Definition: ScreenGraphicsItem.h:30
Marble::FrameGraphicsItem::RectFrame
Definition: FrameGraphicsItem.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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