@@ -97,6 +97,7 @@ ApplicationWindow {
97
97
property alias showGraphEditor: graphEditorVisibilityCB .checked
98
98
property alias showImageViewer: imageViewerVisibilityCB .checked
99
99
property alias showViewer3D: viewer3DVisibilityCB .checked
100
+ property alias showImageGallery: imageGalleryVisibilityCB .checked
100
101
}
101
102
102
103
Component .onDestruction : {
@@ -112,6 +113,67 @@ ApplicationWindow {
112
113
onActivated: ensureSaved (function () { _reconstruction .new () })
113
114
}
114
115
116
+ // Action to put component with mouse focus in fullscreen
117
+ Action {
118
+ id: showFullScreenAction
119
+
120
+ property bool isFullScreen: false
121
+ property Settings settingsBeforeFullScreen: Settings {
122
+ property bool showLiveReconstruction: false
123
+ property bool showImageViewer: false
124
+ property bool showViewer3D: false
125
+ property bool showGraphEditor: false
126
+ property bool showImageGallery: false
127
+ }
128
+
129
+ function setSettingsBeforeFullScreen (setting ) {
130
+ settingsBeforeFullScreen .showLiveReconstruction = settings_UILayout .showLiveReconstruction
131
+ settingsBeforeFullScreen .showImageViewer = settings_UILayout .showImageViewer
132
+ settingsBeforeFullScreen .showViewer3D = settings_UILayout .showViewer3D
133
+ settingsBeforeFullScreen .showGraphEditor = settings_UILayout .showGraphEditor
134
+ settingsBeforeFullScreen .showImageGallery = settings_UILayout .showImageGallery
135
+
136
+ // set all to false except the one that triggered the fullscreen
137
+ for (var name in settings_UILayout) {
138
+ if (name !== setting && ! settings_UILayout[name].readOnly && typeof settings_UILayout[name] === " boolean" )
139
+ settings_UILayout[name] = false
140
+ }
141
+
142
+ isFullScreen = true
143
+ }
144
+
145
+ function setSettingsAfterFullScreen () {
146
+ settings_UILayout .showLiveReconstruction = settingsBeforeFullScreen .showLiveReconstruction
147
+ settings_UILayout .showImageViewer = settingsBeforeFullScreen .showImageViewer
148
+ settings_UILayout .showViewer3D = settingsBeforeFullScreen .showViewer3D
149
+ settings_UILayout .showGraphEditor = settingsBeforeFullScreen .showGraphEditor
150
+ settings_UILayout .showImageGallery = settingsBeforeFullScreen .showImageGallery
151
+ }
152
+
153
+ shortcut: " Shift+F"
154
+ onTriggered: {
155
+ if (isFullScreen) {
156
+ setSettingsAfterFullScreen ()
157
+ if (settings_UILayout .showGraphEditor )
158
+ graphEditor .fit ()
159
+
160
+ isFullScreen = false
161
+ return
162
+ } else {
163
+ if (workspaceView .viewer2D .mouseArea .containsMouse ) {
164
+ setSettingsBeforeFullScreen (" showImageViewer" )
165
+ } else if (workspaceView .imageGallery .mouseArea .containsMouse ) {
166
+ setSettingsBeforeFullScreen (" showImageGallery" )
167
+ } else if (workspaceView .viewer3DContainer .hovered ) {
168
+ setSettingsBeforeFullScreen (" showViewer3D" )
169
+ } else if (graphEditorPanel .hovered ) {
170
+ setSettingsBeforeFullScreen (" showGraphEditor" )
171
+ graphEditor .fit ()
172
+ }
173
+ }
174
+ }
175
+ }
176
+
115
177
MessageDialog {
116
178
id: unsavedDialog
117
179
@@ -896,6 +958,12 @@ ApplicationWindow {
896
958
checkable: true
897
959
checked: true
898
960
}
961
+ MenuItem {
962
+ id: imageGalleryVisibilityCB
963
+ text: " Image Gallery"
964
+ checkable: true
965
+ checked: true
966
+ }
899
967
MenuSeparator {}
900
968
Action {
901
969
text: " Fullscreen"
@@ -1045,7 +1113,7 @@ ApplicationWindow {
1045
1113
id: workspaceView
1046
1114
Layout .fillWidth : true
1047
1115
Layout .fillHeight : true
1048
- Layout .minimumHeight : 50
1116
+ Layout .minimumHeight : graphEditorPanel . parent . isFullScreen ? 50 : 0
1049
1117
reconstruction: _reconstruction
1050
1118
readOnly: _reconstruction ? _reconstruction .computing : false
1051
1119
@@ -1081,14 +1149,21 @@ ApplicationWindow {
1081
1149
Controls1 .SplitView {
1082
1150
orientation: Qt .Horizontal
1083
1151
width: parent .width
1084
- height: Math .round (parent .height * 0.3 )
1152
+
1153
+ Layout .minimumHeight : graphEditorPanel .isFullScreen ? _window .height : 50
1154
+ Layout .maximumHeight : graphEditorPanel .isFullScreen ? _window .height : Math .round (_window .height * 0.4 )
1085
1155
visible: settings_UILayout .showGraphEditor
1086
1156
1087
1157
TabPanel {
1088
1158
id: graphEditorPanel
1089
1159
Layout .fillWidth : true
1160
+
1161
+ property bool isFullScreen: ! settings_UILayout .showImageGallery && ! settings_UILayout .showLiveReconstruction && ! settings_UILayout .showImageViewer && ! settings_UILayout .showViewer3D && settings_UILayout .showGraphEditor
1162
+
1163
+ implicitHeight: Math .round (_window .height * 0.3 )
1090
1164
padding: 4
1091
1165
tabs: [" Graph Editor" , " Task Manager" , " Script Editor" ]
1166
+ hoverEnabled: true
1092
1167
1093
1168
headerBar: RowLayout {
1094
1169
MaterialToolButton {
@@ -1261,6 +1336,8 @@ ApplicationWindow {
1261
1336
_reconstruction .handleFilesUrl (filesByType, null , mousePosition)
1262
1337
}
1263
1338
}
1339
+
1340
+
1264
1341
}
1265
1342
1266
1343
TaskManager {
0 commit comments