Basic working version of DrawViewDraft

This commit is contained in:
WandererFan 2016-02-03 20:02:13 -05:00 committed by wmayer
parent 6fe7add213
commit c7d845cc5b
9 changed files with 841 additions and 20 deletions

View File

@ -32,6 +32,7 @@
//#include "DrawProjection.h" //#include "DrawProjection.h"
#include "DrawViewClip.h" #include "DrawViewClip.h"
#include "DrawHatch.h" #include "DrawHatch.h"
#include "DrawViewDraft.h"
extern struct PyMethodDef TechDraw_methods[]; extern struct PyMethodDef TechDraw_methods[];
@ -79,6 +80,7 @@ void TechDrawExport initTechDraw()
TechDraw::DrawViewClip ::init(); TechDraw::DrawViewClip ::init();
TechDraw::DrawHatch ::init(); TechDraw::DrawHatch ::init();
TechDraw::DrawViewDraft ::init();
// Python Types // Python Types
TechDraw::DrawViewPython ::init(); TechDraw::DrawViewPython ::init();

View File

@ -71,7 +71,8 @@ SET(Draw_SRCS
DrawViewSection.h DrawViewSection.h
DrawHatch.cpp DrawHatch.cpp
DrawHatch.h DrawHatch.h
) DrawViewDraft.cpp
DrawViewDraft.h)
SET(TechDraw_SRCS SET(TechDraw_SRCS
AppTechDraw.cpp AppTechDraw.cpp

View File

@ -0,0 +1,134 @@
/***************************************************************************
* Copyright (c) WandererFan - 2016 (wandererfan@gmail.com) *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <sstream>
#endif
#include <iomanip>
#include <boost/regex.hpp>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Interpreter.h>
#include "DrawViewDraft.h"
using namespace TechDraw;
using namespace std;
//===========================================================================
// DrawViewDraft
//===========================================================================
PROPERTY_SOURCE(TechDraw::DrawViewDraft, TechDraw::DrawViewSymbol)
DrawViewDraft::DrawViewDraft(void)
{
static const char *group = "Draft view";
ADD_PROPERTY_TYPE(Source ,(0),group,App::Prop_None,"Draft object for this view");
ADD_PROPERTY_TYPE(LineScale,(1.0),group,App::Prop_None,"Line width adjustment factor for this view");
ADD_PROPERTY_TYPE(FontSize,(12.0),group,App::Prop_None,"Text size for this view");
ScaleType.setValue("Custom");
}
DrawViewDraft::~DrawViewDraft()
{
}
void DrawViewDraft::onChanged(const App::Property* prop)
{
if (!isRestoring()) {
if (prop == &Source ||
prop == &LineScale ||
prop == &FontSize) {
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
}
catch (...) {
}
}
}
TechDraw::DrawViewSymbol::onChanged(prop);
}
App::DocumentObjectExecReturn *DrawViewDraft::execute(void)
{
App::DocumentObject* sourceObj = Source.getValue();
if (sourceObj) {
std::string svgFrag;
std::string svgHead = getSVGHead();
std::string svgTail = getSVGTail();
std::string FeatName = getNameInDocument();
std::string SourceName = sourceObj->getNameInDocument();
std::stringstream paramStr;
paramStr << ",scale=" << LineScale.getValue() << ",fontsize=" << FontSize.getValue();
// this is ok for a starting point, but should eventually make dedicated Draft functions that build the svg for all the special cases
// (Arch section, etc)
// like Draft.makeDrawingView, but we don't need to create the actual document objects in Draft, just the svg.
Base::Interpreter().runString("import Draft");
Base::Interpreter().runStringArg("svgBody = Draft.getSVG(App.activeDocument().%s %s)",
SourceName.c_str(),paramStr.str().c_str());
// Base::Interpreter().runString("print svgBody");
Base::Interpreter().runStringArg("App.activeDocument().%s.Symbol = '%s' + svgBody + '%s'",
FeatName.c_str(),svgHead.c_str(),svgTail.c_str());
}
return DrawView::execute();
}
std::string DrawViewDraft::getSVGHead(void)
{
std::string head = std::string("<svg\\n") +
std::string(" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"\\n") +
std::string(" xmlns:freecad=\"http://www.freecadweb.org/wiki/index.php?title=Svg_Namespace\">\\n");
return head;
}
std::string DrawViewDraft::getSVGTail(void)
{
std::string tail = "\\n</svg>";
return tail;
}
// Python Drawing feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewDraftPython, TechDraw::DrawViewDraft)
template<> const char* TechDraw::DrawViewDraftPython::getViewProviderName(void) const {
return "TechDrawGui::ViewProviderSymbol";
}
/// @endcond
// explicit template instantiation
template class TechDrawExport FeaturePythonT<TechDraw::DrawViewDraft>;
}

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) WandererFan - 2016 (wandererfan@gmail.com) *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef _DrawViewDraft_h_
#define _DrawViewDraft_h_
#include <App/DocumentObject.h>
#include <Base/BoundBox.h>
#include <App/FeaturePython.h>
#include <App/PropertyLinks.h>
#include "DrawView.h"
#include "DrawViewSymbol.h"
namespace TechDraw
{
class TechDrawExport DrawViewDraft : public TechDraw::DrawViewSymbol
{
PROPERTY_HEADER(TechDraw::DrawViewDraft);
public:
/// Constructor
DrawViewDraft(void);
virtual ~DrawViewDraft();
App::PropertyLink Source;
App::PropertyFloat LineScale;
App::PropertyFloat FontSize;
/** @name methods overide Feature */
//@{
/// recalculate the Feature
virtual App::DocumentObjectExecReturn *execute(void);
//@}
/// returns the type name of the ViewProvider
virtual const char* getViewProviderName(void) const {
return "TechDrawGui::ViewProviderSymbol";
}
protected:
void onChanged(const App::Property* prop);
Base::BoundBox3d bbox;
std::string getSVGHead(void);
std::string getSVGTail(void);
};
typedef App::FeaturePythonT<DrawViewDraft> DrawViewDraftPython;
} //namespace TechDraw
#endif

