Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
bc452aa6
Commit
bc452aa6
authored
Dec 07, 2012
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCHNApps: v1 !!!
parent
f0cd17c2
Changes
40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
756 additions
and
2061 deletions
+756
-2061
SCHNApps/Debug/CMakeLists.txt
SCHNApps/Debug/CMakeLists.txt
+9
-10
SCHNApps/Release/CMakeLists.txt
SCHNApps/Release/CMakeLists.txt
+9
-10
SCHNApps/forms/camerasDialog.ui
SCHNApps/forms/camerasDialog.ui
+10
-6
SCHNApps/forms/pluginsDialog.ui
SCHNApps/forms/pluginsDialog.ui
+6
-6
SCHNApps/forms/window.ui
SCHNApps/forms/window.ui
+7
-7
SCHNApps/include/camera.h
SCHNApps/include/camera.h
+1
-1
SCHNApps/include/camerasDialog.h
SCHNApps/include/camerasDialog.h
+27
-0
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+11
-9
SCHNApps/include/plugin.h
SCHNApps/include/plugin.h
+2
-0
SCHNApps/include/pluginsDialog.h
SCHNApps/include/pluginsDialog.h
+6
-6
SCHNApps/include/splitArea.h
SCHNApps/include/splitArea.h
+0
-38
SCHNApps/include/view.h
SCHNApps/include/view.h
+5
-1
SCHNApps/include/viewButtonArea.h
SCHNApps/include/viewButtonArea.h
+6
-1
SCHNApps/include/viewSelector.h
SCHNApps/include/viewSelector.h
+0
-148
SCHNApps/include/window.h
SCHNApps/include/window.h
+14
-27
SCHNApps/resources/icons/action_cameras.png
SCHNApps/resources/icons/action_cameras.png
+0
-0
SCHNApps/resources/icons/action_cameras.svg
SCHNApps/resources/icons/action_cameras.svg
+0
-336
SCHNApps/resources/icons/action_maps.png
SCHNApps/resources/icons/action_maps.png
+0
-0
SCHNApps/resources/icons/action_plugins.png
SCHNApps/resources/icons/action_plugins.png
+0
-0
SCHNApps/resources/icons/button_cameras.png
SCHNApps/resources/icons/button_cameras.png
+0
-0
SCHNApps/resources/icons/button_cameras.svg
SCHNApps/resources/icons/button_cameras.svg
+162
-42
SCHNApps/resources/icons/button_close.png
SCHNApps/resources/icons/button_close.png
+0
-0
SCHNApps/resources/icons/button_close.svg
SCHNApps/resources/icons/button_close.svg
+0
-86
SCHNApps/resources/icons/button_maps.png
SCHNApps/resources/icons/button_maps.png
+0
-0
SCHNApps/resources/icons/button_plugins.png
SCHNApps/resources/icons/button_plugins.png
+0
-0
SCHNApps/resources/icons/maps.svg
SCHNApps/resources/icons/maps.svg
+161
-262
SCHNApps/resources/icons/plugins.svg
SCHNApps/resources/icons/plugins.svg
+144
-221
SCHNApps/resources/resources.qrc
SCHNApps/resources/resources.qrc
+6
-7
SCHNApps/src/cameraViewDialog.cpp
SCHNApps/src/cameraViewDialog.cpp
+1
-3
SCHNApps/src/camerasDialog.cpp
SCHNApps/src/camerasDialog.cpp
+59
-0
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+5
-11
SCHNApps/src/mapsViewDialog.cpp
SCHNApps/src/mapsViewDialog.cpp
+1
-0
SCHNApps/src/pluginsDialog.cpp
SCHNApps/src/pluginsDialog.cpp
+12
-12
SCHNApps/src/splitArea.cpp
SCHNApps/src/splitArea.cpp
+0
-182
SCHNApps/src/view.cpp
SCHNApps/src/view.cpp
+24
-6
SCHNApps/src/viewButtonArea.cpp
SCHNApps/src/viewButtonArea.cpp
+14
-30
SCHNApps/src/viewSelector.cpp
SCHNApps/src/viewSelector.cpp
+0
-496
SCHNApps/src/window.cpp
SCHNApps/src/window.cpp
+47
-97
include/Topology/generic/genericmap.h
include/Topology/generic/genericmap.h
+2
-0
include/Topology/generic/genericmap.hpp
include/Topology/generic/genericmap.hpp
+5
-0
No files found.
SCHNApps/Debug/CMakeLists.txt
View file @
bc452aa6
...
...
@@ -25,27 +25,25 @@ file(
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/splitArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/system.cpp
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/
viewSelector
.cpp
${
SCHNApps_ROOT_DIR
}
/src/
camera
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
plugin
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
camerasDialog
.cpp
${
SCHNApps_ROOT_DIR
}
/src/
plugins
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
maps
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
)
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/splitArea.h
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/
viewSelector
.h
${
SCHNApps_ROOT_DIR
}
/include/
camera
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
plugin
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
camerasDialog
.h
${
SCHNApps_ROOT_DIR
}
/include/
plugins
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
maps
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
...
...
@@ -55,8 +53,9 @@ file(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/window.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/camerasDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsViewDialog.ui
...
...
SCHNApps/Release/CMakeLists.txt
View file @
bc452aa6
...
...
@@ -25,27 +25,25 @@ file(
${
SCHNApps_ROOT_DIR
}
/src/main.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapHandler.cpp
${
SCHNApps_ROOT_DIR
}
/src/plugin.cpp
${
SCHNApps_ROOT_DIR
}
/src/splitArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/system.cpp
${
SCHNApps_ROOT_DIR
}
/src/view.cpp
${
SCHNApps_ROOT_DIR
}
/src/window.cpp
${
SCHNApps_ROOT_DIR
}
/src/viewButtonArea.cpp
${
SCHNApps_ROOT_DIR
}
/src/
viewSelector
.cpp
${
SCHNApps_ROOT_DIR
}
/src/
camera
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
plugin
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
camerasDialog
.cpp
${
SCHNApps_ROOT_DIR
}
/src/
plugins
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/
maps
Dialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/cameraViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/pluginsViewDialog.cpp
${
SCHNApps_ROOT_DIR
}
/src/mapsViewDialog.cpp
)
SET
(
SCHNApps_H_OBJECT_FILES
${
SCHNApps_ROOT_DIR
}
/include/splitArea.h
${
SCHNApps_ROOT_DIR
}
/include/view.h
${
SCHNApps_ROOT_DIR
}
/include/window.h
${
SCHNApps_ROOT_DIR
}
/include/viewButtonArea.h
${
SCHNApps_ROOT_DIR
}
/include/
viewSelector
.h
${
SCHNApps_ROOT_DIR
}
/include/
camera
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
plugin
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
camerasDialog
.h
${
SCHNApps_ROOT_DIR
}
/include/
plugins
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/
maps
Dialog.h
${
SCHNApps_ROOT_DIR
}
/include/cameraViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/pluginsViewDialog.h
${
SCHNApps_ROOT_DIR
}
/include/mapsViewDialog.h
...
...
@@ -55,8 +53,9 @@ file(
GLOB
SCHNApps_FORM_FILES
${
SCHNApps_ROOT_DIR
}
/forms/window.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/camerasDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/cameraViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/pluginsViewDialog.ui
${
SCHNApps_ROOT_DIR
}
/forms/mapsViewDialog.ui
...
...
SCHNApps/forms/cameraDialog.ui
→
SCHNApps/forms/camera
s
Dialog.ui
View file @
bc452aa6
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
CameraDialog
</class>
<widget
class=
"QDialog"
name=
"CameraDialog"
>
<class>
Camera
s
Dialog
</class>
<widget
class=
"QDialog"
name=
"Camera
s
Dialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
@@ -11,7 +11,7 @@
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
CameraDialog
</string>
<string>
Camera
s
Dialog
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
...
...
@@ -26,7 +26,7 @@
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"removeCameraButton"
>
<widget
class=
"QPushButton"
name=
"removeCamera
s
Button"
>
<property
name=
"text"
>
<string>
Remove
</string>
</property>
...
...
@@ -35,7 +35,11 @@
</layout>
</item>
<item>
<widget
class=
"QListWidget"
name=
"cameraList"
/>
<widget
class=
"QListWidget"
name=
"cameraList"
>
<property
name=
"selectionMode"
>
<enum>
QAbstractItemView::ExtendedSelection
</enum>
</property>
</widget>
</item>
</layout>
</item>
...
...
@@ -53,7 +57,7 @@
<connection>
<sender>
OKButton
</sender>
<signal>
clicked()
</signal>
<receiver>
CameraDialog
</receiver>
<receiver>
Camera
s
Dialog
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
...
...
SCHNApps/forms/pluginDialog.ui
→
SCHNApps/forms/plugin
s
Dialog.ui
View file @
bc452aa6
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
PluginDialog
</class>
<widget
class=
"QDialog"
name=
"PluginDialog"
>
<class>
Plugin
s
Dialog
</class>
<widget
class=
"QDialog"
name=
"Plugin
s
Dialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
...
...
@@ -11,7 +11,7 @@
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
PluginDialog
</string>
<string>
Plugin
s
Dialog
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
...
...
@@ -97,7 +97,7 @@
<connection>
<sender>
OKButton
</sender>
<signal>
pressed()
</signal>
<receiver>
PluginDialog
</receiver>
<receiver>
Plugin
s
Dialog
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
...
...
@@ -111,9 +111,9 @@
</hints>
</connection>
<connection>
<sender>
PluginDialog
</sender>
<sender>
Plugin
s
Dialog
</sender>
<signal>
rejected()
</signal>
<receiver>
PluginDialog
</receiver>
<receiver>
Plugin
s
Dialog
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
...
...
SCHNApps/forms/window.ui
View file @
bc452aa6
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
785
</width>
<height>
593
</height>
<width>
800
</width>
<height>
600
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -23,8 +23,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
785
</width>
<height>
2
2
</height>
<width>
800
</width>
<height>
2
3
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuFile"
>
...
...
@@ -78,7 +78,7 @@
<action
name=
"actionManagePlugins"
>
<property
name=
"icon"
>
<iconset
resource=
"../resources/resources.qrc"
>
<normaloff>
:/icons/icons/
action_plugins.png
</normaloff>
:/icons/icons/action_
plugins.png
</iconset>
<normaloff>
:/icons/icons/
plugins.png
</normaloff>
:/icons/icons/
plugins.png
</iconset>
</property>
<property
name=
"text"
>
<string>
Manage plugins
</string>
...
...
@@ -87,7 +87,7 @@
<action
name=
"actionManageCameras"
>
<property
name=
"icon"
>
<iconset
resource=
"../resources/resources.qrc"
>
<normaloff>
:/icons/icons/
action_cameras.png
</normaloff>
:/icons/icons/action_
cameras.png
</iconset>
<normaloff>
:/icons/icons/
cameras.png
</normaloff>
:/icons/icons/
cameras.png
</iconset>
</property>
<property
name=
"text"
>
<string>
Manage cameras
</string>
...
...
@@ -101,7 +101,7 @@
<action
name=
"actionManageMaps"
>
<property
name=
"icon"
>
<iconset
resource=
"../resources/resources.qrc"
>
<normaloff>
:/icons/icons/
action_maps.png
</normaloff>
:/icons/icons/action_
maps.png
</iconset>
<normaloff>
:/icons/icons/
maps.png
</normaloff>
:/icons/icons/
maps.png
</iconset>
</property>
<property
name=
"text"
>
<string>
ManageMaps
</string>
...
...
SCHNApps/include/camera.h
View file @
bc452aa6
...
...
@@ -20,7 +20,7 @@ public:
Window
*
getWindow
()
const
{
return
m_window
;
}
void
setWindow
(
Window
*
w
)
{
m_window
=
w
;
}
bool
isUsed
()
const
{
return
l_views
.
size
()
>
0
;
}
bool
isUsed
()
const
{
return
!
l_views
.
empty
()
;
}
bool
isShared
()
const
{
return
l_views
.
size
()
>
1
;
}
/*********************************************************
...
...
SCHNApps/include/cameraDialog.h
→
SCHNApps/include/camera
s
Dialog.h
View file @
bc452aa6
#ifndef _CAMERADIALOG_H_
#define _CAMERADIALOG_H_
#ifndef _CAMERA
S
DIALOG_H_
#define _CAMERA
S
DIALOG_H_
#include "ui_cameraDialog.h"
#include "ui_camera
s
Dialog.h"
class
Window
;
class
Camera
;
class
Camera
Dialog
:
public
QDialog
,
Ui
::
Camera
Dialog
class
Camera
sDialog
:
public
QDialog
,
Ui
::
Cameras
Dialog
{
Q_OBJECT
public:
CameraDialog
(
Window
*
window
);
~
CameraDialog
();
Camera
s
Dialog
(
Window
*
window
);
~
Camera
s
Dialog
();
private:
Window
*
m_window
;
public
slots
:
void
cb_addCamera
();
void
cb_removeCamera
();
void
cb_removeCamera
s
();
void
cb_addCameraToList
(
Camera
*
c
);
void
cb_removeCameraFromList
(
Camera
*
c
);
};
...
...
SCHNApps/include/mapHandler.h
View file @
bc452aa6
...
...
@@ -6,6 +6,7 @@
#include "types.h"
#include "view.h"
#include "Topology/generic/genericmap.h"
#include "Topology/generic/functor.h"
#include "Utils/vbo.h"
#include "Algo/Render/GL2/mapRender.h"
...
...
@@ -13,7 +14,7 @@
class
MapHandlerGen
{
public:
MapHandlerGen
(
const
QString
&
name
,
Window
*
window
);
MapHandlerGen
(
const
QString
&
name
,
Window
*
window
,
CGoGN
::
GenericMap
*
map
);
virtual
~
MapHandlerGen
();
const
QString
&
getName
()
const
{
return
m_name
;
}
...
...
@@ -22,6 +23,8 @@ public:
Window
*
getWindow
()
const
{
return
m_window
;
}
void
setWindow
(
Window
*
w
)
{
m_window
=
w
;
}
CGoGN
::
GenericMap
*
getGenericMap
()
{
return
m_map
;
}
const
qglviewer
::
Vec
&
getBBmin
()
const
{
return
m_bbMin
;
}
void
setBBmin
(
qglviewer
::
Vec
&
v
)
{
m_bbMin
=
v
;
}
...
...
@@ -30,6 +33,8 @@ public:
float
getBBdiagSize
()
{
return
(
m_bbMax
-
m_bbMin
).
norm
();
}
bool
isUsed
()
const
{
return
!
l_views
.
empty
();
}
void
draw
(
CGoGN
::
Utils
::
GLSLShader
*
shader
,
int
primitive
);
/*********************************************************
...
...
@@ -43,7 +48,7 @@ public:
* MANAGE LINKED VIEWS
*********************************************************/
bool
linkView
(
View
*
view
);
void
linkView
(
View
*
view
);
void
unlinkView
(
View
*
view
);
const
QList
<
View
*>&
getLinkedViews
()
const
{
return
l_views
;
}
bool
isLinkedToView
(
View
*
view
)
const
{
return
l_views
.
contains
(
view
);
}
...
...
@@ -51,6 +56,7 @@ public:
protected:
QString
m_name
;
Window
*
m_window
;
CGoGN
::
GenericMap
*
m_map
;
CGoGN
::
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
...
...
@@ -67,8 +73,7 @@ class MapHandler : public MapHandlerGen
{
public:
MapHandler
(
const
QString
&
name
,
Window
*
window
,
typename
PFP
::
MAP
*
map
)
:
MapHandlerGen
(
name
,
window
),
m_map
(
map
)
MapHandlerGen
(
name
,
window
,
map
)
{}
~
MapHandler
()
...
...
@@ -77,15 +82,12 @@ public:
delete
m_map
;
}
typename
PFP
::
MAP
*
getMap
()
{
return
m_map
;
}
typename
PFP
::
MAP
*
getMap
()
{
return
reinterpret_cast
<
typename
PFP
::
MAP
*>
(
m_map
)
;
}
void
updatePrimitives
(
int
primitive
,
const
CGoGN
::
FunctorSelect
&
good
)
{
m_render
->
initPrimitives
<
PFP
>
(
*
m_map
,
good
,
primitive
)
;
m_render
->
initPrimitives
<
PFP
>
(
*
(
reinterpret_cast
<
typename
PFP
::
MAP
*>
(
m_map
))
,
good
,
primitive
)
;
}
protected:
typename
PFP
::
MAP
*
m_map
;
};
#endif
SCHNApps/include/plugin.h
View file @
bc452aa6
...
...
@@ -28,6 +28,8 @@ public:
Window
*
getWindow
()
{
return
m_window
;
}
void
setWindow
(
Window
*
w
)
{
m_window
=
w
;
}
bool
isUsed
()
const
{
return
!
l_views
.
empty
();
}
bool
getProvidesRendering
()
{
return
b_providesRendering
;
}
void
setProvidesRendering
(
bool
b
)
{
b_providesRendering
=
b
;
}
...
...
SCHNApps/include/pluginDialog.h
→
SCHNApps/include/plugin
s
Dialog.h
View file @
bc452aa6
#ifndef _PLUGINDIALOG_H_
#define _PLUGINDIALOG_H_
#ifndef _PLUGIN
S
DIALOG_H_
#define _PLUGIN
S
DIALOG_H_
#include "ui_pluginDialog.h"
#include "ui_plugin
s
Dialog.h"
#include "types.h"
...
...
@@ -18,13 +18,13 @@ struct PluginInfo
QString
pluginName
;
};
class
Plugin
Dialog
:
public
QDialog
,
public
Ui
::
Plugin
Dialog
class
Plugin
sDialog
:
public
QDialog
,
public
Ui
::
Plugins
Dialog
{
Q_OBJECT
public:
PluginDialog
(
Window
*
window
);
~
PluginDialog
();
Plugin
s
Dialog
(
Window
*
window
);
~
Plugin
s
Dialog
();
protected:
Window
*
m_window
;
...
...
SCHNApps/include/splitArea.h
deleted
100644 → 0
View file @
f0cd17c2
#ifndef _SPLITAREA_H_
#define _SPLITAREA_H_
#include <QSplitter>
class
SplitArea
:
public
QSplitter
{
Q_OBJECT
public:
SplitArea
(
QWidget
*
parent
=
NULL
);
int
getNbRows
()
{
return
nbRows
;
}
void
addFitElement
(
QWidget
*
element
);
void
addElementAt
(
QWidget
*
element
,
int
x
,
int
y
);
void
addElementRightTo
(
QWidget
*
element
,
QWidget
*
left
);
bool
isEmpty
();
void
updateSize
();
protected:
int
nbRows
;
int
maxNbColumns
;
int
rowMin
;
int
nbElements
;
protected
slots
:
void
elementRemoved
();
private:
bool
sizeUpdated
;
void
determineRowMin
();
};
#endif
SCHNApps/include/view.h
View file @
bc452aa6
...
...
@@ -22,7 +22,7 @@ class View : public QGLViewer
public:
static
unsigned
int
viewCount
;
View
(
const
QString
&
name
,
Window
*
w
,
QWidget
*
parent
,
const
QGLWidget
*
shareWidget
=
NULL
);
View
(
const
QString
&
name
,
Window
*
w
,
const
QGLWidget
*
shareWidget
=
NULL
);
~
View
();
const
QString
&
getName
()
const
{
return
m_name
;
}
...
...
@@ -104,6 +104,8 @@ protected:
ViewButton
*
m_pluginsButton
;
ViewButton
*
m_mapsButton
;
ViewButton
*
m_closeButton
;
ViewButton
*
m_VsplitButton
;
ViewButton
*
m_HsplitButton
;
QString
m_textInfo
;
...
...
@@ -116,6 +118,8 @@ public slots:
void
cb_pluginsView
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
void
cb_mapsView
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
void
cb_closeView
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
void
cb_VsplitView
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
void
cb_HsplitView
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
};
#endif
SCHNApps/include/viewButtonArea.h
View file @
bc452aa6
...
...
@@ -25,6 +25,9 @@ public:
void
click
(
int
x
,
int
y
,
int
globalX
,
int
globalY
);
void
drawAt
(
int
x
,
int
y
);
static
const
int
SIZE
=
24
;
static
const
int
SPACE
=
4
;
protected:
QString
m_img
;
View
*
m_view
;
...
...
@@ -39,7 +42,9 @@ class ViewButtonArea : public QObject
Q_OBJECT
public:
ViewButtonArea
(
View
*
view
)
:
m_view
(
view
)
ViewButtonArea
(
View
*
view
)
:
m_view
(
view
),
m_form
(
0
,
0
,
0
,
0
)
{}
~
ViewButtonArea
()
{}
...
...
SCHNApps/include/viewSelector.h
deleted
100644 → 0
View file @
f0cd17c2
#ifndef _VIEWSELECTOR_H_
#define _VIEWSELECTOR_H_
#include "view.h"
#include <QDialog>
#include <QRect>
class
SplitArea
;
class
PixElem
{
public:
PixElem
()
:
view
(
NULL
),
color
(
Qt
::
gray
)
{}
PixElem
(
View
*
view
)
:
view
(
view
),
color
(
Qt
::
gray
)
{}
PixElem
(
const
PixElem
&
pixElem
)
:
view
(
pixElem
.
view
),
color
(
pixElem
.
color
),
rect
(
pixElem
.
rect
)
{}
bool
operator
==
(
const
PixElem
&
other
)
const
{
return
view
==
other
.
view
;
}
PixElem
&
operator
=
(
const
PixElem
&
other
)
{
view
=
other
.
view
;
rect
=
other
.
rect
;
color
=
other
.
color
;
return
*
this
;
}
View
*
view
;
QColor
color
;
QRect
rect
;
};
class
ViewPixMaps
:
public
QList
<
QList
<
PixElem
>
>
{
public:
typedef
ViewPixMaps
::
iterator
y_iterator
;
typedef
QList
<
PixElem
>::
iterator
x_iterator
;
ViewPixMaps
();
~
ViewPixMaps
()
{}
void
fromSplitArea
(
SplitArea
*
splitArea
);
int
getMaxX
()
{
return
maxX
;
}
int
getMinX
()
{
return
minX
;
}
int
getY
()
{
return
Y
;
}
int
getYMinX
()
{
return
YminX
;
}
PixElem
&
getAt
(
int
x
,
int
y
)
{
return
(
*
this
)[
y
][
x
];
}
y_iterator
y_begin
(){
return
this
->
begin
();}
y_iterator
y_end
(){
return
this
->
end
();}
x_iterator
x_begin
(
y_iterator
y_it
){
return
y_it
->
begin
();}
x_iterator
x_end
(
y_iterator
y_it
){
return
y_it
->
end
();}
void
beginMove
(
int
x
,
int
y
);
void
moveTmp
(
int
x
,
int
y
);
void
confirmMove
();
void
cancelMove
();
void
insertion
(
int
x
,
int
y
);
bool
isModified
(){
return
this
->
modif
;}
private:
int
maxX
;
int
minX
;
int
Y
;
int
YminX
;
int
originX
,
originY
;
PixElem
origin
;
int
tmpX
,
tmpY
;
PixElem
tmp
;
bool
modif
;
protected:
void
computeSize
();
};
class
ViewSelector
:
public
QDialog
{
Q_OBJECT
public:
enum
SelectorDialogType
{
MOVE
,
SELECT
};
ViewSelector
(
QWidget
*
parent
=
NULL
,
SelectorDialogType
type
=
MOVE
);
ViewSelector
(
ViewPixMaps
viewPixMap
,
QWidget
*
parent
=
NULL
,
SelectorDialogType
type
=
MOVE
);
~
ViewSelector
();
void
setGLVMap
(
const
ViewPixMaps
&
viewPixMap
);
ViewPixMaps
getGLVMap
()
{
return
viewPixMap
;
}
QPoint
getInsertPoint
();
void
setInsertionName
(
QString
insertionName
)
{
this
->
insertionName
=
insertionName
;
}
bool
keys
[
3
];
protected:
ViewPixMaps
viewPixMap
;
int
mouseX
;
int
mouseY
;
bool
pixmapGrabbed
;
QRect
grabbed
;
SelectorDialogType
type
;
QPoint
insertPoint
;
QString
insertionName
;
protected:
void
paintEvent
(
QPaintEvent
*
event
);
void
mouseMoveEvent
(
QMouseEvent
*
event
);
void
mousePressEvent
(
QMouseEvent
*
event
);
void
mouseReleaseEvent
(
QMouseEvent
*
event
);
void
keyPressEvent
(
QKeyEvent
*
event
);
void
keyReleaseEvent
(
QKeyEvent
*
event
);
private:
QPoint
mouseToIndice
();
};
#endif
SCHNApps/include/window.h
View file @
bc452aa6
...
...
@@ -4,11 +4,14 @@
#include "ui_window.h"
#include "system.h"
#include <QVBoxLayout>
class
SplitArea
;
class
PluginDialog
;
class
CameraDialog
;
class
QVBoxLayout
;
class
QSplitter
;
class
CamerasDialog
;
class
PluginsDialog
;
class
MapsDialog
;
class
Texture
;