umbrello: umbrello/birdview.h Source File

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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

birdview.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2014 Andi Fischer <andi.fischer@hispeed.ch>
3
4 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5*/
6#ifndef BIRDVIEW_H
7#define BIRDVIEW_H
8
9#include <QDockWidget>
10#include <QFrame>
11
12class UMLView;
13
14QT_BEGIN_NAMESPACE
15class QGraphicsView;
16QT_END_NAMESPACE
17
26 class BirdViewDockWidget : public QDockWidget
27{
28 Q_OBJECT
29public:
30 explicit BirdViewDockWidget(const QString& title, QWidget* parent = 0, Qt::WindowFlags flags = 0);
31
32signals:
33 void sizeChanged(const QSize& size);
34
35protected:
36 virtual void resizeEvent(QResizeEvent *event);
37};
38
50 class BirdView : public QFrame
51{
52 Q_OBJECT
53public:
54 BirdView(QDockWidget *parent, UMLView *view);
55 virtual ~BirdView();
56
57 void setSlotsEnabled(bool enabled);
58
59signals:
60 void viewPositionChanged(QPointF delta);
61
62public slots:
63 void slotViewChanged();
64
65protected:
66 virtual void mousePressEvent(QMouseEvent *event);
67 virtual void mouseMoveEvent(QMouseEvent *event);
68 virtual void mouseReleaseEvent(QMouseEvent *event);
69 virtual void keyPressEvent(QKeyEvent *event);
70
71private slots:
72 void slotDockSizeChanged(const QSize &size);
73 void slotDestroyed(QObject *object);
74
75private:
76 UMLView* m_view;
77 QGraphicsView* m_birdView;
78 QFrame* m_protectFrame;
79 QPoint m_moveStartPos;
80
81 static void setBackgroundColor(QFrame* frame, const QColor& color);
82};
83
84#endif // BIRDVIEW_H
BirdViewDockWidget
The class BirdViewDockWidget contains the bird view.
Definition birdview.h:27
BirdViewDockWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *event)
Definition birdview.cpp:262
BirdViewDockWidget::sizeChanged
void sizeChanged(const QSize &size)
BirdViewDockWidget::BirdViewDockWidget
BirdViewDockWidget(const QString &title, QWidget *parent=0, Qt::WindowFlags flags=0)
Definition birdview.cpp:253
BirdView
The class BirdView controls the view of the whole scene.
Definition birdview.h:51
BirdView::slotViewChanged
void slotViewChanged()
Definition birdview.cpp:121
BirdView::m_view
UMLView * m_view
Definition birdview.h:76
BirdView::m_birdView
QGraphicsView * m_birdView
Definition birdview.h:77
BirdView::setBackgroundColor
static void setBackgroundColor(QFrame *frame, const QColor &color)
Definition birdview.cpp:240
BirdView::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition birdview.cpp:136
BirdView::m_moveStartPos
QPoint m_moveStartPos
Definition birdview.h:79
BirdView::BirdView
BirdView(QDockWidget *parent, UMLView *view)
Constructor.
Definition birdview.cpp:29
BirdView::slotDestroyed
void slotDestroyed(QObject *object)
Definition birdview.cpp:76
BirdView::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition birdview.cpp:172
BirdView::mouseMoveEvent
virtual void mouseMoveEvent(QMouseEvent *event)
Definition birdview.cpp:147
BirdView::m_protectFrame
QFrame * m_protectFrame
Definition birdview.h:78
BirdView::viewPositionChanged
void viewPositionChanged(QPointF delta)
BirdView::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition birdview.cpp:163
BirdView::slotDockSizeChanged
void slotDockSizeChanged(const QSize &size)
Definition birdview.cpp:89
BirdView::~BirdView
virtual ~BirdView()
Definition birdview.cpp:65
BirdView::setSlotsEnabled
void setSlotsEnabled(bool enabled)
Definition birdview.cpp:218
UMLView
Definition umlview.h:30