Skip to content

Commit

Permalink
Initial implementation of selection summary with measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
joelmeijering committed Dec 28, 2022
1 parent 930dd9a commit e938a6a
Show file tree
Hide file tree
Showing 7 changed files with 381 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/Gui/Application.cpp
Expand Up @@ -115,7 +115,7 @@
#include "Workbench.h"
#include "WorkbenchManager.h"
#include "WidgetFactory.h"

#include "SelectionSummary.h"

using namespace Gui;
using namespace Gui::DockWnd;
Expand Down Expand Up @@ -322,6 +322,7 @@ struct PyMethodDef FreeCADGui_methods[] = {

} // namespace Gui

SelectionSummary* summary;
Application::Application(bool GUIenabled)
{
//App::GetApplication().Attach(this);
Expand Down Expand Up @@ -484,6 +485,9 @@ Application::Application(bool GUIenabled)
createStandardOperations();
MacroCommand::load();
}

// TODO find idiomatically correct way to trigger class instantation
summary = new SelectionSummary();
}

Application::~Application()
Expand Down
5 changes: 4 additions & 1 deletion src/Gui/CMakeLists.txt
Expand Up @@ -47,6 +47,7 @@ include_directories(
${XercesC_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${3DCONNEXION_INCLUDE_DIR}
${OCC_INCLUDE_DIR}
)

if(MSVC)
Expand Down Expand Up @@ -1103,6 +1104,8 @@ SET(Selection_SRCS
SelectionObject.cpp
Selection.h
Selection.cpp
SelectionSummary.h
SelectionSummary.cpp
SelectionFilter.h
SelectionFilter.cpp
SelectionFilter.y
Expand Down Expand Up @@ -1259,7 +1262,7 @@ if (EIGEN3_NO_DEPRECATED_COPY)
endif ()

add_library(FreeCADGui SHARED ${FreeCADGui_SRCS})
target_link_libraries(FreeCADGui ${FreeCADGui_LIBS})
target_link_libraries(FreeCADGui ${FreeCADGui_LIBS} Part)

SET_BIN_DIR(FreeCADGui FreeCADGui)

Expand Down
5 changes: 3 additions & 2 deletions src/Gui/Selection.cpp
Expand Up @@ -936,8 +936,9 @@ void SelectionSingleton::setPreselectCoord( float x, float y, float z)
,pts[1].first, pts[1].second.c_str()
,pts[2].first, pts[2].second.c_str());

if (getMainWindow())
getMainWindow()->showMessage(QString::fromUtf8(buf));

//if (getMainWindow())
// getMainWindow()->showMessage(QString::fromUtf8(buf));
}

void SelectionSingleton::rmvPreselect(bool signal)
Expand Down

0 comments on commit e938a6a

Please sign in to comment.