more /Drawing/TechDraw/ edits. VP name conflicts
|
@ -90,7 +90,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,15 @@
|
||||||
#include "DrawViewClip.h"
|
#include "DrawViewClip.h"
|
||||||
#include "DrawHatch.h"
|
#include "DrawHatch.h"
|
||||||
|
|
||||||
extern struct PyMethodDef Drawing_methods[];
|
extern struct PyMethodDef TechDraw_methods[];
|
||||||
|
|
||||||
PyDoc_STRVAR(module_drawing_doc,
|
PyDoc_STRVAR(module_techdraw_doc,
|
||||||
"This module is the Drawing module.");
|
"This module is the TechDraw module.");
|
||||||
|
|
||||||
|
|
||||||
/* Python entry */
|
/* Python entry */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void TechDrawExport initDrawing()
|
void TechDrawExport initTechDraw()
|
||||||
{
|
{
|
||||||
// load dependent module
|
// load dependent module
|
||||||
try {
|
try {
|
||||||
|
@ -53,8 +53,8 @@ void TechDrawExport initDrawing()
|
||||||
PyErr_SetString(PyExc_ImportError, e.what());
|
PyErr_SetString(PyExc_ImportError, e.what());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Py_InitModule3("Drawing", Drawing_methods, module_drawing_doc); /* mod name, table ptr */
|
Py_InitModule3("TechDraw", TechDraw_methods, module_techdraw_doc); /* mod name, table ptr */
|
||||||
Base::Console().Log("Loading Drawing module... done\n");
|
Base::Console().Log("Loading TechDraw module... done\n");
|
||||||
|
|
||||||
|
|
||||||
// NOTE: To finish the initialization of our own type objects we must
|
// NOTE: To finish the initialization of our own type objects we must
|
||||||
|
|
|
@ -57,7 +57,7 @@ tdPlaceholder(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* registration table */
|
/* registration table */
|
||||||
struct PyMethodDef Drawing_methods[] = {
|
struct PyMethodDef TechDraw_methods[] = {
|
||||||
{"tdPlaceholder" ,tdPlaceholder ,METH_VARARGS,
|
{"tdPlaceholder" ,tdPlaceholder ,METH_VARARGS,
|
||||||
"[n/a] = tdPlaceholder(n/a) -- Temporary hack."},
|
"[n/a] = tdPlaceholder(n/a) -- Temporary hack."},
|
||||||
{NULL, NULL} /* end of table marker */
|
{NULL, NULL} /* end of table marker */
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef _Drawing_DrawHatch_h_
|
#ifndef _TechDraw_DrawHatch_h_
|
||||||
#define _Drawing_DrawHatch_h_
|
#define _TechDraw_DrawHatch_h_
|
||||||
|
|
||||||
# include <App/DocumentObject.h>
|
# include <App/DocumentObject.h>
|
||||||
# include <App/FeaturePython.h>
|
# include <App/FeaturePython.h>
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
|
|
||||||
/// returns the type name of the ViewProvider
|
/// returns the type name of the ViewProvider
|
||||||
virtual const char* getViewProviderName(void) const {
|
virtual const char* getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderDrawingPage";
|
return "TechDrawGui::ViewProviderPage";
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *getPyObject(void);
|
PyObject *getPyObject(void);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
FatherNamespace="App">
|
FatherNamespace="App">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<Author Licence="LGPL" Name="WandererFan" EMail="wandererfan@gmail.com" />
|
<Author Licence="LGPL" Name="WandererFan" EMail="wandererfan@gmail.com" />
|
||||||
<UserDocu>Feature for creating and manipulating Drawing Pages</UserDocu>
|
<UserDocu>Feature for creating and manipulating Technical Drawing Pages</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
<Methode Name="addView">
|
<Methode Name="addView">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
FatherNamespace="TechDraw">
|
FatherNamespace="TechDraw">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
||||||
<UserDocu>Feature for creating and manipulating Drawing Templates</UserDocu>
|
<UserDocu>Feature for creating and manipulating Technical Drawing Templates</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
<Methode Name="drawLine">
|
<Methode Name="drawLine">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
FatherNamespace="TechDraw">
|
FatherNamespace="TechDraw">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
||||||
<UserDocu>Feature for creating and manipulating Drawing SVG Templates</UserDocu>
|
<UserDocu>Feature for creating and manipulating Technical Drawing SVG Templates</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
</PythonExport>
|
</PythonExport>
|
||||||
</GenerateModel>
|
</GenerateModel>
|
||||||
|
|
|
@ -38,9 +38,7 @@ namespace TechDrawGeometry
|
||||||
namespace TechDraw
|
namespace TechDraw
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Base class of all View Features in the drawing module
|
class TechDrawExport DrawTemplate : public App::DocumentObject
|
||||||
*/
|
|
||||||
class TechDrawExport DrawTemplate: public App::DocumentObject
|
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDraw::DrawTemplate);
|
PROPERTY_HEADER(TechDraw::DrawTemplate);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
FatherNamespace="App">
|
FatherNamespace="App">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
<Author Licence="LGPL" Name="Luke Parry" EMail="l.parry@warwick.ac.uk" />
|
||||||
<UserDocu>Feature for creating and manipulating Drawing Templates</UserDocu>
|
<UserDocu>Feature for creating and manipulating Technical Drawing Templates</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
</PythonExport>
|
</PythonExport>
|
||||||
</GenerateModel>
|
</GenerateModel>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
namespace DrawUtil {
|
namespace DrawUtil {
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// convenient utility functions for Drawing Module
|
// convenient utility functions for TechDraw Module
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
extern "C" {
|
extern "C" {
|
||||||
int TechDrawExport getIndexFromName(std::string geomName)
|
int TechDrawExport getIndexFromName(std::string geomName)
|
||||||
|
|
|
@ -176,7 +176,7 @@ namespace App {
|
||||||
/// @cond DOXERR
|
/// @cond DOXERR
|
||||||
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewPython, TechDraw::DrawView)
|
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewPython, TechDraw::DrawView)
|
||||||
template<> const char* TechDraw::DrawViewPython::getViewProviderName(void) const {
|
template<> const char* TechDraw::DrawViewPython::getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderView";
|
return "TechDrawGui::ViewProviderDrawingView";
|
||||||
}
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
|
|
||||||
/// returns the type name of the ViewProvider
|
/// returns the type name of the ViewProvider
|
||||||
virtual const char* getViewProviderName(void) const {
|
virtual const char* getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderView";
|
return "TechDrawGui::ViewProviderDrawingView";
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawPage* findParentPage() const;
|
DrawPage* findParentPage() const;
|
||||||
|
|
|
@ -164,7 +164,7 @@ namespace App {
|
||||||
/// @cond DOXERR
|
/// @cond DOXERR
|
||||||
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewClipPython, TechDraw::DrawViewClip)
|
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewClipPython, TechDraw::DrawViewClip)
|
||||||
template<> const char* TechDraw::DrawViewClipPython::getViewProviderName(void) const {
|
template<> const char* TechDraw::DrawViewClipPython::getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderDrawingClip";
|
return "TechDrawGui::ViewProviderDrawClip";
|
||||||
}
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
|
|
||||||
/// returns the type name of the ViewProvider
|
/// returns the type name of the ViewProvider
|
||||||
virtual const char* getViewProviderName(void) const {
|
virtual const char* getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderDrawingClip";
|
return "TechDrawGui::ViewProviderDrawClip";
|
||||||
}
|
}
|
||||||
std::vector<std::string> getChildViewNames();
|
std::vector<std::string> getChildViewNames();
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef _Drawing_DrawViewDimension_h_
|
#ifndef _TechDraw_DrawViewDimension_h_
|
||||||
#define _Drawing_DrawViewDimension_h_
|
#define _TechDraw_DrawViewDimension_h_
|
||||||
|
|
||||||
# include <App/DocumentObject.h>
|
# include <App/DocumentObject.h>
|
||||||
# include <App/FeaturePython.h>
|
# include <App/FeaturePython.h>
|
||||||
|
|
|
@ -462,7 +462,7 @@ namespace App {
|
||||||
/// @cond DOXERR
|
/// @cond DOXERR
|
||||||
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewPartPython, TechDraw::DrawViewPart)
|
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewPartPython, TechDraw::DrawViewPart)
|
||||||
template<> const char* TechDraw::DrawViewPartPython::getViewProviderName(void) const {
|
template<> const char* TechDraw::DrawViewPartPython::getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderView";
|
return "TechDrawGui::ViewProviderViewPart";
|
||||||
}
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
FatherNamespace="TechDraw">
|
FatherNamespace="TechDraw">
|
||||||
<Documentation>
|
<Documentation>
|
||||||
<Author Licence="LGPL" Name="WandererFan" EMail="wandererfan@gmail.com" />
|
<Author Licence="LGPL" Name="WandererFan" EMail="wandererfan@gmail.com" />
|
||||||
<UserDocu>Feature for creating and manipulating Drawing Part Views</UserDocu>
|
<UserDocu>Feature for creating and manipulating Technical Drawing Part Views</UserDocu>
|
||||||
</Documentation>
|
</Documentation>
|
||||||
<CustomAttributes />
|
<CustomAttributes />
|
||||||
</PythonExport>
|
</PythonExport>
|
||||||
|
|
|
@ -273,7 +273,7 @@ namespace App {
|
||||||
/// @cond DOXERR
|
/// @cond DOXERR
|
||||||
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewSectionPython, TechDraw::DrawViewSection)
|
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewSectionPython, TechDraw::DrawViewSection)
|
||||||
template<> const char* TechDraw::DrawViewSectionPython::getViewProviderName(void) const {
|
template<> const char* TechDraw::DrawViewSectionPython::getViewProviderName(void) const {
|
||||||
return "TechDrawGui::ViewProviderView";
|
return "TechDrawGui::ViewProviderDrawingView";
|
||||||
}
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
lib_LTLIBRARIES=libDrawing.la Drawing.la
|
lib_LTLIBRARIES=libDrawing.la Drawing.la
|
||||||
|
|
||||||
libDrawing_la_SOURCES=\
|
libTechDraw_la_SOURCES=\
|
||||||
AppDrawingPy.cpp \
|
AppDrawingPy.cpp \
|
||||||
TechDrawExport.cpp \
|
TechDrawExport.cpp \
|
||||||
TechDrawExport.h \
|
TechDrawExport.h \
|
||||||
|
@ -26,12 +26,12 @@ libDrawing_la_SOURCES=\
|
||||||
|
|
||||||
|
|
||||||
# the library search path.
|
# the library search path.
|
||||||
libDrawing_la_LDFLAGS = -L../../../Base -L../../../App -L../../../Mod/Part/App \
|
libTechDraw_la_LDFLAGS = -L../../../Base -L../../../App -L../../../Mod/Part/App \
|
||||||
-L$(OCC_LIB) $(all_libraries) \
|
-L$(OCC_LIB) $(all_libraries) \
|
||||||
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||||
libDrawing_la_CPPFLAGS = -DTechDrawExport=
|
libTechDraw_la_CPPFLAGS = -DTechDrawExport=
|
||||||
|
|
||||||
libDrawing_la_LIBADD = \
|
libTechDraw_la_LIBADD = \
|
||||||
@BOOST_REGEX_LIB@ @BOOST_SYSTEM_LIB@ \
|
@BOOST_REGEX_LIB@ @BOOST_SYSTEM_LIB@ \
|
||||||
-l@PYTHON_LIB@ \
|
-l@PYTHON_LIB@ \
|
||||||
-lxerces-c \
|
-lxerces-c \
|
||||||
|
@ -61,18 +61,18 @@ libDrawing_la_LIBADD = \
|
||||||
#--------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------
|
||||||
# Loader of libDrawing
|
# Loader of libDrawing
|
||||||
|
|
||||||
Drawing_la_SOURCES=\
|
TechDraw_la_SOURCES=\
|
||||||
AppDrawing.cpp
|
AppDrawing.cpp
|
||||||
|
|
||||||
# the library search path.
|
# the library search path.
|
||||||
Drawing_la_LDFLAGS = $(libDrawing_la_LDFLAGS) -module -avoid-version
|
TechDraw_la_LDFLAGS = $(libTechDraw_la_LDFLAGS) -module -avoid-version
|
||||||
Drawing_la_CPPFLAGS = $(libDrawing_la_CPPFLAGS)
|
TechDraw_la_CPPFLAGS = $(libTechDraw_la_CPPFLAGS)
|
||||||
|
|
||||||
Drawing_la_LIBADD = \
|
TechDraw_la_LIBADD = \
|
||||||
$(libDrawing_la_LIBADD) \
|
$(libTechDraw_la_LIBADD) \
|
||||||
-lDrawing
|
-lDrawing
|
||||||
|
|
||||||
Drawing_la_DEPENDENCIES = libDrawing.la
|
TechDraw_la_DEPENDENCIES = libDrawing.la
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#include "DlgPrefsDrawingImp.h"
|
#include "DlgPrefsDrawingImp.h"
|
||||||
#include "ViewProviderPage.h"
|
#include "ViewProviderPage.h"
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
#include "ViewProviderDimension.h"
|
#include "ViewProviderDimension.h"
|
||||||
#include "ViewProviderProjGroup.h"
|
#include "ViewProviderProjGroup.h"
|
||||||
#include "ViewProviderProjGroupItem.h"
|
#include "ViewProviderProjGroupItem.h"
|
||||||
|
@ -47,17 +47,17 @@
|
||||||
#include "ViewProviderSymbol.h"
|
#include "ViewProviderSymbol.h"
|
||||||
#include "ViewProviderViewClip.h"
|
#include "ViewProviderViewClip.h"
|
||||||
#include "ViewProviderHatch.h"
|
#include "ViewProviderHatch.h"
|
||||||
//#include "resources/qrc_Drawing.cpp"
|
//#include "resources/qrc_TechDraw.cpp"
|
||||||
|
|
||||||
// use a different name to CreateCommand()
|
// use a different name to CreateCommand()
|
||||||
void CreateDrawingCommands(void);
|
void CreateTechDrawCommands(void);
|
||||||
void CreateDrawingCommandsDims(void);
|
void CreateTechDrawCommandsDims(void);
|
||||||
void CreateDrawingCommandsDecorate(void);
|
void CreateTechDrawCommandsDecorate(void);
|
||||||
|
|
||||||
void loadDrawingResource()
|
void loadTechDrawResource()
|
||||||
{
|
{
|
||||||
// add resources and reloads the translators
|
// add resources and reloads the translators
|
||||||
Q_INIT_RESOURCE(Drawing);
|
Q_INIT_RESOURCE(TechDraw);
|
||||||
Gui::Translator::instance()->refresh();
|
Gui::Translator::instance()->refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,12 +75,12 @@ void TechDrawGuiExport initTechDrawGui()
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) Py_InitModule("TechDrawGui", TechDrawGui_Import_methods); /* mod name, table ptr */
|
(void) Py_InitModule("TechDrawGui", TechDrawGui_Import_methods); /* mod name, table ptr */
|
||||||
Base::Console().Log("Loading GUI of Drawing module... done\n");
|
Base::Console().Log("Loading GUI of TechDraw module... done\n");
|
||||||
|
|
||||||
// instantiating the commands
|
// instantiating the commands
|
||||||
CreateDrawingCommands();
|
CreateTechDrawCommands();
|
||||||
CreateDrawingCommandsDims();
|
CreateTechDrawCommandsDims();
|
||||||
CreateDrawingCommandsDecorate();
|
CreateTechDrawCommandsDecorate();
|
||||||
|
|
||||||
TechDrawGui::Workbench::init();
|
TechDrawGui::Workbench::init();
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ void TechDrawGuiExport initTechDrawGui()
|
||||||
QFontDatabase fontDB;
|
QFontDatabase fontDB;
|
||||||
fontDB.addApplicationFont(QString::fromAscii(":/fonts/osifont.ttf"));
|
fontDB.addApplicationFont(QString::fromAscii(":/fonts/osifont.ttf"));
|
||||||
|
|
||||||
TechDrawGui::ViewProviderDrawingPage::init();
|
TechDrawGui::ViewProviderPage::init();
|
||||||
TechDrawGui::ViewProviderView::init();
|
TechDrawGui::ViewProviderDrawingView::init();
|
||||||
|
|
||||||
TechDrawGui::ViewProviderTemplate::init();
|
TechDrawGui::ViewProviderTemplate::init();
|
||||||
TechDrawGui::ViewProviderDimension::init();
|
TechDrawGui::ViewProviderDimension::init();
|
||||||
|
@ -108,7 +108,7 @@ void TechDrawGuiExport initTechDrawGui()
|
||||||
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsDrawingImp> ("Drawing");
|
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsDrawingImp> ("Drawing");
|
||||||
|
|
||||||
// add resources and reloads the translators
|
// add resources and reloads the translators
|
||||||
loadDrawingResource();
|
loadTechDrawResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern "C" {
|
} // extern "C" {
|
||||||
|
|
|
@ -20,7 +20,7 @@ include_directories(
|
||||||
link_directories(${OCC_LIBRARY_DIR})
|
link_directories(${OCC_LIBRARY_DIR})
|
||||||
|
|
||||||
set(TechDrawGui_LIBS
|
set(TechDrawGui_LIBS
|
||||||
Drawing
|
TechDraw
|
||||||
FreeCADGui
|
FreeCADGui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -129,8 +129,8 @@ SET(TechDrawGuiView_SRCS
|
||||||
SET(TechDrawGuiViewProvider_SRCS
|
SET(TechDrawGuiViewProvider_SRCS
|
||||||
ViewProviderPage.cpp
|
ViewProviderPage.cpp
|
||||||
ViewProviderPage.h
|
ViewProviderPage.h
|
||||||
ViewProviderView.cpp
|
ViewProviderDrawingView.cpp
|
||||||
ViewProviderView.h
|
ViewProviderDrawingView.h
|
||||||
ViewProviderProjGroupItem.cpp
|
ViewProviderProjGroupItem.cpp
|
||||||
ViewProviderProjGroupItem.h
|
ViewProviderProjGroupItem.h
|
||||||
ViewProviderTemplate.cpp
|
ViewProviderTemplate.cpp
|
||||||
|
|
|
@ -71,30 +71,30 @@ bool isDrawingPageActive(Gui::Document *doc)
|
||||||
{
|
{
|
||||||
if (doc)
|
if (doc)
|
||||||
// checks if a Sketch Viewprovider is in Edit and is in no special mode
|
// checks if a Sketch Viewprovider is in Edit and is in no special mode
|
||||||
if (doc->getInEdit() && doc->getInEdit()->isDerivedFrom(TechDrawGui::ViewProviderDrawingPage::getClassTypeId()))
|
if (doc->getInEdit() && doc->getInEdit()->isDerivedFrom(TechDrawGui::ViewProviderPage::getClassTypeId()))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewPageDef (default template)
|
// TechDraw_NewPageDef (default template)
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewPageDef);
|
DEF_STD_CMD(CmdTechDrawNewPageDef);
|
||||||
|
|
||||||
CmdDrawingNewPageDef::CmdDrawingNewPageDef()
|
CmdTechDrawNewPageDef::CmdTechDrawNewPageDef()
|
||||||
: Command("Drawing_NewPageDef")
|
: Command("TechDraw_NewPageDef")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert new default drawing page");
|
sMenuText = QT_TR_NOOP("Insert new default drawing page");
|
||||||
sToolTipText = QT_TR_NOOP("Insert new default drawing page");
|
sToolTipText = QT_TR_NOOP("Insert new default drawing page");
|
||||||
sWhatsThis = "Drawing_NewPageDef";
|
sWhatsThis = "TechDraw_NewPageDef";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-new-default";
|
sPixmap = "actions/techdraw-new-default";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewPageDef::activated(int iMsg)
|
void CmdTechDrawNewPageDef::activated(int iMsg)
|
||||||
{
|
{
|
||||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Drawing");
|
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Drawing");
|
||||||
|
@ -130,7 +130,7 @@ void CmdDrawingNewPageDef::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
|
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
|
||||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(getDocument())->getViewProvider(fp);
|
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(getDocument())->getViewProvider(fp);
|
||||||
TechDrawGui::ViewProviderDrawingPage* dvp = dynamic_cast<TechDrawGui::ViewProviderDrawingPage*>(vp);
|
TechDrawGui::ViewProviderPage* dvp = dynamic_cast<TechDrawGui::ViewProviderPage*>(vp);
|
||||||
if (dvp) {
|
if (dvp) {
|
||||||
dvp->show();
|
dvp->show();
|
||||||
}
|
}
|
||||||
|
@ -146,24 +146,24 @@ void CmdDrawingNewPageDef::activated(int iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewPage (with template choice)
|
// TechDraw_NewPage (with template choice)
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewPage);
|
DEF_STD_CMD(CmdTechDrawNewPage);
|
||||||
|
|
||||||
CmdDrawingNewPage::CmdDrawingNewPage()
|
CmdTechDrawNewPage::CmdTechDrawNewPage()
|
||||||
: Command("Drawing_NewPage")
|
: Command("TechDraw_NewPage")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert new drawing page from template");
|
sMenuText = QT_TR_NOOP("Insert new drawing page from template");
|
||||||
sToolTipText = QT_TR_NOOP("Insert new drawing page from template");
|
sToolTipText = QT_TR_NOOP("Insert new drawing page from template");
|
||||||
sWhatsThis = "Drawing_NewPage";
|
sWhatsThis = "TechDraw_NewPage";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-new-pick";
|
sPixmap = "actions/techdraw-new-pick";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewPage::activated(int iMsg)
|
void CmdTechDrawNewPage::activated(int iMsg)
|
||||||
{
|
{
|
||||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Drawing");
|
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Drawing");
|
||||||
|
@ -206,7 +206,7 @@ void CmdDrawingNewPage::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
|
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
|
||||||
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(getDocument())->getViewProvider(fp);
|
Gui::ViewProvider* vp = Gui::Application::Instance->getDocument(getDocument())->getViewProvider(fp);
|
||||||
TechDrawGui::ViewProviderDrawingPage* dvp = dynamic_cast<TechDrawGui::ViewProviderDrawingPage*>(vp);
|
TechDrawGui::ViewProviderPage* dvp = dynamic_cast<TechDrawGui::ViewProviderPage*>(vp);
|
||||||
if (dvp) {
|
if (dvp) {
|
||||||
dvp->show();
|
dvp->show();
|
||||||
}
|
}
|
||||||
|
@ -222,24 +222,24 @@ void CmdDrawingNewPage::activated(int iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewView
|
// TechDraw_NewView
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewView);
|
DEF_STD_CMD(CmdTechDrawNewView);
|
||||||
|
|
||||||
CmdDrawingNewView::CmdDrawingNewView()
|
CmdTechDrawNewView::CmdTechDrawNewView()
|
||||||
: Command("Drawing_NewView")
|
: Command("TechDraw_NewView")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert view in drawing");
|
sMenuText = QT_TR_NOOP("Insert view in drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new View of a Part in the active drawing");
|
sToolTipText = QT_TR_NOOP("Insert a new View of a Part in the active drawing");
|
||||||
sWhatsThis = "Drawing_NewView";
|
sWhatsThis = "TechDraw_NewView";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-view";
|
sPixmap = "actions/techdraw-view";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewView::activated(int iMsg)
|
void CmdTechDrawNewView::activated(int iMsg)
|
||||||
{
|
{
|
||||||
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
||||||
if (shapes.empty()) {
|
if (shapes.empty()) {
|
||||||
|
@ -304,24 +304,24 @@ void CmdDrawingNewView::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewViewSection
|
// TechDraw_NewViewSection
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewViewSection);
|
DEF_STD_CMD(CmdTechDrawNewViewSection);
|
||||||
|
|
||||||
CmdDrawingNewViewSection::CmdDrawingNewViewSection()
|
CmdTechDrawNewViewSection::CmdTechDrawNewViewSection()
|
||||||
: Command("Drawing_NewViewSection")
|
: Command("TechDraw_NewViewSection")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert section view in drawing");
|
sMenuText = QT_TR_NOOP("Insert section view in drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new Section View of a Part in the active drawing");
|
sToolTipText = QT_TR_NOOP("Insert a new Section View of a Part in the active drawing");
|
||||||
sWhatsThis = "Drawing_NewViewSecton";
|
sWhatsThis = "TechDraw_NewViewSecton";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-viewsection";
|
sPixmap = "actions/techdraw-viewsection";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewViewSection::activated(int iMsg)
|
void CmdTechDrawNewViewSection::activated(int iMsg)
|
||||||
{
|
{
|
||||||
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
||||||
if (shapes.empty()) {
|
if (shapes.empty()) {
|
||||||
|
@ -358,24 +358,24 @@ void CmdDrawingNewViewSection::activated(int iMsg)
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_ProjGroup
|
// TechDraw_ProjGroup
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingProjGroup);
|
DEF_STD_CMD_A(CmdTechDrawProjGroup);
|
||||||
|
|
||||||
CmdDrawingProjGroup::CmdDrawingProjGroup()
|
CmdTechDrawProjGroup::CmdTechDrawProjGroup()
|
||||||
: Command("Drawing_ProjGroup")
|
: Command("TechDraw_ProjGroup")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert Projection Group");
|
sMenuText = QT_TR_NOOP("Insert Projection Group");
|
||||||
sToolTipText = QT_TR_NOOP("Insert 2D Projections of a 3D part into the active drawing");
|
sToolTipText = QT_TR_NOOP("Insert 2D Projections of a 3D part into the active drawing");
|
||||||
sWhatsThis = "Drawing_ProjGroup";
|
sWhatsThis = "TechDraw_ProjGroup";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-projgroup";
|
sPixmap = "actions/techdraw-projgroup";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingProjGroup::activated(int iMsg)
|
void CmdTechDrawProjGroup::activated(int iMsg)
|
||||||
{
|
{
|
||||||
// Check that a Part::Feature is in the Selection
|
// Check that a Part::Feature is in the Selection
|
||||||
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
|
||||||
|
@ -431,7 +431,7 @@ void CmdDrawingProjGroup::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingProjGroup::isActive(void)
|
bool CmdTechDrawProjGroup::isActive(void)
|
||||||
{
|
{
|
||||||
if (Gui::Control().activeDialog())
|
if (Gui::Control().activeDialog())
|
||||||
return false;
|
return false;
|
||||||
|
@ -440,24 +440,24 @@ bool CmdDrawingProjGroup::isActive(void)
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_Annotation
|
// TechDraw_Annotation
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingAnnotation);
|
DEF_STD_CMD_A(CmdTechDrawAnnotation);
|
||||||
|
|
||||||
CmdDrawingAnnotation::CmdDrawingAnnotation()
|
CmdTechDrawAnnotation::CmdTechDrawAnnotation()
|
||||||
: Command("Drawing_Annotation")
|
: Command("TechDraw_Annotation")
|
||||||
{
|
{
|
||||||
// setting the Gui eye-candy
|
// setting the Gui eye-candy
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("&Annotation");
|
sMenuText = QT_TR_NOOP("&Annotation");
|
||||||
sToolTipText = QT_TR_NOOP("Inserts an Annotation in the active drawing");
|
sToolTipText = QT_TR_NOOP("Inserts an Annotation in the active drawing");
|
||||||
sWhatsThis = "Drawing_Annotation";
|
sWhatsThis = "TechDraw_Annotation";
|
||||||
sStatusTip = QT_TR_NOOP("Inserts an Annotation in the active drawing");
|
sStatusTip = QT_TR_NOOP("Inserts an Annotation in the active drawing");
|
||||||
sPixmap = "actions/techdraw-annotation";
|
sPixmap = "actions/techdraw-annotation";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingAnnotation::activated(int iMsg)
|
void CmdTechDrawAnnotation::activated(int iMsg)
|
||||||
{
|
{
|
||||||
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
|
@ -480,31 +480,31 @@ void CmdDrawingAnnotation::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingAnnotation::isActive(void)
|
bool CmdTechDrawAnnotation::isActive(void)
|
||||||
{
|
{
|
||||||
return (getActiveGuiDocument() ? true : false);
|
return (getActiveGuiDocument() ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_Clip
|
// TechDraw_Clip
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingClip);
|
DEF_STD_CMD_A(CmdTechDrawClip);
|
||||||
|
|
||||||
CmdDrawingClip::CmdDrawingClip()
|
CmdTechDrawClip::CmdTechDrawClip()
|
||||||
: Command("Drawing_Clip")
|
: Command("TechDraw_Clip")
|
||||||
{
|
{
|
||||||
// seting the
|
// seting the
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("&Clip");
|
sMenuText = QT_TR_NOOP("&Clip");
|
||||||
sToolTipText = QT_TR_NOOP("Inserts a clip group in the active drawing");
|
sToolTipText = QT_TR_NOOP("Inserts a clip group in the active drawing");
|
||||||
sWhatsThis = "Drawing_Clip";
|
sWhatsThis = "TechDraw_Clip";
|
||||||
sStatusTip = QT_TR_NOOP("Inserts a clip group in the active drawing");
|
sStatusTip = QT_TR_NOOP("Inserts a clip group in the active drawing");
|
||||||
sPixmap = "actions/techdraw-clip";
|
sPixmap = "actions/techdraw-clip";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingClip::activated(int iMsg)
|
void CmdTechDrawClip::activated(int iMsg)
|
||||||
{
|
{
|
||||||
|
|
||||||
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
|
@ -529,30 +529,30 @@ void CmdDrawingClip::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingClip::isActive(void)
|
bool CmdTechDrawClip::isActive(void)
|
||||||
{
|
{
|
||||||
return (getActiveGuiDocument() ? true : false);
|
return (getActiveGuiDocument() ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_ClipPlus
|
// TechDraw_ClipPlus
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingClipPlus);
|
DEF_STD_CMD_A(CmdTechDrawClipPlus);
|
||||||
|
|
||||||
CmdDrawingClipPlus::CmdDrawingClipPlus()
|
CmdTechDrawClipPlus::CmdTechDrawClipPlus()
|
||||||
: Command("Drawing_ClipPlus")
|
: Command("TechDraw_ClipPlus")
|
||||||
{
|
{
|
||||||
// seting the
|
// seting the
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("&ClipPlus");
|
sMenuText = QT_TR_NOOP("&ClipPlus");
|
||||||
sToolTipText = QT_TR_NOOP("Add a View to a clip group in the active drawing");
|
sToolTipText = QT_TR_NOOP("Add a View to a clip group in the active drawing");
|
||||||
sWhatsThis = "Drawing_ClipPlus";
|
sWhatsThis = "TechDraw_ClipPlus";
|
||||||
sStatusTip = QT_TR_NOOP("Adds a View into a clip group in the active drawing");
|
sStatusTip = QT_TR_NOOP("Adds a View into a clip group in the active drawing");
|
||||||
sPixmap = "actions/techdraw-clipplus";
|
sPixmap = "actions/techdraw-clipplus";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingClipPlus::activated(int iMsg)
|
void CmdTechDrawClipPlus::activated(int iMsg)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
|
@ -597,29 +597,29 @@ void CmdDrawingClipPlus::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingClipPlus::isActive(void)
|
bool CmdTechDrawClipPlus::isActive(void)
|
||||||
{
|
{
|
||||||
return (getActiveGuiDocument() ? true : false);
|
return (getActiveGuiDocument() ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_ClipMinus
|
// TechDraw_ClipMinus
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingClipMinus);
|
DEF_STD_CMD_A(CmdTechDrawClipMinus);
|
||||||
|
|
||||||
CmdDrawingClipMinus::CmdDrawingClipMinus()
|
CmdTechDrawClipMinus::CmdTechDrawClipMinus()
|
||||||
: Command("Drawing_ClipMinus")
|
: Command("TechDraw_ClipMinus")
|
||||||
{
|
{
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("&ClipMinus");
|
sMenuText = QT_TR_NOOP("&ClipMinus");
|
||||||
sToolTipText = QT_TR_NOOP("Remove a View from a clip group in the active drawing");
|
sToolTipText = QT_TR_NOOP("Remove a View from a clip group in the active drawing");
|
||||||
sWhatsThis = "Drawing_ClipMinus";
|
sWhatsThis = "TechDraw_ClipMinus";
|
||||||
sStatusTip = QT_TR_NOOP("Remove a View from a clip group in the active drawing");
|
sStatusTip = QT_TR_NOOP("Remove a View from a clip group in the active drawing");
|
||||||
sPixmap = "actions/techdraw-clipminus";
|
sPixmap = "actions/techdraw-clipminus";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingClipMinus::activated(int iMsg)
|
void CmdTechDrawClipMinus::activated(int iMsg)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
|
@ -664,31 +664,31 @@ void CmdDrawingClipMinus::activated(int iMsg)
|
||||||
commitCommand();
|
commitCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingClipMinus::isActive(void)
|
bool CmdTechDrawClipMinus::isActive(void)
|
||||||
{
|
{
|
||||||
return (getActiveGuiDocument() ? true : false);
|
return (getActiveGuiDocument() ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_Symbol
|
// TechDraw_Symbol
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdDrawingSymbol);
|
DEF_STD_CMD_A(CmdTechDrawSymbol);
|
||||||
|
|
||||||
CmdDrawingSymbol::CmdDrawingSymbol()
|
CmdTechDrawSymbol::CmdTechDrawSymbol()
|
||||||
: Command("Drawing_Symbol")
|
: Command("TechDraw_Symbol")
|
||||||
{
|
{
|
||||||
// setting the Gui eye-candy
|
// setting the Gui eye-candy
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert SVG &Symbol");
|
sMenuText = QT_TR_NOOP("Insert SVG &Symbol");
|
||||||
sToolTipText = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing");
|
sToolTipText = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing");
|
||||||
sWhatsThis = "Drawing_Symbol";
|
sWhatsThis = "TechDraw_Symbol";
|
||||||
sStatusTip = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing");
|
sStatusTip = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing");
|
||||||
sPixmap = "actions/techdraw-symbol";
|
sPixmap = "actions/techdraw-symbol";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingSymbol::activated(int iMsg)
|
void CmdTechDrawSymbol::activated(int iMsg)
|
||||||
{
|
{
|
||||||
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
|
||||||
|
@ -721,26 +721,26 @@ void CmdDrawingSymbol::activated(int iMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CmdDrawingSymbol::isActive(void)
|
bool CmdTechDrawSymbol::isActive(void)
|
||||||
{
|
{
|
||||||
return (getActiveGuiDocument() ? true : false);
|
return (getActiveGuiDocument() ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_ExportPage
|
// TechDraw_ExportPage
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD_A(CmdTechDrawExportPage);
|
DEF_STD_CMD_A(CmdTechDrawExportPage);
|
||||||
|
|
||||||
CmdTechDrawExportPage::CmdTechDrawExportPage()
|
CmdTechDrawExportPage::CmdTechDrawExportPage()
|
||||||
: Command("Drawing_ExportPage")
|
: Command("TechDraw_ExportPage")
|
||||||
{
|
{
|
||||||
// seting the
|
// seting the
|
||||||
sGroup = QT_TR_NOOP("File");
|
sGroup = QT_TR_NOOP("File");
|
||||||
sMenuText = QT_TR_NOOP("&Export page...");
|
sMenuText = QT_TR_NOOP("&Export page...");
|
||||||
sToolTipText = QT_TR_NOOP("Export a page to an SVG file");
|
sToolTipText = QT_TR_NOOP("Export a page to an SVG file");
|
||||||
sWhatsThis = "Drawing_ExportPage";
|
sWhatsThis = "TechDraw_ExportPage";
|
||||||
sStatusTip = QT_TR_NOOP("Export a page to an SVG file");
|
sStatusTip = QT_TR_NOOP("Export a page to an SVG file");
|
||||||
sPixmap = "actions/saveSVG";
|
sPixmap = "actions/saveSVG";
|
||||||
}
|
}
|
||||||
|
@ -768,7 +768,7 @@ void CmdTechDrawExportPage::activated(int iMsg)
|
||||||
|
|
||||||
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
|
Gui::Document* activeGui = Gui::Application::Instance->getDocument(page->getDocument());
|
||||||
Gui::ViewProvider* vp = activeGui->getViewProvider(page);
|
Gui::ViewProvider* vp = activeGui->getViewProvider(page);
|
||||||
ViewProviderDrawingPage* dvp = dynamic_cast<ViewProviderDrawingPage*>(vp);
|
ViewProviderPage* dvp = dynamic_cast<ViewProviderPage*>(vp);
|
||||||
|
|
||||||
if (dvp && dvp->getMDIViewPage()) {
|
if (dvp && dvp->getMDIViewPage()) {
|
||||||
dvp->getMDIViewPage()->saveSVG();
|
dvp->getMDIViewPage()->saveSVG();
|
||||||
|
@ -786,19 +786,19 @@ bool CmdTechDrawExportPage::isActive(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CreateDrawingCommands(void)
|
void CreateTechDrawCommands(void)
|
||||||
{
|
{
|
||||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||||
|
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewPageDef());
|
rcCmdMgr.addCommand(new CmdTechDrawNewPageDef());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewPage());
|
rcCmdMgr.addCommand(new CmdTechDrawNewPage());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewView());
|
rcCmdMgr.addCommand(new CmdTechDrawNewView());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewViewSection());
|
rcCmdMgr.addCommand(new CmdTechDrawNewViewSection());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingProjGroup());
|
rcCmdMgr.addCommand(new CmdTechDrawProjGroup());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingAnnotation());
|
rcCmdMgr.addCommand(new CmdTechDrawAnnotation());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingClip());
|
rcCmdMgr.addCommand(new CmdTechDrawClip());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingClipPlus());
|
rcCmdMgr.addCommand(new CmdTechDrawClipPlus());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingClipMinus());
|
rcCmdMgr.addCommand(new CmdTechDrawClipMinus());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingSymbol());
|
rcCmdMgr.addCommand(new CmdTechDrawSymbol());
|
||||||
rcCmdMgr.addCommand(new CmdTechDrawExportPage());
|
rcCmdMgr.addCommand(new CmdTechDrawExportPage());
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,24 +76,24 @@ enum EdgeType{
|
||||||
};
|
};
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewDimension
|
// TechDraw_NewDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewDimension);
|
DEF_STD_CMD(CmdTechDrawNewDimension);
|
||||||
|
|
||||||
CmdDrawingNewDimension::CmdDrawingNewDimension()
|
CmdTechDrawNewDimension::CmdTechDrawNewDimension()
|
||||||
: Command("Drawing_NewDimension")
|
: Command("TechDraw_NewDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new dimension");
|
sToolTipText = QT_TR_NOOP("Insert a new dimension");
|
||||||
sWhatsThis = "Drawing_NewDimension";
|
sWhatsThis = "TechDraw_NewDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension";
|
sPixmap = "Dimension";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewDimension::activated(int iMsg)
|
void CmdTechDrawNewDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -207,24 +207,24 @@ void CmdDrawingNewDimension::activated(int iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewRadiusDimension
|
// TechDraw_NewRadiusDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewRadiusDimension);
|
DEF_STD_CMD(CmdTechDrawNewRadiusDimension);
|
||||||
|
|
||||||
CmdDrawingNewRadiusDimension::CmdDrawingNewRadiusDimension()
|
CmdTechDrawNewRadiusDimension::CmdTechDrawNewRadiusDimension()
|
||||||
: Command("Drawing_NewRadiusDimension")
|
: Command("TechDraw_NewRadiusDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new radius dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new radius dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new radius dimension feature for the selected view");
|
sToolTipText = QT_TR_NOOP("Insert a new radius dimension feature for the selected view");
|
||||||
sWhatsThis = "Drawing_NewRadiusDimension";
|
sWhatsThis = "TechDraw_NewRadiusDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Radius";
|
sPixmap = "Dimension_Radius";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewRadiusDimension::activated(int iMsg)
|
void CmdTechDrawNewRadiusDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -293,24 +293,24 @@ void CmdDrawingNewRadiusDimension::activated(int iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewDiameterDimension
|
// TechDraw_NewDiameterDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewDiameterDimension);
|
DEF_STD_CMD(CmdTechDrawNewDiameterDimension);
|
||||||
|
|
||||||
CmdDrawingNewDiameterDimension::CmdDrawingNewDiameterDimension()
|
CmdTechDrawNewDiameterDimension::CmdTechDrawNewDiameterDimension()
|
||||||
: Command("Drawing_NewDiameterDimension")
|
: Command("TechDraw_NewDiameterDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new diameter dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new diameter dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new diameter dimension feature for the selected view");
|
sToolTipText = QT_TR_NOOP("Insert a new diameter dimension feature for the selected view");
|
||||||
sWhatsThis = "Drawing_NewDiameterDimension";
|
sWhatsThis = "TechDraw_NewDiameterDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Diameter";
|
sPixmap = "Dimension_Diameter";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewDiameterDimension::activated(int iMsg)
|
void CmdTechDrawNewDiameterDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -382,24 +382,24 @@ void CmdDrawingNewDiameterDimension::activated(int iMsg)
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewLengthDimension
|
// TechDraw_NewLengthDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewLengthDimension);
|
DEF_STD_CMD(CmdTechDrawNewLengthDimension);
|
||||||
|
|
||||||
CmdDrawingNewLengthDimension::CmdDrawingNewLengthDimension()
|
CmdTechDrawNewLengthDimension::CmdTechDrawNewLengthDimension()
|
||||||
: Command("Drawing_NewLengthDimension")
|
: Command("TechDraw_NewLengthDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new length dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new length dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new length dimension");
|
sToolTipText = QT_TR_NOOP("Insert a new length dimension");
|
||||||
sWhatsThis = "Drawing_NewLengthDimension";
|
sWhatsThis = "TechDraw_NewLengthDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Length";
|
sPixmap = "Dimension_Length";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewLengthDimension::activated(int iMsg)
|
void CmdTechDrawNewLengthDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -475,24 +475,24 @@ void CmdDrawingNewLengthDimension::activated(int iMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewDistanceXDimension
|
// TechDraw_NewDistanceXDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewDistanceXDimension);
|
DEF_STD_CMD(CmdTechDrawNewDistanceXDimension);
|
||||||
|
|
||||||
CmdDrawingNewDistanceXDimension::CmdDrawingNewDistanceXDimension()
|
CmdTechDrawNewDistanceXDimension::CmdTechDrawNewDistanceXDimension()
|
||||||
: Command("Drawing_NewDistanceXDimension")
|
: Command("TechDraw_NewDistanceXDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new horizontal dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new horizontal dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new horizontal-distance dimension");
|
sToolTipText = QT_TR_NOOP("Insert a new horizontal-distance dimension");
|
||||||
sWhatsThis = "Drawing_NewDistanceXDimension";
|
sWhatsThis = "TechDraw_NewDistanceXDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Horizontal";
|
sPixmap = "Dimension_Horizontal";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewDistanceXDimension::activated(int iMsg)
|
void CmdTechDrawNewDistanceXDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -567,24 +567,24 @@ void CmdDrawingNewDistanceXDimension::activated(int iMsg)
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewDistanceYDimension
|
// TechDraw_NewDistanceYDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewDistanceYDimension);
|
DEF_STD_CMD(CmdTechDrawNewDistanceYDimension);
|
||||||
|
|
||||||
CmdDrawingNewDistanceYDimension::CmdDrawingNewDistanceYDimension()
|
CmdTechDrawNewDistanceYDimension::CmdTechDrawNewDistanceYDimension()
|
||||||
: Command("Drawing_NewDistanceYDimension")
|
: Command("TechDraw_NewDistanceYDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new vertical dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new vertical dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new vertical distance dimension");
|
sToolTipText = QT_TR_NOOP("Insert a new vertical distance dimension");
|
||||||
sWhatsThis = "Drawing_NewDistanceYDimension";
|
sWhatsThis = "TechDraw_NewDistanceYDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Vertical";
|
sPixmap = "Dimension_Vertical";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewDistanceYDimension::activated(int iMsg)
|
void CmdTechDrawNewDistanceYDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -658,24 +658,24 @@ void CmdDrawingNewDistanceYDimension::activated(int iMsg)
|
||||||
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewAngleDimension
|
// TechDraw_NewAngleDimension
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewAngleDimension);
|
DEF_STD_CMD(CmdTechDrawNewAngleDimension);
|
||||||
|
|
||||||
CmdDrawingNewAngleDimension::CmdDrawingNewAngleDimension()
|
CmdTechDrawNewAngleDimension::CmdTechDrawNewAngleDimension()
|
||||||
: Command("Drawing_NewAngleDimension")
|
: Command("TechDraw_NewAngleDimension")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a new angle dimension into the drawing");
|
sMenuText = QT_TR_NOOP("Insert a new angle dimension into the drawing");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a new angle dimension");
|
sToolTipText = QT_TR_NOOP("Insert a new angle dimension");
|
||||||
sWhatsThis = "Drawing_NewAngleDimension";
|
sWhatsThis = "TechDraw_NewAngleDimension";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "Dimension_Angle";
|
sPixmap = "Dimension_Angle";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewAngleDimension::activated(int iMsg)
|
void CmdTechDrawNewAngleDimension::activated(int iMsg)
|
||||||
{
|
{
|
||||||
bool result = _checkSelection(this);
|
bool result = _checkSelection(this);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -737,17 +737,17 @@ void CmdDrawingNewAngleDimension::activated(int iMsg)
|
||||||
objFeat->X.setValue(x);
|
objFeat->X.setValue(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDrawingCommandsDims(void)
|
void CreateTechDrawCommandsDims(void)
|
||||||
{
|
{
|
||||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||||
|
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewRadiusDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewRadiusDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewDiameterDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewDiameterDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewLengthDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewLengthDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewDistanceXDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewDistanceXDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewDistanceYDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewDistanceYDimension());
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewAngleDimension());
|
rcCmdMgr.addCommand(new CmdTechDrawNewAngleDimension());
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -59,24 +59,24 @@ using namespace std;
|
||||||
bool _checkSelectionHatch(Gui::Command* cmd);
|
bool _checkSelectionHatch(Gui::Command* cmd);
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// Drawing_NewHatch
|
// TechDraw_NewHatch
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
DEF_STD_CMD(CmdDrawingNewHatch);
|
DEF_STD_CMD(CmdTechDrawNewHatch);
|
||||||
|
|
||||||
CmdDrawingNewHatch::CmdDrawingNewHatch()
|
CmdTechDrawNewHatch::CmdTechDrawNewHatch()
|
||||||
: Command("Drawing_NewHatch")
|
: Command("TechDraw_NewHatch")
|
||||||
{
|
{
|
||||||
sAppModule = "Drawing";
|
sAppModule = "Drawing";
|
||||||
sGroup = QT_TR_NOOP("Drawing");
|
sGroup = QT_TR_NOOP("Drawing");
|
||||||
sMenuText = QT_TR_NOOP("Insert a hatched area into a view");
|
sMenuText = QT_TR_NOOP("Insert a hatched area into a view");
|
||||||
sToolTipText = QT_TR_NOOP("Insert a hatched area into a view");
|
sToolTipText = QT_TR_NOOP("Insert a hatched area into a view");
|
||||||
sWhatsThis = "Drawing_NewHatch";
|
sWhatsThis = "TechDraw_NewHatch";
|
||||||
sStatusTip = sToolTipText;
|
sStatusTip = sToolTipText;
|
||||||
sPixmap = "actions/techdraw-hatch";
|
sPixmap = "actions/techdraw-hatch";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmdDrawingNewHatch::activated(int iMsg)
|
void CmdTechDrawNewHatch::activated(int iMsg)
|
||||||
{
|
{
|
||||||
if (!_checkSelectionHatch(this)) {
|
if (!_checkSelectionHatch(this)) {
|
||||||
return;
|
return;
|
||||||
|
@ -117,12 +117,12 @@ void CmdDrawingNewHatch::activated(int iMsg)
|
||||||
objFeat->X.setValue(x);
|
objFeat->X.setValue(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateDrawingCommandsDecorate(void)
|
void CreateTechDrawCommandsDecorate(void)
|
||||||
{
|
{
|
||||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||||
|
|
||||||
rcCmdMgr.addCommand(new CmdDrawingNewHatch());
|
rcCmdMgr.addCommand(new CmdTechDrawNewHatch());
|
||||||
//rcCmdMgr.addCommand(new CmdDrawingHideLabels());
|
//rcCmdMgr.addCommand(new CmdTechDrawHideLabels());
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -103,7 +103,7 @@ using namespace TechDrawGui;
|
||||||
|
|
||||||
/* TRANSLATOR TechDrawGui::MDIViewPage */
|
/* TRANSLATOR TechDrawGui::MDIViewPage */
|
||||||
|
|
||||||
MDIViewPage::MDIViewPage(ViewProviderDrawingPage *pageVp, Gui::Document* doc, QWidget* parent)
|
MDIViewPage::MDIViewPage(ViewProviderPage *pageVp, Gui::Document* doc, QWidget* parent)
|
||||||
: Gui::MDIView(doc, parent), pageGui(pageVp)
|
: Gui::MDIView(doc, parent), pageGui(pageVp)
|
||||||
{
|
{
|
||||||
m_view = new QGVPage(pageVp);
|
m_view = new QGVPage(pageVp);
|
||||||
|
|
|
@ -49,7 +49,7 @@ class DrawTemplate;
|
||||||
namespace TechDrawGui
|
namespace TechDrawGui
|
||||||
{
|
{
|
||||||
|
|
||||||
class ViewProviderDrawingPage;
|
class ViewProviderPage;
|
||||||
class QGVPage;
|
class QGVPage;
|
||||||
class QGIView;
|
class QGIView;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class TechDrawGuiExport MDIViewPage : public Gui::MDIView, public Gui::Selection
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MDIViewPage(ViewProviderDrawingPage *page, Gui::Document* doc, QWidget* parent = 0);
|
MDIViewPage(ViewProviderPage *page, Gui::Document* doc, QWidget* parent = 0);
|
||||||
virtual ~MDIViewPage();
|
virtual ~MDIViewPage();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
|
@ -118,7 +118,7 @@ private:
|
||||||
QString m_currentPath;
|
QString m_currentPath;
|
||||||
QPrinter::Orientation m_orientation;
|
QPrinter::Orientation m_orientation;
|
||||||
QPrinter::PageSize m_pageSize;
|
QPrinter::PageSize m_pageSize;
|
||||||
ViewProviderDrawingPage *pageGui;
|
ViewProviderPage *pageGui;
|
||||||
|
|
||||||
QList<QGIView *> deleteItems;
|
QList<QGIView *> deleteItems;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
QGVPage::QGVPage(ViewProviderDrawingPage *vp, QWidget *parent)
|
QGVPage::QGVPage(ViewProviderPage *vp, QWidget *parent)
|
||||||
: QGraphicsView(parent)
|
: QGraphicsView(parent)
|
||||||
, pageTemplate(0)
|
, pageTemplate(0)
|
||||||
, m_renderer(Native)
|
, m_renderer(Native)
|
||||||
|
|
|
@ -43,7 +43,7 @@ class QGIView;
|
||||||
class QGIViewDimension;
|
class QGIViewDimension;
|
||||||
class QGITemplate;
|
class QGITemplate;
|
||||||
class QGIHatch;
|
class QGIHatch;
|
||||||
class ViewProviderDrawingPage;
|
class ViewProviderPage;
|
||||||
|
|
||||||
class TechDrawGuiExport QGVPage : public QGraphicsView
|
class TechDrawGuiExport QGVPage : public QGraphicsView
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ class TechDrawGuiExport QGVPage : public QGraphicsView
|
||||||
public:
|
public:
|
||||||
enum RendererType { Native, OpenGL, Image };
|
enum RendererType { Native, OpenGL, Image };
|
||||||
|
|
||||||
QGVPage(ViewProviderDrawingPage *vp, QWidget *parent = 0);
|
QGVPage(ViewProviderPage *vp, QWidget *parent = 0);
|
||||||
~QGVPage();
|
~QGVPage();
|
||||||
|
|
||||||
void setRenderer(RendererType type = Native);
|
void setRenderer(RendererType type = Native);
|
||||||
|
@ -111,7 +111,7 @@ private:
|
||||||
QGraphicsRectItem *m_outlineItem;
|
QGraphicsRectItem *m_outlineItem;
|
||||||
QBrush *bkgBrush;
|
QBrush *bkgBrush;
|
||||||
QImage m_image;
|
QImage m_image;
|
||||||
ViewProviderDrawingPage *pageGui;
|
ViewProviderPage *pageGui;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace MDIViewPageGui
|
} // namespace MDIViewPageGui
|
||||||
|
|
|
@ -39,30 +39,6 @@
|
||||||
<file>icons/actions/saveSVG.svg</file>
|
<file>icons/actions/saveSVG.svg</file>
|
||||||
<file>icons/actions/techdraw-viewsection.svg</file>
|
<file>icons/actions/techdraw-viewsection.svg</file>
|
||||||
<file>icons/actions/techdraw-hatch.svg</file>
|
<file>icons/actions/techdraw-hatch.svg</file>
|
||||||
<file>translations/Drawing_af.qm</file>
|
|
||||||
<file>translations/Drawing_cs.qm</file>
|
|
||||||
<file>translations/Drawing_de.qm</file>
|
|
||||||
<file>translations/Drawing_es-ES.qm</file>
|
|
||||||
<file>translations/Drawing_fi.qm</file>
|
|
||||||
<file>translations/Drawing_fr.qm</file>
|
|
||||||
<file>translations/Drawing_hr.qm</file>
|
|
||||||
<file>translations/Drawing_hu.qm</file>
|
|
||||||
<file>translations/Drawing_it.qm</file>
|
|
||||||
<file>translations/Drawing_ja.qm</file>
|
|
||||||
<file>translations/Drawing_nl.qm</file>
|
|
||||||
<file>translations/Drawing_no.qm</file>
|
|
||||||
<file>translations/Drawing_pl.qm</file>
|
|
||||||
<file>translations/Drawing_pt-BR.qm</file>
|
|
||||||
<file>translations/Drawing_pt-PT.qm</file>
|
|
||||||
<file>translations/Drawing_ro.qm</file>
|
|
||||||
<file>translations/Drawing_ru.qm</file>
|
|
||||||
<file>translations/Drawing_sk.qm</file>
|
|
||||||
<file>translations/Drawing_sv-SE.qm</file>
|
|
||||||
<file>translations/Drawing_tr.qm</file>
|
|
||||||
<file>translations/Drawing_uk.qm</file>
|
|
||||||
<file>translations/Drawing_zh-CN.qm</file>
|
|
||||||
<file>translations/Drawing_zh-TW.qm</file>
|
|
||||||
<file>translations/Drawing_sr.qm</file>
|
|
||||||
<file>icons/ProjBottom.svg</file>
|
<file>icons/ProjBottom.svg</file>
|
||||||
<file>icons/ProjFront.svg</file>
|
<file>icons/ProjFront.svg</file>
|
||||||
<file>icons/ProjGroup.svg</file>
|
<file>icons/ProjGroup.svg</file>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Length_2.svg"
|
sodipodi:docname="drawing_Dimension_Length_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_Dimension_Length_2_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_Dimension_Length_2_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Diameter_2.svg"
|
sodipodi:docname="drawing_Dimension_Diameter_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_dimensions/drawing_Dimension_Diameter_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_dimensions/drawing_Dimension_Diameter_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Horizontal_2.svg"
|
sodipodi:docname="drawing_Dimension_Horizontal_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_dimensions/drawing_Dimension_Horizontal_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_dimensions/drawing_Dimension_Horizontal_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Length_2.svg"
|
sodipodi:docname="drawing_Dimension_Length_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_Dimension_Length_2_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_Dimension_Length_2_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Radius_5.svg"
|
sodipodi:docname="drawing_Dimension_Radius_5.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_dimensions/drawing_Dimension_Radius_5_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_dimensions/drawing_Dimension_Radius_5_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
@ -18,7 +18,7 @@
|
||||||
sodipodi:docname="drawing_Dimension_Vertical_2.svg"
|
sodipodi:docname="drawing_Dimension_Vertical_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_dimensions/drawing_Dimension_Vertical_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_dimensions/drawing_Dimension_Vertical_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
@ -15,10 +15,10 @@
|
||||||
id="svg3052"
|
id="svg3052"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48.3.1 r9886"
|
inkscape:version="0.48.3.1 r9886"
|
||||||
sodipodi:docname="Drawing_new_Drawing_Template_1.svg"
|
sodipodi:docname="TechDraw_new_TechDraw_Template_1.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_new_Drawing_Template_1_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_new_TechDraw_Template_1_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_bottom_2.svg"
|
sodipodi:docname="TechDraw_Box_bottom_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_7_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_7_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_front_2.svg"
|
sodipodi:docname="TechDraw_Box_front_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_front_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_front_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_ortho_2.svg"
|
sodipodi:docname="TechDraw_Box_ortho_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_ortho_2_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_ortho_2_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_left_2.svg"
|
sodipodi:docname="TechDraw_Box_left_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_rear_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_rear_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_rear_2.svg"
|
sodipodi:docname="TechDraw_Box_rear_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_top_2_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_top_2_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_right_2.svg"
|
sodipodi:docname="TechDraw_Box_right_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_left_2_32px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_left_2_32px.png"
|
||||||
inkscape:export-xdpi="45"
|
inkscape:export-xdpi="45"
|
||||||
inkscape:export-ydpi="45">
|
inkscape:export-ydpi="45">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -14,10 +14,10 @@
|
||||||
id="svg2860"
|
id="svg2860"
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.48+devel r"
|
inkscape:version="0.48+devel r"
|
||||||
sodipodi:docname="Drawing_Box_top_2.svg"
|
sodipodi:docname="TechDraw_Box_top_2.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/Drawing_insert_standard_views/Drawing_Box_7_2_16px.png"
|
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/Drawing/TechDraw_insert_standard_views/TechDraw_Box_7_2_16px.png"
|
||||||
inkscape:export-xdpi="22.5"
|
inkscape:export-xdpi="22.5"
|
||||||
inkscape:export-ydpi="22.5">
|
inkscape:export-ydpi="22.5">
|
||||||
<defs
|
<defs
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -15,7 +15,7 @@
|
||||||
id="svg2985"
|
id="svg2985"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:version="0.48.1 r9760"
|
inkscape:version="0.48.1 r9760"
|
||||||
sodipodi:docname="Drawing_OrthoViews.svg">
|
sodipodi:docname="TechDraw_OrthoViews.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs2987">
|
id="defs2987">
|
||||||
<linearGradient
|
<linearGradient
|
||||||
|
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderDimension, TechDrawGui::ViewProviderView)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderDimension, TechDrawGui::ViewProviderDrawingView)
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
@ -60,18 +60,18 @@ ViewProviderDimension::~ViewProviderDimension()
|
||||||
void ViewProviderDimension::attach(App::DocumentObject *pcFeat)
|
void ViewProviderDimension::attach(App::DocumentObject *pcFeat)
|
||||||
{
|
{
|
||||||
// call parent attach method
|
// call parent attach method
|
||||||
ViewProviderView::attach(pcFeat);
|
ViewProviderDrawingView::attach(pcFeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDimension::setDisplayMode(const char* ModeName)
|
void ViewProviderDimension::setDisplayMode(const char* ModeName)
|
||||||
{
|
{
|
||||||
ViewProviderView::setDisplayMode(ModeName);
|
ViewProviderDrawingView::setDisplayMode(ModeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> ViewProviderDimension::getDisplayModes(void) const
|
std::vector<std::string> ViewProviderDimension::getDisplayModes(void) const
|
||||||
{
|
{
|
||||||
// get the modes of the father
|
// get the modes of the father
|
||||||
std::vector<std::string> StrList = ViewProviderView::getDisplayModes();
|
std::vector<std::string> StrList = ViewProviderDrawingView::getDisplayModes();
|
||||||
|
|
||||||
return StrList;
|
return StrList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderFeature.h>
|
#include <Gui/ViewProviderFeature.h>
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
namespace TechDraw{
|
||||||
class DrawViewDimension;
|
class DrawViewDimension;
|
||||||
|
@ -35,7 +35,7 @@ namespace TechDraw{
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderDimension : public ViewProviderView
|
class TechDrawGuiExport ViewProviderDimension : public ViewProviderDrawingView
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderDimension);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderDimension);
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,14 @@
|
||||||
#include <Mod/TechDraw/App/DrawView.h>
|
#include <Mod/TechDraw/App/DrawView.h>
|
||||||
#include <Mod/TechDraw/App/DrawViewClip.h>
|
#include <Mod/TechDraw/App/DrawViewClip.h>
|
||||||
#include <Mod/TechDraw/App/DrawPage.h>
|
#include <Mod/TechDraw/App/DrawPage.h>
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderView, Gui::ViewProviderDocumentObject)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingView, Gui::ViewProviderDocumentObject)
|
||||||
|
|
||||||
ViewProviderView::ViewProviderView()
|
ViewProviderDrawingView::ViewProviderDrawingView()
|
||||||
{
|
{
|
||||||
sPixmap = "View";
|
sPixmap = "View";
|
||||||
|
|
||||||
|
@ -56,28 +56,28 @@ ViewProviderView::ViewProviderView()
|
||||||
DisplayMode.setStatus(App::Property::ReadOnly,true);
|
DisplayMode.setStatus(App::Property::ReadOnly,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewProviderView::~ViewProviderView()
|
ViewProviderDrawingView::~ViewProviderDrawingView()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::attach(App::DocumentObject *pcFeat)
|
void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat)
|
||||||
{
|
{
|
||||||
// call parent attach method
|
// call parent attach method
|
||||||
ViewProviderDocumentObject::attach(pcFeat);
|
ViewProviderDocumentObject::attach(pcFeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::setDisplayMode(const char* ModeName)
|
void ViewProviderDrawingView::setDisplayMode(const char* ModeName)
|
||||||
{
|
{
|
||||||
ViewProviderDocumentObject::setDisplayMode(ModeName);
|
ViewProviderDocumentObject::setDisplayMode(ModeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> ViewProviderView::getDisplayModes(void) const
|
std::vector<std::string> ViewProviderDrawingView::getDisplayModes(void) const
|
||||||
{
|
{
|
||||||
std::vector<std::string> StrList = ViewProviderDocumentObject::getDisplayModes();
|
std::vector<std::string> StrList = ViewProviderDocumentObject::getDisplayModes();
|
||||||
return StrList;
|
return StrList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::show(void)
|
void ViewProviderDrawingView::show(void)
|
||||||
{
|
{
|
||||||
ViewProviderDocumentObject::show();
|
ViewProviderDocumentObject::show();
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ void ViewProviderView::show(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::hide(void)
|
void ViewProviderDrawingView::hide(void)
|
||||||
{
|
{
|
||||||
ViewProviderDocumentObject::hide();
|
ViewProviderDocumentObject::hide();
|
||||||
|
|
||||||
|
@ -111,31 +111,31 @@ void ViewProviderView::hide(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderView::isShow(void) const
|
bool ViewProviderDrawingView::isShow(void) const
|
||||||
{
|
{
|
||||||
return Visibility.getValue();
|
return Visibility.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::startRestoring()
|
void ViewProviderDrawingView::startRestoring()
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::finishRestoring()
|
void ViewProviderDrawingView::finishRestoring()
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderView::updateData(const App::Property*)
|
void ViewProviderDrawingView::updateData(const App::Property*)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TechDraw::DrawView* ViewProviderView::getViewObject() const
|
TechDraw::DrawView* ViewProviderDrawingView::getViewObject() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawView*>(pcObject);
|
return dynamic_cast<TechDraw::DrawView*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderView::onDelete(const std::vector<std::string> &items)
|
bool ViewProviderDrawingView::onDelete(const std::vector<std::string> &items)
|
||||||
{
|
{
|
||||||
//int viewCount =
|
//int viewCount =
|
||||||
static_cast<void> (getViewObject()->findParentPage()->removeView(getViewObject()));
|
static_cast<void> (getViewObject()->findParentPage()->removeView(getViewObject()));
|
|
@ -35,15 +35,15 @@ namespace TechDraw{
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderView : public Gui::ViewProviderDocumentObject
|
class TechDrawGuiExport ViewProviderDrawingView : public Gui::ViewProviderDocumentObject
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderView);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderDrawingView);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// constructor
|
/// constructor
|
||||||
ViewProviderView();
|
ViewProviderDrawingView();
|
||||||
/// destructor
|
/// destructor
|
||||||
virtual ~ViewProviderView();
|
virtual ~ViewProviderDrawingView();
|
||||||
|
|
||||||
|
|
||||||
virtual void attach(App::DocumentObject *);
|
virtual void attach(App::DocumentObject *);
|
||||||
|
@ -71,4 +71,3 @@ public:
|
||||||
|
|
||||||
|
|
||||||
#endif // DRAWINGGUI_VIEWPROVIDERVIEW_H
|
#endif // DRAWINGGUI_VIEWPROVIDERVIEW_H
|
||||||
|
|
|
@ -67,13 +67,13 @@
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingPage, Gui::ViewProviderDocumentObject)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderPage, Gui::ViewProviderDocumentObject)
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|
||||||
ViewProviderDrawingPage::ViewProviderDrawingPage()
|
ViewProviderPage::ViewProviderPage()
|
||||||
: view(0),
|
: view(0),
|
||||||
restoreState(false)
|
restoreState(false)
|
||||||
{
|
{
|
||||||
|
@ -90,21 +90,21 @@ ViewProviderDrawingPage::ViewProviderDrawingPage()
|
||||||
DisplayMode.setStatus(App::Property::Hidden,true);
|
DisplayMode.setStatus(App::Property::Hidden,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewProviderDrawingPage::~ViewProviderDrawingPage()
|
ViewProviderPage::~ViewProviderPage()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::attach(App::DocumentObject *pcFeat)
|
void ViewProviderPage::attach(App::DocumentObject *pcFeat)
|
||||||
{
|
{
|
||||||
ViewProviderDocumentObject::attach(pcFeat);
|
ViewProviderDocumentObject::attach(pcFeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::setDisplayMode(const char* ModeName)
|
void ViewProviderPage::setDisplayMode(const char* ModeName)
|
||||||
{
|
{
|
||||||
ViewProviderDocumentObject::setDisplayMode(ModeName);
|
ViewProviderDocumentObject::setDisplayMode(ModeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> ViewProviderDrawingPage::getDisplayModes(void) const
|
std::vector<std::string> ViewProviderPage::getDisplayModes(void) const
|
||||||
{
|
{
|
||||||
// get the modes of the father
|
// get the modes of the father
|
||||||
std::vector<std::string> StrList = ViewProviderDocumentObject::getDisplayModes();
|
std::vector<std::string> StrList = ViewProviderDocumentObject::getDisplayModes();
|
||||||
|
@ -112,12 +112,12 @@ std::vector<std::string> ViewProviderDrawingPage::getDisplayModes(void) const
|
||||||
return StrList;
|
return StrList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::show(void)
|
void ViewProviderPage::show(void)
|
||||||
{
|
{
|
||||||
showMDIViewPage();
|
showMDIViewPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::hide(void)
|
void ViewProviderPage::hide(void)
|
||||||
{
|
{
|
||||||
// hiding the drawing page should not affect its children but closes the MDI view
|
// hiding the drawing page should not affect its children but closes the MDI view
|
||||||
// therefore do not call the method of its direct base class
|
// therefore do not call the method of its direct base class
|
||||||
|
@ -127,7 +127,7 @@ void ViewProviderDrawingPage::hide(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::updateData(const App::Property* prop)
|
void ViewProviderPage::updateData(const App::Property* prop)
|
||||||
{
|
{
|
||||||
if (prop == &(getPageObject()->Views)) {
|
if (prop == &(getPageObject()->Views)) {
|
||||||
if(view) {
|
if(view) {
|
||||||
|
@ -142,7 +142,7 @@ void ViewProviderDrawingPage::updateData(const App::Property* prop)
|
||||||
Gui::ViewProviderDocumentObject::updateData(prop);
|
Gui::ViewProviderDocumentObject::updateData(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderDrawingPage::onDelete(const std::vector<std::string> &items)
|
bool ViewProviderPage::onDelete(const std::vector<std::string> &items)
|
||||||
{
|
{
|
||||||
if (!view.isNull()) {
|
if (!view.isNull()) {
|
||||||
// TODO: if DrawingPage has children, they should be deleted too, since they are useless without the page.
|
// TODO: if DrawingPage has children, they should be deleted too, since they are useless without the page.
|
||||||
|
@ -152,13 +152,13 @@ bool ViewProviderDrawingPage::onDelete(const std::vector<std::string> &items)
|
||||||
view->deleteLater(); // Delete the drawing view;
|
view->deleteLater(); // Delete the drawing view;
|
||||||
} else {
|
} else {
|
||||||
// MDIViewPage is not displayed yet so don't try to delete it!
|
// MDIViewPage is not displayed yet so don't try to delete it!
|
||||||
Base::Console().Log("INFO - ViewProviderDrawingPage::onDelete - Page object deleted when viewer not displayed\n");
|
Base::Console().Log("INFO - ViewProviderPage::onDelete - Page object deleted when viewer not displayed\n");
|
||||||
}
|
}
|
||||||
Gui::Selection().clearSelection();
|
Gui::Selection().clearSelection();
|
||||||
return ViewProviderDocumentObject::onDelete(items);
|
return ViewProviderDocumentObject::onDelete(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
void ViewProviderPage::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||||
{
|
{
|
||||||
Gui::ViewProviderDocumentObject::setupContextMenu(menu, receiver, member);
|
Gui::ViewProviderDocumentObject::setupContextMenu(menu, receiver, member);
|
||||||
QAction* act = menu->addAction(QObject::tr("Show drawing"), receiver, member);
|
QAction* act = menu->addAction(QObject::tr("Show drawing"), receiver, member);
|
||||||
|
@ -166,7 +166,7 @@ void ViewProviderDrawingPage::setupContextMenu(QMenu* menu, QObject* receiver, c
|
||||||
act->setData(QVariant((int) ViewProvider::Default));
|
act->setData(QVariant((int) ViewProvider::Default));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderDrawingPage::setEdit(int ModNum)
|
bool ViewProviderPage::setEdit(int ModNum)
|
||||||
{
|
{
|
||||||
if (ModNum == ViewProvider::Default) {
|
if (ModNum == ViewProvider::Default) {
|
||||||
showMDIViewPage(); // show the drawing
|
showMDIViewPage(); // show the drawing
|
||||||
|
@ -178,14 +178,14 @@ bool ViewProviderDrawingPage::setEdit(int ModNum)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderDrawingPage::doubleClicked(void)
|
bool ViewProviderPage::doubleClicked(void)
|
||||||
{
|
{
|
||||||
showMDIViewPage();
|
showMDIViewPage();
|
||||||
Gui::getMainWindow()->setActiveWindow(view);
|
Gui::getMainWindow()->setActiveWindow(view);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ViewProviderDrawingPage::showMDIViewPage()
|
bool ViewProviderPage::showMDIViewPage()
|
||||||
{
|
{
|
||||||
if (isRestoring()) {
|
if (isRestoring()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -208,7 +208,7 @@ bool ViewProviderDrawingPage::showMDIViewPage()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<App::DocumentObject*> ViewProviderDrawingPage::claimChildren(void) const
|
std::vector<App::DocumentObject*> ViewProviderPage::claimChildren(void) const
|
||||||
{
|
{
|
||||||
std::vector<App::DocumentObject*> temp;
|
std::vector<App::DocumentObject*> temp;
|
||||||
|
|
||||||
|
@ -248,24 +248,24 @@ std::vector<App::DocumentObject*> ViewProviderDrawingPage::claimChildren(void) c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::unsetEdit(int ModNum)
|
void ViewProviderPage::unsetEdit(int ModNum)
|
||||||
{
|
{
|
||||||
static_cast<void>(showMDIViewPage());
|
static_cast<void>(showMDIViewPage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MDIViewPage* ViewProviderDrawingPage::getMDIViewPage()
|
MDIViewPage* ViewProviderPage::getMDIViewPage()
|
||||||
{
|
{
|
||||||
if (view.isNull()) {
|
if (view.isNull()) {
|
||||||
Base::Console().Log("INFO - ViewProviderDrawingPage::getMDIViewPage has no view!\n");
|
Base::Console().Log("INFO - ViewProviderPage::getMDIViewPage has no view!\n");
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::onSelectionChanged(const Gui::SelectionChanges& msg)
|
void ViewProviderPage::onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||||
{
|
{
|
||||||
if(!view.isNull()) {
|
if(!view.isNull()) {
|
||||||
if(msg.Type == Gui::SelectionChanges::SetSelection) {
|
if(msg.Type == Gui::SelectionChanges::SetSelection) {
|
||||||
|
@ -312,7 +312,7 @@ void ViewProviderDrawingPage::onSelectionChanged(const Gui::SelectionChanges& ms
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::onChanged(const App::Property *prop)
|
void ViewProviderPage::onChanged(const App::Property *prop)
|
||||||
{
|
{
|
||||||
if (prop == &(getPageObject()->Views)) {
|
if (prop == &(getPageObject()->Views)) {
|
||||||
if(view) {
|
if(view) {
|
||||||
|
@ -327,13 +327,13 @@ void ViewProviderDrawingPage::onChanged(const App::Property *prop)
|
||||||
Gui::ViewProviderDocumentObject::onChanged(prop);
|
Gui::ViewProviderDocumentObject::onChanged(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::startRestoring()
|
void ViewProviderPage::startRestoring()
|
||||||
{
|
{
|
||||||
restoreState = true;
|
restoreState = true;
|
||||||
Gui::ViewProviderDocumentObject::startRestoring();
|
Gui::ViewProviderDocumentObject::startRestoring();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderDrawingPage::finishRestoring()
|
void ViewProviderPage::finishRestoring()
|
||||||
{
|
{
|
||||||
restoreState = false;
|
restoreState = false;
|
||||||
static_cast<void>(showMDIViewPage());
|
static_cast<void>(showMDIViewPage());
|
||||||
|
@ -341,7 +341,7 @@ void ViewProviderDrawingPage::finishRestoring()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TechDraw::DrawPage* ViewProviderDrawingPage::getPageObject() const
|
TechDraw::DrawPage* ViewProviderPage::getPageObject() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<TechDraw::DrawPage*>(pcObject);
|
return dynamic_cast<TechDraw::DrawPage*>(pcObject);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,16 +44,16 @@ namespace TechDrawGui {
|
||||||
|
|
||||||
class MDIViewPage;
|
class MDIViewPage;
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderDrawingPage : public Gui::ViewProviderDocumentObject,
|
class TechDrawGuiExport ViewProviderPage : public Gui::ViewProviderDocumentObject,
|
||||||
public Gui::SelectionObserver
|
public Gui::SelectionObserver
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderDrawingPage);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderPage);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// constructor
|
/// constructor
|
||||||
ViewProviderDrawingPage();
|
ViewProviderPage();
|
||||||
/// destructor
|
/// destructor
|
||||||
virtual ~ViewProviderDrawingPage();
|
virtual ~ViewProviderPage();
|
||||||
|
|
||||||
//App::PropertyFloat HintScale;
|
//App::PropertyFloat HintScale;
|
||||||
//App::PropertyFloat HintOffsetX;
|
//App::PropertyFloat HintOffsetX;
|
||||||
|
|
|
@ -42,13 +42,13 @@
|
||||||
#include <Gui/Selection.h>
|
#include <Gui/Selection.h>
|
||||||
|
|
||||||
#include <Mod/TechDraw/App/DrawViewClip.h>
|
#include <Mod/TechDraw/App/DrawViewClip.h>
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
#include "ViewProviderViewClip.h"
|
#include "ViewProviderViewClip.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingClip, TechDrawGui::ViewProviderView)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingClip, TechDrawGui::ViewProviderDrawingView)
|
||||||
|
|
||||||
ViewProviderDrawingClip::ViewProviderDrawingClip()
|
ViewProviderDrawingClip::ViewProviderDrawingClip()
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ std::vector<App::DocumentObject*> ViewProviderDrawingClip::claimChildren(void) c
|
||||||
|
|
||||||
void ViewProviderDrawingClip::show(void)
|
void ViewProviderDrawingClip::show(void)
|
||||||
{
|
{
|
||||||
ViewProviderView::show();
|
ViewProviderDrawingView::show();
|
||||||
|
|
||||||
App::DocumentObject* obj = getObject();
|
App::DocumentObject* obj = getObject();
|
||||||
if (!obj || obj->isRestoring())
|
if (!obj || obj->isRestoring())
|
||||||
|
@ -108,7 +108,7 @@ void ViewProviderDrawingClip::show(void)
|
||||||
|
|
||||||
void ViewProviderDrawingClip::hide(void)
|
void ViewProviderDrawingClip::hide(void)
|
||||||
{
|
{
|
||||||
ViewProviderView::hide();
|
ViewProviderDrawingView::hide();
|
||||||
|
|
||||||
App::DocumentObject* obj = getObject();
|
App::DocumentObject* obj = getObject();
|
||||||
if (!obj || obj->isRestoring())
|
if (!obj || obj->isRestoring())
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#define DRAWINGGUI_VIEWPROVIDERCLIP_H
|
#define DRAWINGGUI_VIEWPROVIDERCLIP_H
|
||||||
|
|
||||||
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
#include <Gui/ViewProviderDocumentObjectGroup.h>
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
namespace TechDraw{
|
||||||
class DrawViewClip;
|
class DrawViewClip;
|
||||||
|
@ -34,7 +34,7 @@ namespace TechDraw{
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderDrawingClip : public ViewProviderView
|
class TechDrawGuiExport ViewProviderDrawingClip : public ViewProviderDrawingView
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderDrawingClip);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderDrawingClip);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
using namespace TechDrawGui;
|
using namespace TechDrawGui;
|
||||||
|
|
||||||
PROPERTY_SOURCE(TechDrawGui::ViewProviderViewPart, TechDrawGui::ViewProviderView)
|
PROPERTY_SOURCE(TechDrawGui::ViewProviderViewPart, TechDrawGui::ViewProviderDrawingView)
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
#ifndef DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
||||||
#define DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
#define DRAWINGGUI_VIEWPROVIDERVIEWPART_H
|
||||||
|
|
||||||
#include "ViewProviderView.h"
|
#include "ViewProviderDrawingView.h"
|
||||||
|
|
||||||
namespace TechDraw{
|
namespace TechDraw{
|
||||||
class DrawViewPart;
|
class DrawViewPart;
|
||||||
|
@ -32,7 +32,7 @@ namespace TechDraw{
|
||||||
|
|
||||||
namespace TechDrawGui {
|
namespace TechDrawGui {
|
||||||
|
|
||||||
class TechDrawGuiExport ViewProviderViewPart : public ViewProviderView
|
class TechDrawGuiExport ViewProviderViewPart : public ViewProviderDrawingView
|
||||||
{
|
{
|
||||||
PROPERTY_HEADER(TechDrawGui::ViewProviderViewPart);
|
PROPERTY_HEADER(TechDrawGui::ViewProviderViewPart);
|
||||||
|
|
||||||
|
|
|
@ -60,24 +60,24 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||||
Gui::MenuItem* draw = new Gui::MenuItem;
|
Gui::MenuItem* draw = new Gui::MenuItem;
|
||||||
root->insertItem(item, draw);
|
root->insertItem(item, draw);
|
||||||
draw->setCommand("Drawing");
|
draw->setCommand("Drawing");
|
||||||
//*draw << "Drawing_Open";
|
//*draw << "TechDraw_Open";
|
||||||
//*part << "Drawing_NewA3Landscape";
|
//*part << "TechDraw_NewA3Landscape";
|
||||||
*draw << "Drawing_NewPageDef";
|
*draw << "TechDraw_NewPageDef";
|
||||||
*draw << "Drawing_NewPage";
|
*draw << "TechDraw_NewPage";
|
||||||
*draw << "Drawing_NewView";
|
*draw << "TechDraw_NewView";
|
||||||
*draw << "Drawing_ProjGroup";
|
*draw << "TechDraw_ProjGroup";
|
||||||
//*part << "Drawing_OpenBrowserView";
|
//*part << "TechDraw_OpenBrowserView";
|
||||||
*draw << "Drawing_NewViewSection";
|
*draw << "TechDraw_NewViewSection";
|
||||||
*draw << "Drawing_Annotation";
|
*draw << "TechDraw_Annotation";
|
||||||
*draw << "Drawing_Symbol";
|
*draw << "TechDraw_Symbol";
|
||||||
*draw << "Drawing_Clip";
|
*draw << "TechDraw_Clip";
|
||||||
*draw << "Drawing_ClipPlus";
|
*draw << "TechDraw_ClipPlus";
|
||||||
*draw << "Drawing_ClipMinus";
|
*draw << "TechDraw_ClipMinus";
|
||||||
*draw << "Drawing_NewDimension";
|
*draw << "TechDraw_NewDimension";
|
||||||
//*part << "Drawing_DraftView";
|
//*part << "TechDraw_DraftView";
|
||||||
*draw << "Drawing_ExportPage";
|
*draw << "TechDraw_ExportPage";
|
||||||
//*draw << "Separator";
|
//*draw << "Separator";
|
||||||
//*draw << "Drawing_ProjectShape";
|
//*draw << "TechDraw_ProjectShape";
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
@ -87,40 +87,40 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||||
Gui::ToolBarItem* pages = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem* pages = new Gui::ToolBarItem(root);
|
||||||
pages->setCommand("Drawing Pages");
|
pages->setCommand("Drawing Pages");
|
||||||
*pages << "Drawing_NewPageDef";
|
*pages << "TechDraw_NewPageDef";
|
||||||
*pages << "Drawing_NewPage";
|
*pages << "TechDraw_NewPage";
|
||||||
|
|
||||||
Gui::ToolBarItem *views = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *views = new Gui::ToolBarItem(root);
|
||||||
views->setCommand("Drawing Views");
|
views->setCommand("Drawing Views");
|
||||||
*views << "Drawing_NewView";
|
*views << "TechDraw_NewView";
|
||||||
*views << "Drawing_ProjGroup";
|
*views << "TechDraw_ProjGroup";
|
||||||
*views << "Drawing_NewViewSection";
|
*views << "TechDraw_NewViewSection";
|
||||||
*views << "Drawing_Annotation";
|
*views << "TechDraw_Annotation";
|
||||||
|
|
||||||
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
|
||||||
clips->setCommand("Drawing Clips");
|
clips->setCommand("Drawing Clips");
|
||||||
*clips << "Drawing_Clip";
|
*clips << "TechDraw_Clip";
|
||||||
*clips << "Drawing_ClipPlus";
|
*clips << "TechDraw_ClipPlus";
|
||||||
*clips << "Drawing_ClipMinus";
|
*clips << "TechDraw_ClipMinus";
|
||||||
|
|
||||||
Gui::ToolBarItem *dims = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *dims = new Gui::ToolBarItem(root);
|
||||||
dims->setCommand("Drawing Dimensions");
|
dims->setCommand("Drawing Dimensions");
|
||||||
// *dims << "Drawing_NewDimension"
|
// *dims << "TechDraw_NewDimension"
|
||||||
*dims << "Drawing_NewLengthDimension";
|
*dims << "TechDraw_NewLengthDimension";
|
||||||
*dims << "Drawing_NewDistanceXDimension";
|
*dims << "TechDraw_NewDistanceXDimension";
|
||||||
*dims << "Drawing_NewDistanceYDimension";
|
*dims << "TechDraw_NewDistanceYDimension";
|
||||||
*dims << "Drawing_NewRadiusDimension";
|
*dims << "TechDraw_NewRadiusDimension";
|
||||||
*dims << "Drawing_NewDiameterDimension";
|
*dims << "TechDraw_NewDiameterDimension";
|
||||||
*dims << "Drawing_NewAngleDimension";
|
*dims << "TechDraw_NewAngleDimension";
|
||||||
|
|
||||||
Gui::ToolBarItem *file = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *file = new Gui::ToolBarItem(root);
|
||||||
file->setCommand("Drawing File Access");
|
file->setCommand("Drawing File Access");
|
||||||
*file << "Drawing_ExportPage";
|
*file << "TechDraw_ExportPage";
|
||||||
*file << "Drawing_Symbol";
|
*file << "TechDraw_Symbol";
|
||||||
|
|
||||||
Gui::ToolBarItem *decor = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *decor = new Gui::ToolBarItem(root);
|
||||||
decor->setCommand("Drawing Decoration");
|
decor->setCommand("Drawing Decoration");
|
||||||
*decor << "Drawing_NewHatch";
|
*decor << "TechDraw_NewHatch";
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,40 +129,40 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
|
||||||
Gui::ToolBarItem* root = new Gui::ToolBarItem;
|
Gui::ToolBarItem* root = new Gui::ToolBarItem;
|
||||||
Gui::ToolBarItem *pages = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *pages = new Gui::ToolBarItem(root);
|
||||||
pages->setCommand("Drawing Pages");
|
pages->setCommand("Drawing Pages");
|
||||||
*pages << "Drawing_NewPageDef";
|
*pages << "TechDraw_NewPageDef";
|
||||||
*pages << "Drawing_NewPage";
|
*pages << "TechDraw_NewPage";
|
||||||
|
|
||||||
Gui::ToolBarItem *views = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *views = new Gui::ToolBarItem(root);
|
||||||
views->setCommand("Views");
|
views->setCommand("Views");
|
||||||
*views << "Drawing_NewView";
|
*views << "TechDraw_NewView";
|
||||||
*views << "Drawing_ProjGroup";
|
*views << "TechDraw_ProjGroup";
|
||||||
*views << "Drawing_NewViewSection";
|
*views << "TechDraw_NewViewSection";
|
||||||
*views << "Drawing_Annotation";
|
*views << "TechDraw_Annotation";
|
||||||
|
|
||||||
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
|
||||||
clips->setCommand("Drawing Clips");
|
clips->setCommand("Drawing Clips");
|
||||||
*clips << "Drawing_Clip";
|
*clips << "TechDraw_Clip";
|
||||||
*clips << "Drawing_ClipPlus";
|
*clips << "TechDraw_ClipPlus";
|
||||||
*clips << "Drawing_ClipMinus";
|
*clips << "TechDraw_ClipMinus";
|
||||||
|
|
||||||
Gui::ToolBarItem *dims = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *dims = new Gui::ToolBarItem(root);
|
||||||
dims->setCommand("Drawing Dimensions");
|
dims->setCommand("Drawing Dimensions");
|
||||||
// *dims << "Drawing_NewDimension";
|
// *dims << "TechDraw_NewDimension";
|
||||||
*dims << "Drawing_NewLengthDimension";
|
*dims << "TechDraw_NewLengthDimension";
|
||||||
*dims << "Drawing_NewDistanceXDimension";
|
*dims << "TechDraw_NewDistanceXDimension";
|
||||||
*dims << "Drawing_NewDistanceYDimension";
|
*dims << "TechDraw_NewDistanceYDimension";
|
||||||
*dims << "Drawing_NewRadiusDimension";
|
*dims << "TechDraw_NewRadiusDimension";
|
||||||
*dims << "Drawing_NewDiameterDimension";
|
*dims << "TechDraw_NewDiameterDimension";
|
||||||
*dims << "Drawing_NewAngleDimension";
|
*dims << "TechDraw_NewAngleDimension";
|
||||||
|
|
||||||
Gui::ToolBarItem *file = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *file = new Gui::ToolBarItem(root);
|
||||||
file->setCommand("Drawing File Access");
|
file->setCommand("Drawing File Access");
|
||||||
*file << "Drawing_ExportPage";
|
*file << "TechDraw_ExportPage";
|
||||||
*file << "Drawing_Symbol";
|
*file << "TechDraw_Symbol";
|
||||||
|
|
||||||
Gui::ToolBarItem *decor = new Gui::ToolBarItem(root);
|
Gui::ToolBarItem *decor = new Gui::ToolBarItem(root);
|
||||||
decor->setCommand("Drawing Decoration");
|
decor->setCommand("Drawing Decoration");
|
||||||
*decor << "Drawing_NewHatch";
|
*decor << "TechDraw_NewHatch";
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# FreeCAD init script of the Drawing module
|
# FreeCAD init script of the TechDraw module
|
||||||
# (c) 2001 Juergen Riegel
|
# (c) 2001 Juergen Riegel
|
||||||
|
|
||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Drawing gui init module
|
# TechDraw gui init module
|
||||||
# (c) 2003 Juergen Riegel
|
# (c) 2003 Juergen Riegel
|
||||||
#
|
#
|
||||||
# Gathering all the information to start FreeCAD
|
# Gathering all the information to start FreeCAD
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
#***************************************************************************/
|
#***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
class DrawingWorkbench (Workbench):
|
class TechDrawWorkbench (Workbench):
|
||||||
"Drawing workbench object"
|
"Technical Drawing workbench object"
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/TechDraw/Resources/icons/preferences-drawing.svg"
|
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/TechDraw/Resources/icons/preferences-drawing.svg"
|
||||||
self.__class__.MenuText = "TechDraw"
|
self.__class__.MenuText = "TechDraw"
|
||||||
|
@ -44,5 +44,5 @@ class DrawingWorkbench (Workbench):
|
||||||
def GetClassName(self):
|
def GetClassName(self):
|
||||||
return "TechDrawGui::Workbench"
|
return "TechDrawGui::Workbench"
|
||||||
|
|
||||||
Gui.addWorkbench(DrawingWorkbench())
|
Gui.addWorkbench(TechDrawWorkbench())
|
||||||
|
|
||||||
|
|