• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaCore

  • sources
  • kde-4.12
  • kde-runtime
  • plasma
  • declarativeimports
  • core
declarativeitemcontainer_p.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Marco Martin <mart@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
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 General Public License for more details
13  *
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.
18  */
19 
20 #ifndef DECLARATIVEITEMCONTAINER_P
21 #define DECLARATIVEITEMCONTAINER_P
22 
23 #include <QDeclarativeItem>
24 #include <QGraphicsObject>
25 #include <QGraphicsWidget>
26 #include <QGraphicsSceneResizeEvent>
27 
28 
29 class DeclarativeItemContainer : public QGraphicsWidget
30 {
31  Q_OBJECT
32 
33 public:
34  DeclarativeItemContainer(QGraphicsItem *parent = 0);
35  ~DeclarativeItemContainer();
36 
37  void setDeclarativeItem(QDeclarativeItem *item, bool reparent = true);
38  QDeclarativeItem *declarativeItem() const;
39 
40 protected:
41  void resizeEvent(QGraphicsSceneResizeEvent *event);
42  void mousePressEvent(QGraphicsSceneMouseEvent *event);
43 
44 protected Q_SLOTS:
45  void widthChanged();
46  void heightChanged();
47 
48  void minimumWidthChanged();
49  void minimumHeightChanged();
50  void maximumWidthChanged();
51  void maximumHeightChanged();
52  void preferredWidthChanged();
53  void preferredHeightChanged();
54 
55 private:
56  QWeakPointer<QDeclarativeItem> m_declarativeItem;
57 };
58 
59 #endif
DeclarativeItemContainer::setDeclarativeItem
void setDeclarativeItem(QDeclarativeItem *item, bool reparent=true)
Definition: declarativeitemcontainer.cpp:33
DeclarativeItemContainer
Definition: declarativeitemcontainer_p.h:29
DeclarativeItemContainer::minimumHeightChanged
void minimumHeightChanged()
Definition: declarativeitemcontainer.cpp:156
DeclarativeItemContainer::minimumWidthChanged
void minimumWidthChanged()
Definition: declarativeitemcontainer.cpp:150
DeclarativeItemContainer::~DeclarativeItemContainer
~DeclarativeItemContainer()
Definition: declarativeitemcontainer.cpp:29
DeclarativeItemContainer::maximumHeightChanged
void maximumHeightChanged()
Definition: declarativeitemcontainer.cpp:168
DeclarativeItemContainer::DeclarativeItemContainer
DeclarativeItemContainer(QGraphicsItem *parent=0)
Definition: declarativeitemcontainer.cpp:24
QDeclarativeItem
DeclarativeItemContainer::declarativeItem
QDeclarativeItem * declarativeItem() const
Definition: declarativeitemcontainer.cpp:109
DeclarativeItemContainer::preferredHeightChanged
void preferredHeightChanged()
Definition: declarativeitemcontainer.cpp:180
DeclarativeItemContainer::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: declarativeitemcontainer.cpp:122
DeclarativeItemContainer::maximumWidthChanged
void maximumWidthChanged()
Definition: declarativeitemcontainer.cpp:162
DeclarativeItemContainer::resizeEvent
void resizeEvent(QGraphicsSceneResizeEvent *event)
Definition: declarativeitemcontainer.cpp:114
DeclarativeItemContainer::widthChanged
void widthChanged()
Definition: declarativeitemcontainer.cpp:127
DeclarativeItemContainer::heightChanged
void heightChanged()
Definition: declarativeitemcontainer.cpp:138
DeclarativeItemContainer::preferredWidthChanged
void preferredWidthChanged()
Definition: declarativeitemcontainer.cpp:174
QGraphicsWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:02:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaCore

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

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

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