diff --git a/Resources/Icons/breaking.png b/Resources/Icons/breaking.png new file mode 100644 index 0000000000000000000000000000000000000000..e10dc83b2b6617063f09d91fce5d13545a0f6097 Binary files /dev/null and b/Resources/Icons/breaking.png differ diff --git a/Resources/resources.qrc b/Resources/resources.qrc index e15a69311f59872ff1c6b8044013d06760dc82a2..e2b4dc4c53351a0e5bf889bffa592a4b938a275f 100644 --- a/Resources/resources.qrc +++ b/Resources/resources.qrc @@ -59,5 +59,6 @@ <file>Icons/landmark.svg</file> <file>Icons/moved_hand.svg</file> <file>Icons/attribute.svg</file> + <file>Icons/breaking.png</file> </qresource> </RCC> diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui index 2235dbf1ad25e3940cfe4255451771fa6c4a1a6c..b087b0f52b0e51d2622113cec825e0ff389dfd45 100644 --- a/forms/mainwindow.ui +++ b/forms/mainwindow.ui @@ -24,7 +24,7 @@ <x>0</x> <y>0</y> <width>800</width> - <height>21</height> + <height>22</height> </rect> </property> <widget class="QMenu" name="menuDatei"> @@ -58,6 +58,7 @@ <addaction name="actionGather_data"/> <addaction name="actionLandmarkWidget"/> <addaction name="actionNew_Inifile"/> + <addaction name="actionBreak_Line"/> </widget> <widget class="QMenu" name="menuView"> <property name="title"> @@ -128,6 +129,7 @@ <addaction name="actiongridmode"/> <addaction name="actionObjectsnap"/> <addaction name="separator"/> + <addaction name="actionBreak_Line"/> <addaction name="actionRoom"/> </widget> <action name="action_ffnen"> @@ -737,6 +739,18 @@ <string>Layers</string> </property> </action> + <action name="actionBreak_Line"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="icon"> + <iconset resource="../Resources/resources.qrc"> + <normaloff>:/inAppIcons/Icons/breaking.png</normaloff>:/inAppIcons/Icons/breaking.png</iconset> + </property> + <property name="text"> + <string>Break Line</string> + </property> + </action> </widget> <resources> <include location="../Resources/resources.qrc"/> diff --git a/src/GraphicView.cpp b/src/GraphicView.cpp index f327a6fdc772473e096bbef693f454e32c0209f5..6281686d74dce01c351637fbb242f746dc0e85a4 100644 --- a/src/GraphicView.cpp +++ b/src/GraphicView.cpp @@ -71,6 +71,7 @@ jpsGraphicsView::jpsGraphicsView(QWidget* parent, jpsDatamanager *datamanager):Q statDoor=false; statExit=false; _statHLine=false; + stat_break_ = false; statzoomwindows=false; _statCopy=0; statLandmark=false; @@ -284,7 +285,7 @@ void jpsGraphicsView::mousePressEvent(QMouseEvent *mouseEvent) drawLine(); } } - else if (statLandmark==true) + else if (statLandmark) { addLandmark(); } diff --git a/src/GraphicView.h b/src/GraphicView.h index 8569eb93197a6e0b605a59008e026d5c86ec7101..3347444539f93b9fd50ecec0115a03b001ffa333 100644 --- a/src/GraphicView.h +++ b/src/GraphicView.h @@ -217,6 +217,7 @@ private: bool statExit; bool statLandmark; bool _statHLine; + bool stat_break_; int _statCopy; QPointF _copyOrigin; qreal catch_radius; diff --git a/src/datamanager.cpp b/src/datamanager.cpp index 57afeedde7839b2445d06d021aa036227c27fd64..6006bc8141b30ee7e76a16e19c5c90d5ba38f76a 100644 --- a/src/datamanager.cpp +++ b/src/datamanager.cpp @@ -36,7 +36,6 @@ using myClock = std::chrono::high_resolution_clock; - jpsDatamanager::jpsDatamanager(QWidget *parent, jpsGraphicsView *view) { parent_widget=parent;