Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
JuPedSim
JPSeditor
Commits
75ef1b67
Commit
75ef1b67
authored
Aug 23, 2016
by
Erik Andresen
Browse files
bug related to the disabling of hlines fixed
parent
8ff0f0d1
Changes
5
Hide whitespace changes
Inline
Side-by-side
forms/mainwindow.ui
View file @
75ef1b67
...
...
@@ -24,7 +24,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
800
</width>
<height>
2
1
</height>
<height>
2
6
</height>
</rect>
</property>
<widget
class=
"QMenu"
name=
"menuDatei"
>
...
...
@@ -410,7 +410,7 @@
<bool>
true
</bool>
</property>
<property
name=
"enabled"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
<property
name=
"icon"
>
<iconset
resource=
"Ressource.qrc"
>
...
...
@@ -423,7 +423,7 @@
<string>
Landmark
</string>
</property>
<property
name=
"visible"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
</action>
<action
name=
"actionLandmarkWidget"
>
...
...
@@ -431,7 +431,7 @@
<bool>
true
</bool>
</property>
<property
name=
"enabled"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
<property
name=
"icon"
>
<iconset
resource=
"Ressource.qrc"
>
...
...
@@ -444,7 +444,7 @@
<string>
LandmarkSpecs
</string>
</property>
<property
name=
"visible"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
</action>
<action
name=
"actionanglesnap"
>
...
...
@@ -566,7 +566,7 @@
</action>
<action
name=
"actionSpeichern_cogmap"
>
<property
name=
"enabled"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
<property
name=
"icon"
>
<iconset
resource=
"Ressource.qrc"
>
...
...
@@ -582,7 +582,7 @@
<string>
Ctrl+S
</string>
</property>
<property
name=
"visible"
>
<bool>
tru
e
</bool>
<bool>
fals
e
</bool>
</property>
</action>
<action
name=
"action_ffnen_cogmap"
>
...
...
@@ -596,6 +596,9 @@
<property
name=
"toolTip"
>
<string>
Load Cognitive Map
</string>
</property>
<property
name=
"visible"
>
<bool>
false
</bool>
</property>
</action>
<action
name=
"actionCopy"
>
<property
name=
"text"
>
...
...
forms/widgetlandmark.ui
View file @
75ef1b67
...
...
@@ -173,6 +173,9 @@ p, li { white-space: pre-wrap; }
<height>
31
</height>
</rect>
</property>
<property
name=
"maximum"
>
<number>
100000000
</number>
</property>
</widget>
<widget
class=
"QLabel"
name=
"label_7"
>
<property
name=
"geometry"
>
...
...
src/GraphicView.cpp
View file @
75ef1b67
...
...
@@ -272,7 +272,7 @@ void jpsGraphicsView::mousePressEvent(QMouseEvent *mouseEvent)
emit
DefConnection1Completed
();
}
//LineEdit
else
if
(
_currentTrackedPoint
!=
nullptr
&&
line_tracked
==
1
)
else
if
(
_currentTrackedPoint
!=
nullptr
&&
line_tracked
==
1
&&
_statCopy
==
0
)
{
EditLine
(
_currentTrackedPoint
);
_currentTrackedPoint
=
nullptr
;
...
...
@@ -920,6 +920,7 @@ void jpsGraphicsView::disable_drawing()
statExit
=
false
;
statLandmark
=
false
;
_statLineEdit
=
false
;
_statHLine
=
false
;
_statCopy
=
0
;
// if drawing was canceled by pushing ESC
if
(
current_line
!=
nullptr
)
...
...
@@ -939,7 +940,7 @@ void jpsGraphicsView::disable_drawing()
jpsLineItem
*
jpsGraphicsView
::
addLineItem
(
const
qreal
&
x1
,
const
qreal
&
y1
,
const
qreal
&
x2
,
const
qreal
&
y2
,
const
QString
&
type
)
{
QPen
pen
=
QPen
(
Qt
::
black
,
0
);
QPen
pen
=
QPen
(
Qt
::
black
,
2
);
pen
.
setCosmetic
(
true
);
current_line
=
Scene
->
addLine
(
x1
,
y1
,
x2
,
y2
,
pen
);
...
...
src/datamanager.cpp
View file @
75ef1b67
...
...
@@ -958,12 +958,12 @@ void jpsDatamanager::WriteLandmarks(jpsRegion* cRegion, QXmlStreamWriter *stream
if
(
fuzzy
)
{
px
=
MakeItFuzzy
(
px
,
a
/
2
.0
);
py
=
MakeItFuzzy
(
py
,
b
/
2
.0
);
a
=
MakeItFuzzy
(
a
,
a
/
2
.0
);
px
=
MakeItFuzzy
(
px
,
a
/
5
.0
);
py
=
MakeItFuzzy
(
py
,
b
/
5
.0
);
a
=
MakeItFuzzy
(
a
,
a
/
3
.0
);
if
(
a
<
0.5
)
a
=
0.5
;
b
=
MakeItFuzzy
(
b
,
b
/
2
.0
);
b
=
MakeItFuzzy
(
b
,
b
/
3
.0
);
if
(
b
<
0.5
)
b
=
0.5
;
}
...
...
@@ -1001,14 +1001,20 @@ void jpsDatamanager::CutOutLandmarks()
{
using
myClock
=
std
::
chrono
::
high_resolution_clock
;
int
numberMainTargets
=
GetNumberOfMainTargets
();
int
statcutMainTarget
=
numberMainTargets
;
int
number
;
int
n
=
0
;
for
(
jpsLandmark
*
landmark
:
_landmarksAfterLoose
)
{
// at least one main target will be kept
if
(
landmark
->
GetType
()
==
"main"
||
landmark
->
GetType
()
==
"Main Target"
)
{
continue
;
if
(
numberMainTargets
==
1
)
continue
;
else
if
(
statcutMainTarget
==
1
)
continue
;
}
myClock
::
duration
d
=
myClock
::
now
().
time_since_epoch
();
...
...
@@ -1017,12 +1023,14 @@ void jpsDatamanager::CutOutLandmarks()
std
::
default_random_engine
generator
(
seed
);
std
::
discrete_distribution
<
int
>
distribution
({
4
0
,
6
0
});
std
::
discrete_distribution
<
int
>
distribution
({
3
0
,
7
0
});
number
=
distribution
(
generator
);
if
(
!
number
)
{
if
(
landmark
->
GetType
()
==
"main"
||
landmark
->
GetType
()
==
"Main Target"
)
statcutMainTarget
--
;
_landmarksAfterLoose
.
removeOne
(
landmark
);
BridgeLostLandmark
(
landmark
);
}
...
...
@@ -1162,6 +1170,19 @@ qreal jpsDatamanager::MakeItFuzzy(const qreal& mean, const qreal &std)
return
number
;
}
int
jpsDatamanager
::
GetNumberOfMainTargets
()
const
{
int
counter
=
0
;
for
(
jpsLandmark
*
landmark
:
_landmarks
)
{
if
(
landmark
->
GetType
()
==
"main"
||
landmark
->
GetType
()
==
"Main Target"
)
{
counter
++
;
}
}
return
counter
;
}
void
jpsDatamanager
::
remove_all
()
{
remove_all_crossings
();
...
...
src/datamanager.h
View file @
75ef1b67
...
...
@@ -154,6 +154,7 @@ public:
void
WriteConnections
(
jpsRegion
*
cRegion
,
QXmlStreamWriter
*
stream
);
void
CreateAndSaveASimilarCogMap
(
const
int
&
id
);
qreal
MakeItFuzzy
(
const
qreal
&
mean
,
const
qreal
&
std
);
int
GetNumberOfMainTargets
()
const
;
// Read DXF
bool
readDXF
(
std
::
string
filename
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment