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

PlasmaComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmacomponents
fullscreenwindow.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 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 FULLSCREENWINDOW_P
21 #define FULLSCREENWINDOW_P
22 
23 #include <QObject>
24 #include <QPoint>
25 #include <QRect>
26 #include <QWeakPointer>
27 #include <QDeclarativeListProperty>
28 #include <QDeclarativeItem>
29 
30 #include "enums.h"
31 
32 class QGraphicsObject;
33 class QGraphicsView;
34 class QGraphicsScene;
35 class DeclarativeItemContainer;
36 class Background;
37 
38 class FullScreenWindow : public QDeclarativeItem
39 {
40  Q_OBJECT
41 
42  Q_PROPERTY(QDeclarativeListProperty<QGraphicsObject> title READ title DESIGNABLE false)
43  Q_PROPERTY(QDeclarativeListProperty<QGraphicsObject> content READ content DESIGNABLE false)
44  Q_PROPERTY(QDeclarativeListProperty<QGraphicsObject> buttons READ buttons DESIGNABLE false)
45  Q_PROPERTY(DialogStatus::Status status READ status NOTIFY statusChanged)
46 
47 
48 public:
49  FullScreenWindow(QDeclarativeItem *parent = 0);
50  ~FullScreenWindow();
51 
52  QGraphicsObject *mainItem() const;
53  void setMainItem(QGraphicsObject *mainItem);
54 
55  bool isVisible() const;
56  void setVisible(const bool visible);
57 
58  QGraphicsView *view() const;
59 
60  //QML properties
61  QDeclarativeListProperty<QGraphicsObject> title();
62  QDeclarativeListProperty<QGraphicsObject> content();
63  QDeclarativeListProperty<QGraphicsObject> buttons();
64  DialogStatus::Status status() const;
65 
66  Q_INVOKABLE void open();
67  Q_INVOKABLE void accept();
68  Q_INVOKABLE void reject();
69  Q_INVOKABLE void close();
70 
71 Q_SIGNALS:
72  void accepted();
73  void rejected();
74  void clickedOutside();
75  void statusChanged();
76 
77 
78 private Q_SLOTS:
79  void syncViewToMainItem();
80  void syncMainItemToView();
81  void statusHasChanged();
82 
83 protected:
84  bool eventFilter(QObject *watched, QEvent *event);
85  void init(const QString &componentName);
86 
87 private:
88  QGraphicsView *m_view;
89  QWeakPointer<QGraphicsObject> m_mainItem;
90  DeclarativeItemContainer *m_declarativeItemContainer;
91  QGraphicsScene *m_scene;
92  QWeakPointer<QObject> m_rootObject;
93  static uint s_numItems;
94  Background *m_background;
95 
96  //those only used in case of error, to not make plasma crash
97  QList<QGraphicsObject *> m_dummyTitleElements;
98  QList<QGraphicsObject *> m_dummyContentElements;
99  QList<QGraphicsObject *> m_dummyButtonsElements;
100  friend class Background;
101 };
102 
103 #endif
FullScreenWindow::content
QDeclarativeListProperty< QGraphicsObject > content()
FullScreenWindow::accepted
void accepted()
QEvent
QGraphicsScene
FullScreenWindow::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: fullscreenwindow.cpp:379
QGraphicsObject::visible
visible
FullScreenWindow::status
DialogStatus::Status status() const
FullScreenWindow::clickedOutside
void clickedOutside()
QObject::event
virtual bool event(QEvent *e)
FullScreenWindow::isVisible
bool isVisible() const
Definition: fullscreenwindow.cpp:274
FullScreenWindow::title
QDeclarativeListProperty< QGraphicsObject > title()
QObject
FullScreenWindow::accept
Q_INVOKABLE void accept()
Definition: fullscreenwindow.cpp:355
FullScreenWindow::rejected
void rejected()
FullScreenWindow::Background
friend class Background
Definition: fullscreenwindow.h:100
QString
QList
FullScreenWindow::buttons
QDeclarativeListProperty< QGraphicsObject > buttons()
FullScreenWindow::setMainItem
void setMainItem(QGraphicsObject *mainItem)
Definition: fullscreenwindow.cpp:171
DialogStatus
Definition: enums.h:27
QGraphicsObject
FullScreenWindow::mainItem
QGraphicsObject * mainItem() const
Definition: fullscreenwindow.cpp:166
FullScreenWindow::setVisible
void setVisible(const bool visible)
Definition: fullscreenwindow.cpp:279
FullScreenWindow::view
QGraphicsView * view() const
Definition: fullscreenwindow.cpp:295
FullScreenWindow::reject
Q_INVOKABLE void reject()
Definition: fullscreenwindow.cpp:362
FullScreenWindow::open
Q_INVOKABLE void open()
Definition: fullscreenwindow.cpp:348
enums.h
FullScreenWindow::init
void init(const QString &componentName)
Definition: fullscreenwindow.cpp:120
QWeakPointer
QDeclarativeItem
FullScreenWindow::close
Q_INVOKABLE void close()
Definition: fullscreenwindow.cpp:369
QObject::parent
QObject * parent() const
QDeclarativeListProperty
QGraphicsView
FullScreenWindow
Definition: fullscreenwindow.h:38
FullScreenWindow::statusChanged
void statusChanged()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaComponents

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

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