umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

birdview.h
Go to the documentation of this file.
1 /*
2 Copyright 2014 Andi Fischer <andi.fischer@hispeed.ch>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of
7 the License or (at your option) version 3 or any later version
8 accepted by the membership of KDE e.V. (or its successor approved
9 by the membership of KDE e.V.), which shall act as a proxy
10 defined in Section 14 of version 3 of the license.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef BIRDVIEW_H
21 #define BIRDVIEW_H
22
23 #include <QDockWidget>
24 #include <QFrame>
25
26 class UMLView;
27
28 QT_BEGIN_NAMESPACE
29 class QGraphicsView;
30 QT_END_NAMESPACE
31
40 class BirdViewDockWidget : public QDockWidget
41 {
42 Q_OBJECT
43 public:
44 explicit BirdViewDockWidget(const QString& title, QWidget* parent = 0, Qt::WindowFlags flags = 0);
45
46 signals:
47 void sizeChanged(const QSize& size);
48
49 protected:
50 virtual void resizeEvent(QResizeEvent *event);
51 };
52
64 class BirdView : public QFrame
65 {
66 Q_OBJECT
67 public:
68 BirdView(QDockWidget *parent, UMLView *view);
69 virtual ~BirdView();
70
71 void setSlotsEnabled(bool enabled);
72
73 signals:
74 void viewPositionChanged(QPointF delta);
75
76 public slots:
77 void slotViewChanged();
78
79 protected:
80 virtual void mousePressEvent(QMouseEvent *event);
81 virtual void mouseMoveEvent(QMouseEvent *event);
82 virtual void mouseReleaseEvent(QMouseEvent *event);
83 virtual void keyPressEvent(QKeyEvent *event);
84
85 private slots:
86 void slotDockSizeChanged(const QSize &size);
87 void slotDestroyed(QObject *object);
88
89 private:
90 UMLView* m_view;
91 QGraphicsView* m_birdView;
92 QFrame* m_protectFrame;
93 QPoint m_moveStartPos;
94
95 static void setBackgroundColor(QFrame* frame, const QColor& color);
96 };
97
98 #endif // BIRDVIEW_H
UMLApp::currentView
UMLView * currentView() const
Definition: uml.cpp:3166
umlview.h
BirdView::m_birdView
QGraphicsView * m_birdView
Definition: birdview.h:91
BirdViewDockWidget
The class BirdViewDockWidget contains the bird view.
Definition: birdview.h:41
BirdView::slotViewChanged
void slotViewChanged()
Definition: birdview.cpp:135
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
BirdView::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
Definition: birdview.cpp:161
BirdView::setSlotsEnabled
void setSlotsEnabled(bool enabled)
Definition: birdview.cpp:232
BirdView
The class BirdView controls the view of the whole scene.
Definition: birdview.h:65
BirdViewDockWidget::sizeChanged
void sizeChanged(const QSize &size)
Definition: moc_birdview.cpp:129
BirdView::~BirdView
virtual ~BirdView()
Definition: birdview.cpp:78
BirdView::slotDestroyed
void slotDestroyed(QObject *object)
Definition: birdview.cpp:89
birdview.h
BirdView::m_view
UMLView * m_view
Definition: birdview.h:90
UMLView
Definition: umlview.h:35
BirdView::BirdView
BirdView(QDockWidget *parent, UMLView *view)
Constructor.
Definition: birdview.cpp:42
BirdView::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: birdview.cpp:150
BirdView::slotDockSizeChanged
void slotDockSizeChanged(const QSize &size)
Definition: birdview.cpp:102
BirdView::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: birdview.cpp:177
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
BirdView::viewPositionChanged
void viewPositionChanged(QPointF delta)
Definition: moc_birdview.cpp:259
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
BirdView::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: birdview.cpp:186
DEBUG
#define DEBUG(src)
Definition: debug_utils.h:129
BirdView::m_protectFrame
QFrame * m_protectFrame
Definition: birdview.h:92
umlscene.h
uml.h
BirdViewDockWidget::BirdViewDockWidget
BirdViewDockWidget(const QString &title, QWidget *parent=0, Qt::WindowFlags flags=0)
Definition: birdview.cpp:267
debug_utils.h
UMLScene
Definition: umlscene.h:69
DBG_SRC
#define DBG_SRC
Definition: import_utils.cpp:43
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
BirdViewDockWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
Definition: birdview.cpp:276
BirdView::setBackgroundColor
static void setBackgroundColor(QFrame *frame, const QColor &color)
Definition: birdview.cpp:254
BirdView::m_moveStartPos
QPoint m_moveStartPos
Definition: birdview.h:93