View File

@ -33,6 +33,7 @@
#include <App/Application.h> #include <App/Application.h>
#include <App/Document.h> #include <App/Document.h>
#include <App/DocumentObject.h> #include <App/DocumentObject.h>
#include <App/FeaturePython.h>
#include <App/PropertyGeo.h> #include <App/PropertyGeo.h>
#include <Base/Console.h> #include <Base/Console.h>
#include <Base/Parameter.h> #include <Base/Parameter.h>
@ -49,6 +50,8 @@
#include <Gui/WaitCursor.h> #include <Gui/WaitCursor.h>
#include <Mod/Part/App/PartFeature.h> #include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/Part2DObject.h>
#include <Mod/TechDraw/App/DrawPage.h> #include <Mod/TechDraw/App/DrawPage.h>
#include <Mod/TechDraw/App/DrawViewPart.h> #include <Mod/TechDraw/App/DrawViewPart.h>
#include <Mod/TechDraw/App/DrawProjGroupItem.h> #include <Mod/TechDraw/App/DrawProjGroupItem.h>
@ -57,6 +60,7 @@
#include <Mod/TechDraw/App/DrawViewClip.h> #include <Mod/TechDraw/App/DrawViewClip.h>
#include <Mod/TechDraw/App/DrawViewAnnotation.h> #include <Mod/TechDraw/App/DrawViewAnnotation.h>
#include <Mod/TechDraw/App/DrawViewSymbol.h> #include <Mod/TechDraw/App/DrawViewSymbol.h>
#include <Mod/TechDraw/App/DrawViewDraft.h>
#include <Mod/TechDraw/Gui/QGVPage.h> #include <Mod/TechDraw/Gui/QGVPage.h>
@ -85,8 +89,8 @@ DEF_STD_CMD(CmdTechDrawNewPageDef);
CmdTechDrawNewPageDef::CmdTechDrawNewPageDef() CmdTechDrawNewPageDef::CmdTechDrawNewPageDef()
: Command("TechDraw_NewPageDef") : Command("TechDraw_NewPageDef")
{ {
sAppModule = "Drawing"; sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_NewPageDef"; sWhatsThis = "TechDraw_NewPageDef";
@ -154,8 +158,8 @@ DEF_STD_CMD(CmdTechDrawNewPage);
CmdTechDrawNewPage::CmdTechDrawNewPage() CmdTechDrawNewPage::CmdTechDrawNewPage()
: Command("TechDraw_NewPage") : Command("TechDraw_NewPage")
{ {
sAppModule = "Drawing"; sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_NewPage"; sWhatsThis = "TechDraw_NewPage";
@ -230,8 +234,8 @@ DEF_STD_CMD(CmdTechDrawNewView);
CmdTechDrawNewView::CmdTechDrawNewView() CmdTechDrawNewView::CmdTechDrawNewView()
: Command("TechDraw_NewView") : Command("TechDraw_NewView")
{ {
sAppModule = "Drawing"; sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_NewView"; sWhatsThis = "TechDraw_NewView";
@ -312,8 +316,8 @@ DEF_STD_CMD(CmdTechDrawNewViewSection);
CmdTechDrawNewViewSection::CmdTechDrawNewViewSection() CmdTechDrawNewViewSection::CmdTechDrawNewViewSection()
: Command("TechDraw_NewViewSection") : Command("TechDraw_NewViewSection")
{ {
sAppModule = "Drawing"; sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_NewViewSecton"; sWhatsThis = "TechDraw_NewViewSecton";
@ -366,8 +370,8 @@ DEF_STD_CMD_A(CmdTechDrawProjGroup);
CmdTechDrawProjGroup::CmdTechDrawProjGroup() CmdTechDrawProjGroup::CmdTechDrawProjGroup()
: Command("TechDraw_ProjGroup") : Command("TechDraw_ProjGroup")
{ {
sAppModule = "Drawing"; sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_ProjGroup"; sWhatsThis = "TechDraw_ProjGroup";
@ -451,7 +455,7 @@ CmdTechDrawAnnotation::CmdTechDrawAnnotation()
: Command("TechDraw_Annotation") : Command("TechDraw_Annotation")
{ {
// setting the Gui eye-candy // setting the Gui eye-candy
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_Annotation"; sWhatsThis = "TechDraw_Annotation";
@ -495,7 +499,7 @@ CmdTechDrawClip::CmdTechDrawClip()
: Command("TechDraw_Clip") : Command("TechDraw_Clip")
{ {
// seting the // seting the
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_Clip"; sWhatsThis = "TechDraw_Clip";
@ -542,7 +546,7 @@ CmdTechDrawClipPlus::CmdTechDrawClipPlus()
: Command("TechDraw_ClipPlus") : Command("TechDraw_ClipPlus")
{ {
// seting the // seting the
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_ClipPlus"; sWhatsThis = "TechDraw_ClipPlus";
@ -611,7 +615,7 @@ DEF_STD_CMD_A(CmdTechDrawClipMinus);
CmdTechDrawClipMinus::CmdTechDrawClipMinus() CmdTechDrawClipMinus::CmdTechDrawClipMinus()
: Command("TechDraw_ClipMinus") : Command("TechDraw_ClipMinus")
{ {
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_ClipMinus"; sWhatsThis = "TechDraw_ClipMinus";
@ -682,7 +686,7 @@ CmdTechDrawSymbol::CmdTechDrawSymbol()
: Command("TechDraw_Symbol") : Command("TechDraw_Symbol")
{ {
// setting the Gui eye-candy // setting the Gui eye-candy
sGroup = QT_TR_NOOP("Drawing"); sGroup = QT_TR_NOOP("TechDraw");
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 = "TechDraw_Symbol"; sWhatsThis = "TechDraw_Symbol";
@ -707,7 +711,7 @@ void CmdTechDrawSymbol::activated(int iMsg)
std::string PageName = pages.front()->getNameInDocument(); std::string PageName = pages.front()->getNameInDocument();
std::string FeatName = getUniqueObjectName("Symbol"); std::string FeatName = getUniqueObjectName("Symbol");
openCommand("Create Symbol"); openCommand("Create Symbol");
doCommand(Doc,"import Drawing"); //doCommand(Doc,"import Drawing");
doCommand(Doc,"f = open(unicode(\"%s\",'utf-8'),'r')",(const char*)filename.toUtf8()); doCommand(Doc,"f = open(unicode(\"%s\",'utf-8'),'r')",(const char*)filename.toUtf8());
doCommand(Doc,"svg = f.read()"); doCommand(Doc,"svg = f.read()");
doCommand(Doc,"f.close()"); doCommand(Doc,"f.close()");
@ -726,6 +730,64 @@ bool CmdTechDrawSymbol::isActive(void)
return (getActiveGuiDocument() ? true : false); return (getActiveGuiDocument() ? true : false);
} }
//===========================================================================
// TechDraw_DraftView
//===========================================================================
DEF_STD_CMD_A(CmdTechDrawDraftView);
CmdTechDrawDraftView::CmdTechDrawDraftView()
: Command("TechDraw_DraftView")
{
// setting the Gui eye-candy
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Insert a DraftView");
sToolTipText = QT_TR_NOOP("Inserts a Draft WB object into the active drawing");
sWhatsThis = "TechDraw_DraftView";
sStatusTip = QT_TR_NOOP("Inserts a Draft WB object into the active drawing");
sPixmap = "actions/drawing-draft-view";
}
void CmdTechDrawDraftView::activated(int iMsg)
{
// std::vector<App::DocumentObject*> pages = getSelection().getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
std::vector<App::DocumentObject*> pages = getDocument()->getObjectsOfType(TechDraw::DrawPage::getClassTypeId());
if (pages.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"),
QObject::tr("Create a page first."));
return;
}
std::vector<App::DocumentObject*> feats = getSelection().getObjectsOfType(Part::Feature::getClassTypeId());
if (feats.empty()) {
feats = getSelection().getObjectsOfType(App::FeaturePython::getClassTypeId());
if (feats.empty()) {
feats = getSelection().getObjectsOfType(Part::Part2DObject::getClassTypeId());
if (feats.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No Source Object"),
QObject::tr("Select a Draft object first."));
return;
}
}
}
std::string PageName = pages.front()->getNameInDocument();
std::string SourceName = feats.front()->getNameInDocument();
std::string FeatName = getUniqueObjectName("DraftView");
openCommand("Create DraftView");
doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawViewDraft','%s')",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),SourceName.c_str());
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
updateActive();
commitCommand();
}
bool CmdTechDrawDraftView::isActive(void)
{
return (getActiveGuiDocument() ? true : false);
}
//=========================================================================== //===========================================================================
// TechDraw_ExportPage // TechDraw_ExportPage
@ -801,4 +863,5 @@ void CreateTechDrawCommands(void)
rcCmdMgr.addCommand(new CmdTechDrawClipMinus()); rcCmdMgr.addCommand(new CmdTechDrawClipMinus());
rcCmdMgr.addCommand(new CmdTechDrawSymbol()); rcCmdMgr.addCommand(new CmdTechDrawSymbol());
rcCmdMgr.addCommand(new CmdTechDrawExportPage()); rcCmdMgr.addCommand(new CmdTechDrawExportPage());
rcCmdMgr.addCommand(new CmdTechDrawDraftView());
} }

View File

@ -61,7 +61,7 @@ QGIViewSymbol::QGIViewSymbol(const QPoint &pos, QGraphicsScene *scene) :QGIView(
QGIViewSymbol::~QGIViewSymbol() QGIViewSymbol::~QGIViewSymbol()
{ {
// m_svgItem belongs to this group and will be deleted by Qt // m_svgItem belongs to this group and will be deleted by Qt
delete(m_svgRender); delete(m_svgRender);
} }
@ -89,7 +89,7 @@ void QGIViewSymbol::updateView(bool update)
viewSymbol->Symbol.isTouched()) { viewSymbol->Symbol.isTouched()) {
draw(); draw();
} }
if (viewSymbol->Scale.isTouched()) { if (viewSymbol->Scale.isTouched()) {
setScale(viewSymbol->Scale.getValue()); setScale(viewSymbol->Scale.getValue());
draw(); draw();
@ -114,6 +114,9 @@ void QGIViewSymbol::drawSvg()
TechDraw::DrawViewSymbol *viewSymbol = dynamic_cast<TechDraw::DrawViewSymbol *>(getViewObject()); TechDraw::DrawViewSymbol *viewSymbol = dynamic_cast<TechDraw::DrawViewSymbol *>(getViewObject());
QString qs(QString::fromUtf8(viewSymbol->Symbol.getValue())); QString qs(QString::fromUtf8(viewSymbol->Symbol.getValue()));
if (qs.isEmpty()) {
return;
}
QByteArray qba; QByteArray qba;
qba.append(qs); qba.append(qs);
if (!load(&qba)) { if (!load(&qba)) {
@ -135,4 +138,3 @@ bool QGIViewSymbol::load(QByteArray *svgBytes)
} }
#include "moc_QGIViewSymbol.cpp" #include "moc_QGIViewSymbol.cpp"

View File

@ -48,5 +48,6 @@
<file>icons/ProjRight.svg</file> <file>icons/ProjRight.svg</file>
<file>icons/ProjTop.svg</file> <file>icons/ProjTop.svg</file>
<file>icons/actions/techdraw-projgroup.svg</file> <file>icons/actions/techdraw-projgroup.svg</file>
<file>icons/actions/drawing-draft-view.svg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -0,0 +1,540 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48.000000px"
height="48.000000px"
id="svg249"
sodipodi:version="0.32"
inkscape:version="0.48.5 r10040"
sodipodi:docname="drawing-draft-view.svg"
inkscape:export-filename="/home/jimmac/gfx/novell/pdes/trunk/docs/BIGmime-text.png"
inkscape:export-xdpi="240.00000"
inkscape:export-ydpi="240.00000"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs3">
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient5031"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
inkscape:collect="always"
id="linearGradient5060">
<stop
style="stop-color:black;stop-opacity:1;"
offset="0"
id="stop5062" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5064" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient5029"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
id="linearGradient5048">
<stop
style="stop-color:black;stop-opacity:0;"
offset="0"
id="stop5050" />
<stop
id="stop5056"
offset="0.5"
style="stop-color:black;stop-opacity:1;" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5052" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5048"
id="linearGradient5027"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
x1="302.85715"
y1="366.64789"
x2="302.85715"
y2="609.50507" />
<linearGradient
inkscape:collect="always"
id="linearGradient4542">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4544" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4546" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4542"
id="radialGradient4548"
cx="24.306795"
cy="42.07798"
fx="24.306795"
fy="42.07798"
r="15.821514"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.284916,-6.310056e-16,30.08928)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient15662">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop15664" />
<stop
style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop15666" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
fy="64.5679"
fx="20.8921"
r="5.257"
cy="64.5679"
cx="20.8921"
id="aigrd3">
<stop
id="stop15573"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop15575"
style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
offset="1.0000000" />
</radialGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
fy="114.5684"
fx="20.8921"
r="5.256"
cy="114.5684"
cx="20.8921"
id="aigrd2">
<stop
id="stop15566"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop15568"
style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
offset="1.0000000" />
</radialGradient>
<linearGradient
id="linearGradient269">
<stop
style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop270" />
<stop
style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop271" />
</linearGradient>
<linearGradient
id="linearGradient259">
<stop
style="stop-color:#fafafa;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop260" />
<stop
style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop261" />
</linearGradient>
<linearGradient
id="linearGradient12512">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop12513" />
<stop
style="stop-color:#fff520;stop-opacity:0.89108908;"
offset="0.50000000"
id="stop12517" />
<stop
style="stop-color:#fff300;stop-opacity:0.0000000;"
offset="1.0000000"
id="stop12514" />
</linearGradient>
<radialGradient
r="37.751713"
fy="3.7561285"
fx="8.8244190"
cy="3.7561285"
cx="8.8244190"
gradientTransform="matrix(0.968273,0,0,1.032767,3.4281936,-47.492271)"
gradientUnits="userSpaceOnUse"
id="radialGradient15656"
xlink:href="#linearGradient269"
inkscape:collect="always" />
<radialGradient
r="86.708450"
fy="35.736916"
fx="33.966679"
cy="35.736916"
cx="33.966679"
gradientTransform="matrix(0.960493,0,0,1.041132,7.4640626e-2,-48.138718)"
gradientUnits="userSpaceOnUse"
id="radialGradient15658"
xlink:href="#linearGradient259"
inkscape:collect="always" />
<radialGradient
r="38.158695"
fy="7.2678967"
fx="8.1435566"
cy="7.2678967"
cx="8.1435566"
gradientTransform="matrix(0.968273,0,0,1.032767,3.4281936,-47.492271)"
gradientUnits="userSpaceOnUse"
id="radialGradient15668"
xlink:href="#linearGradient15662"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#aigrd2"
id="radialGradient2283"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.229703,0,0,0.229703,4.613529,3.979808)"
cx="20.8921"
cy="114.5684"
fx="20.8921"
fy="114.5684"
r="5.256" />
<radialGradient
inkscape:collect="always"
xlink:href="#aigrd3"
id="radialGradient2285"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.229703,0,0,0.229703,4.613529,3.979808)"
cx="20.8921"
cy="64.5679"
fx="20.8921"
fy="64.5679"
r="5.257" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-76"
id="linearGradient4343"
gradientUnits="userSpaceOnUse"
x1="18.971846"
y1="14.452502"
x2="44.524982"
y2="41.792759" />
<linearGradient
id="linearGradient3377-76">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop3379-5" />
<stop
id="stop4345"
offset="0.5"
style="stop-color:#fcb915;stop-opacity:1;" />
<stop
style="stop-color:#c68708;stop-opacity:1;"
offset="1"
id="stop3381-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-76"
id="linearGradient4349"
x1="145.64697"
y1="79.160103"
x2="175.6825"
y2="108.75008"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient4482">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop4484" />
<stop
id="stop4486"
offset="0.5"
style="stop-color:#fcb915;stop-opacity:1;" />
<stop
style="stop-color:#c68708;stop-opacity:1;"
offset="1"
id="stop4488" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient4351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)"
cx="135.38333"
cy="97.369568"
fx="135.38333"
fy="97.369568"
r="19.467436" />
<linearGradient
id="linearGradient3377">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop3379" />
<stop
style="stop-color:#ffaa00;stop-opacity:1;"
offset="1"
id="stop3381" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient4353"
gradientUnits="userSpaceOnUse"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436" />
<linearGradient
id="linearGradient4495">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop4497" />
<stop
style="stop-color:#ffaa00;stop-opacity:1;"
offset="1"
id="stop4499" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.32941176"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5095402"
inkscape:cx="29.652618"
inkscape:cy="10.228358"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1920"
inkscape:window-height="1053"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:showpageshadow="false"
inkscape:window-maximized="1" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Attribution" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Shadow"
id="layer6"
inkscape:groupmode="layer">
<g
style="display:inline"
id="g5022"
transform="matrix(2.165152e-2,0,0,1.485743e-2,43.0076,42.68539)">
<rect
y="-150.69685"
x="-1559.2523"
height="478.35718"
width="1339.6335"
id="rect4173"
style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:nodetypes="cccc"
id="path5058"
d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
id="path5018"
sodipodi:nodetypes="cccc" />
</g>
</g>
<g
id="layer1"
inkscape:label="Base"
inkscape:groupmode="layer"
style="display:inline">
<rect
ry="1.1490486"
y="-44.492271"
x="6.6781936"
height="40.920494"
width="34.875"
id="rect15391"
style="color:#000000;fill:url(#radialGradient15658);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
rx="1.1490486"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,0,0)" />
<rect
rx="0.14904857"
ry="0.14904857"
y="-43.554771"
x="7.7406945"
height="38.946384"
width="32.775887"
id="rect15660"
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,0,0)" />
<g
id="g2270"
transform="matrix(3.7443726e-4,0.9999999,-0.9999999,3.7443726e-4,48.176974,0.7030484)">
<g
transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"
id="g1440">
<radialGradient
gradientUnits="userSpaceOnUse"
fy="114.5684"
fx="20.892099"
r="5.256"
cy="114.5684"
cx="20.892099"
id="radialGradient1442">
<stop
id="stop1444"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop1446"
style="stop-color:#474747"
offset="1" />
</radialGradient>
<path
id="path1448"
d="M 23.428,113.07 C 23.428,115.043 21.828,116.642 19.855,116.642 C 17.881,116.642 16.282,115.042 16.282,113.07 C 16.282,111.096 17.882,109.497 19.855,109.497 C 21.828,109.497 23.428,111.097 23.428,113.07 z "
style="stroke:none" />
<radialGradient
gradientUnits="userSpaceOnUse"
fy="64.567902"
fx="20.892099"
r="5.257"
cy="64.567902"
cx="20.892099"
id="radialGradient1450">
<stop
id="stop1452"
style="stop-color:#F0F0F0"
offset="0" />
<stop
id="stop1454"
style="stop-color:#474747"
offset="1" />
</radialGradient>
<path
id="path1456"
d="M 23.428,63.07 C 23.428,65.043 21.828,66.643 19.855,66.643 C 17.881,66.643 16.282,65.043 16.282,63.07 C 16.282,61.096 17.882,59.497 19.855,59.497 C 21.828,59.497 23.428,61.097 23.428,63.07 z "
style="stroke:none" />
</g>
<path
id="path15570"
d="M 9.9950109,29.952326 C 9.9950109,30.40553 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.721078,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
<path
id="path15577"
d="M 9.9950109,18.467176 C 9.9950109,18.92038 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.92038 8.3535532,18.467176 C 8.3535532,18.013742 8.721078,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
</g>
<path
sodipodi:nodetypes="cc"
id="path15672"
d="M 42.648774,11.564395 L 4.7421847,11.578589"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.01754384" />
<path
sodipodi:nodetypes="cc"
id="path15674"
d="M 43.122908,12.558495 L 5.105198,12.57273"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.20467828" />
<g
id="g3480"
transform="matrix(0.45382451,0,0,0.45382451,49.204494,19.271122)">
<rect
y="9.0415182"
x="-84.655571"
height="33.166935"
width="38.227585"
id="rect3860"
style="color:#000000;fill:none;stroke:#0000ff;stroke-width:4.09571838;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
transform="matrix(1.0460284,0,0,1.0022975,-80.281275,-26.312235)"
d="m 48.363636,33.272728 c 0,10.041541 -8.140277,18.181818 -18.181818,18.181818 C 20.140277,51.454546 12,43.314269 12,33.272728 12,23.231187 20.140277,15.09091 30.181818,15.09091 c 10.041541,0 18.181818,8.140277 18.181818,18.181818 z"
sodipodi:ry="18.181818"
sodipodi:rx="18.181818"
sodipodi:cy="33.272728"
sodipodi:cx="30.181818"
id="path3862"
style="color:#000000;fill:none;stroke:#0000ff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="new"
style="display:inline" />
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -71,6 +71,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
*draw << "TechDraw_ClipPlus"; *draw << "TechDraw_ClipPlus";
*draw << "TechDraw_ClipMinus"; *draw << "TechDraw_ClipMinus";
*draw << "TechDraw_NewDimension"; *draw << "TechDraw_NewDimension";
*draw << "TechDraw_DraftView";
*draw << "TechDraw_ExportPage"; *draw << "TechDraw_ExportPage";
//*draw << "TechDraw_Open"; //*draw << "TechDraw_Open";
//*part << "TechDraw_NewA3Landscape"; //*part << "TechDraw_NewA3Landscape";
@ -96,6 +97,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
*views << "TechDraw_ProjGroup"; *views << "TechDraw_ProjGroup";
*views << "TechDraw_NewViewSection"; *views << "TechDraw_NewViewSection";
*views << "TechDraw_Annotation"; *views << "TechDraw_Annotation";
*views << "TechDraw_DraftView";
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root); Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
clips->setCommand("TechDraw Clips"); clips->setCommand("TechDraw Clips");
@ -139,6 +141,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
*views << "TechDraw_ProjGroup"; *views << "TechDraw_ProjGroup";
*views << "TechDraw_NewViewSection"; *views << "TechDraw_NewViewSection";
*views << "TechDraw_Annotation"; *views << "TechDraw_Annotation";
*views << "TechDraw_DraftView";
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root); Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
clips->setCommand("TechDraw Clips"); clips->setCommand("TechDraw Clips");