-
Notifications
You must be signed in to change notification settings - Fork 0
/
DocDockWidget.h
73 lines (52 loc) · 1.58 KB
/
DocDockWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* DocDockWidget.h
* Copyright (c) 2013 ROBLOX Corp. All Rights Reserved.
*/
#pragma once
// Qt Headers
#include <QDockWidget>
// Roblox Headers
#include "rbx/BaldPtr.h"
// Roblox Studio Headers
#include "IRobloxDoc.h"
class RobloxMainWindow;
class DocDockManager;
class DocDockWidget : public QDockWidget
{
Q_OBJECT
public:
DocDockWidget(
RobloxMainWindow& mainWindow,
DocDockManager& docManager,
IRobloxDoc& doc );
virtual ~DocDockWidget();
void setTitle(const QString& displayName,const QString& fileName);
void cleanup();
void startDragging();
public Q_SLOTS:
void onAttachDoc();
void onTopLevelChanged(bool TopLevel);
void onDockLocationChanged(Qt::DockWidgetArea area);
void onFocusChanged(QWidget* oldWidget,QWidget* newWidget);
protected:
virtual void closeEvent(QCloseEvent* event);
virtual void moveEvent(QMoveEvent* event);
virtual void resizeEvent(QResizeEvent* event);
virtual void mouseMoveEvent(QMouseEvent* event);
virtual bool event(QEvent* event);
virtual QSize sizeHint() const { return maximumSize(); }
#ifdef Q_WS_WIN32
virtual bool winEvent(MSG* msg,long* result);
#endif
private:
void simulateDrag();
bool stopDragging();
RobloxMainWindow& m_MainWindow;
DocDockManager& m_DocManager;
IRobloxDoc& m_Doc;
IRobloxDoc::RBXDocType m_DocType;
RBX::BaldPtr<QWidget> m_Viewer;
bool m_IsMoving;
bool m_IsSimulatingDrag;
QPoint m_StartPos;
};