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

GroupingDesktop

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • containments
  • groupingdesktop
  • lib
  • groupexplorer
explorerwindow.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009 Aaron Seigo <aseigo@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 EXPLORERWINDOW_H
21 #define EXPLORERWINDOW_H
22 
23 #include <QWidget>
24 
25 #include <Plasma/Plasma>
26 
27 class QBoxLayout;
28 class QGraphicsWidget;
29 
30 namespace Plasma
31 {
32  class Containment;
33  class Corona;
34  class FrameSvg;
35  class WidgetExplorer;
36 }
37 
38 class GroupExplorer;
39 
40 class ExplorerWindow : public QWidget
41 {
42  Q_OBJECT
43 
44 public:
45  static ExplorerWindow *instance();
46  ~ExplorerWindow();
47 
48  virtual void setContainment(Plasma::Containment *containment);
49  Plasma::Containment *containment() const;
50 
51  virtual void setLocation(const Plasma::Location &loc);
52  Plasma::Location location() const;
53  Qt::Orientation orientation() const;
54  QPoint positionForPanelGeometry(const QRect &panelGeom) const;
55 
56  void showGroupExplorer();
57  bool isControllerViewVisible() const;
58 
59  Plasma::FrameSvg *background() const;
60 
61 protected:
62  void setGraphicsWidget(QGraphicsWidget *widget);
63 
64  void resizeEvent(QResizeEvent *event);
65  void paintEvent(QPaintEvent *event);
66  void keyPressEvent(QKeyEvent *event);
67  bool eventFilter(QObject *watched, QEvent *event);
68 
69 private Q_SLOTS:
70  void onActiveWindowChanged(WId id);
71  void backgroundChanged();
72  void adjustSize(int screen);
73  void syncToGraphicsWidget();
74 
75 private:
76  ExplorerWindow(QWidget* parent = 0);
77 
78  static ExplorerWindow *s_instance;
79  Plasma::Location m_location;
80  QBoxLayout *m_layout;
81  Plasma::FrameSvg *m_background;
82  QWeakPointer<Plasma::Containment> m_containment;
83  Plasma::Corona *m_corona;
84  QGraphicsView *m_view;
85  GroupExplorer *m_groupManager;
86  QGraphicsWidget *m_graphicsWidget;
87  QTimer *m_adjustViewTimer;
88 };
89 
90 #endif
91 
ExplorerWindow::paintEvent
void paintEvent(QPaintEvent *event)
Definition: explorerwindow.cpp:393
QEvent
QResizeEvent
QWidget
ExplorerWindow
Definition: explorerwindow.h:40
ExplorerWindow::background
Plasma::FrameSvg * background() const
Definition: explorerwindow.cpp:375
ExplorerWindow::~ExplorerWindow
~ExplorerWindow()
Definition: explorerwindow.cpp:85
QPoint
QWidget::adjustSize
void adjustSize()
ExplorerWindow::location
Plasma::Location location() const
Definition: explorerwindow.cpp:326
QRect
QTimer
QObject
ExplorerWindow::setGraphicsWidget
void setGraphicsWidget(QGraphicsWidget *widget)
Definition: explorerwindow.cpp:153
QGraphicsWidget
ExplorerWindow::showGroupExplorer
void showGroupExplorer()
Definition: explorerwindow.cpp:341
ExplorerWindow::setLocation
virtual void setLocation(const Plasma::Location &loc)
Definition: explorerwindow.cpp:254
ExplorerWindow::instance
static ExplorerWindow * instance()
Definition: explorerwindow.cpp:99
QKeyEvent
ExplorerWindow::resizeEvent
void resizeEvent(QResizeEvent *event)
Definition: explorerwindow.cpp:410
GroupExplorer
Definition: groupexplorer.h:33
ExplorerWindow::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: explorerwindow.cpp:244
QWeakPointer< Plasma::Containment >
ExplorerWindow::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: explorerwindow.cpp:403
QPaintEvent
ExplorerWindow::orientation
Qt::Orientation orientation() const
Definition: explorerwindow.cpp:331
ExplorerWindow::containment
Plasma::Containment * containment() const
Definition: explorerwindow.cpp:148
ExplorerWindow::setContainment
virtual void setContainment(Plasma::Containment *containment)
Definition: explorerwindow.cpp:123
QObject::parent
QObject * parent() const
QWidget::event
virtual bool event(QEvent *event)
QGraphicsView
QBoxLayout
ExplorerWindow::positionForPanelGeometry
QPoint positionForPanelGeometry(const QRect &panelGeom) const
Definition: explorerwindow.cpp:298
ExplorerWindow::isControllerViewVisible
bool isControllerViewVisible() const
Definition: explorerwindow.cpp:370
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

GroupingDesktop

Skip menu "GroupingDesktop"
  • Main Page
  • Namespace List
  • 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