Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
wmayer 2012-05-18 01:25:44 +02:00
commit 034e3da92c
13 changed files with 974 additions and 3 deletions

View File

@ -48,6 +48,14 @@
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNull">
<Documentation>
<UserDocu>
isNull() -> Bool
returns True if the rotation equals the unity matrix
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Q" ReadOnly="false">
<Documentation>
<UserDocu>The rotation elements (as quaternion)</UserDocu>

View File

@ -144,6 +144,17 @@ PyObject* RotationPy::toEuler(PyObject * args)
return Py::new_reference_to(tuple);
}
PyObject* RotationPy::isNull(PyObject *args)
{
if (!PyArg_ParseTuple(args, ""))
return NULL;
Base::Rotation rot = * getRotationPtr();
Base::Rotation nullrot(0,0,0,1);
Base::Rotation nullrotinv(0,0,0,-1);
bool null = (rot == nullrot) | (rot == nullrotinv);
return Py_BuildValue("O", (null ? Py_True : Py_False));
}
Py::Tuple RotationPy::getQ(void) const
{
double q0, q1, q2, q3;

View File

@ -22,6 +22,7 @@
#include "FeatureViewPart.h"
#include "FeatureViewAnnotation.h"
#include "FeatureProjection.h"
#include "FeatureClip.h"
#include "PageGroup.h"
extern struct PyMethodDef Drawing_methods[];
@ -59,6 +60,7 @@ void DrawingExport initDrawing()
Drawing::FeatureViewPartPython ::init();
Drawing::FeatureViewPython ::init();
Drawing::FeatureViewAnnotation ::init();
Drawing::FeatureClip ::init();
}
} // extern "C"

View File

@ -29,6 +29,8 @@ SET(Features_SRCS
FeatureViewPart.h
FeatureViewAnnotation.cpp
FeatureViewAnnotation.h
FeatureClip.cpp
FeatureClip.h
PageGroup.cpp
PageGroup.h
)

View File

@ -0,0 +1,111 @@
/***************************************************************************
* Copyright (c) Yorik van Havre <yorik@uncreated.net> 2012 *
* *
* 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 <Base/Exception.h>
#include <Base/Console.h>
#include <Base/FileInfo.h>
#include <App/Application.h>
#include <boost/regex.hpp>
#include <iostream>
#include "FeatureClip.h"
#include "FeatureView.h"
using namespace Drawing;
using namespace std;
//===========================================================================
// FeaturePage
//===========================================================================
PROPERTY_SOURCE(Drawing::FeatureClip, App::DocumentObjectGroup)
FeatureClip::FeatureClip(void)
{
static const char *group = "Drawing view";
App::PropertyType hidden = (App::PropertyType)(App::Prop_Hidden);
ADD_PROPERTY_TYPE(ViewResult ,(""),group,hidden,"Resulting SVG view of this clip");
ADD_PROPERTY_TYPE(X ,(10),group,App::Prop_None ,"The left margin of the view area of this clip");
ADD_PROPERTY_TYPE(Y ,(10),group,App::Prop_None ,"The top margin of the view area of this clip");
ADD_PROPERTY_TYPE(Height ,(10),group,App::Prop_None ,"The height of the view area of this clip");
ADD_PROPERTY_TYPE(Width ,(10),group,App::Prop_None ,"The width of the view area of this clip");
ADD_PROPERTY_TYPE(ShowFrame ,(0),group,App::Prop_None,"Specifies if the clip frame appears on the page or not");
}
FeatureClip::~FeatureClip()
{
}
/// get called by the container when a Property was changed
void FeatureClip::onChanged(const App::Property* prop)
{
App::DocumentObjectGroup::onChanged(prop);
}
App::DocumentObjectExecReturn *FeatureClip::execute(void)
{
ostringstream svg;
// creating clip path
svg << "<clipPath id=\"" << Label.getValue() << "\">"
<< "<rect x=\"" << X.getValue() << "\""
<< " y=\"" << Y.getValue() << "\""
<< " width=\"" << Width.getValue() << "\""
<< " height=\"" << Height.getValue() << "\"/></clipPath>" << endl;
// show clip frame on the page if needed
if (ShowFrame.getValue()) {
svg << "<rect fill=\"None\" stroke=\"#ff0000\" stroke-width=\"1px\""
<< " x=\"" << X.getValue() << "\""
<< " y=\"" << Y.getValue() << "\""
<< " width=\"" << Width.getValue() << "\""
<< " height=\"" << Height.getValue() << "\"/>" << endl;
}
// create clipped group
svg << "<g clip-path=\"url(#" << Label.getValue() << ")\">" << endl;
// get through the children and collect all the views
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) {
Drawing::FeatureView *View = dynamic_cast<Drawing::FeatureView *>(*It);
svg << View->ViewResult.getValue() << endl;
}
}
// closing clipped group
svg << "</g>" << endl;
ViewResult.setValue(svg.str().c_str());
return App::DocumentObject::StdReturn;
}

View File

@ -0,0 +1,71 @@
/***************************************************************************
* Copyright (c) Yorik van Havre <yorik@uncreated.net> 2012 *
* *
* 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 _FeatureClip_h_
#define _FeatureClip_h_
#include <App/DocumentObjectGroup.h>
#include <App/PropertyStandard.h>
namespace Drawing
{
/** Base class of all View Features in the drawing module
*/
class DrawingExport FeatureClip: public App::DocumentObjectGroup
{
PROPERTY_HEADER(Drawing::FeatureClip);
public:
/// Constructor
FeatureClip(void);
virtual ~FeatureClip();
App::PropertyFloat X;
App::PropertyFloat Y;
App::PropertyFloat Width;
App::PropertyFloat Height;
App::PropertyBool ShowFrame;
App::PropertyString ViewResult;
/** @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 "DrawingGui::ViewProviderDrawingPage";
}
protected:
void onChanged(const App::Property* prop);
};
} //namespace Drawing
#endif

View File

@ -37,6 +37,7 @@
#include "FeaturePage.h"
#include "FeatureView.h"
#include "FeatureClip.h"
using namespace Drawing;
using namespace std;
@ -124,10 +125,14 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void)
// get through the children and collect all the views
const std::vector<App::DocumentObject*> &Grp = Group.getValues();
for (std::vector<App::DocumentObject*>::const_iterator It= Grp.begin();It!=Grp.end();++It) {
if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) {
if ( (*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId()) ) {
Drawing::FeatureView *View = dynamic_cast<Drawing::FeatureView *>(*It);
ofile << View->ViewResult.getValue();
ofile << tempendl << tempendl << tempendl;
} else if ( (*It)->getTypeId().isDerivedFrom(Drawing::FeatureClip::getClassTypeId()) ) {
Drawing::FeatureClip *Clip = dynamic_cast<Drawing::FeatureClip *>(*It);
ofile << Clip->ViewResult.getValue();
ofile << tempendl << tempendl << tempendl;
}
}
}

View File

@ -15,6 +15,8 @@ libDrawing_la_SOURCES=\
FeatureViewPart.h \
FeatureViewAnnotation.cpp \
FeatureViewAnnotation.h \
FeatureClip.cpp \
FeatureClip.h \
PageGroup.cpp \
PageGroup.h \
ProjectionAlgos.cpp \

View File

@ -366,9 +366,9 @@ CmdDrawingAnnotation::CmdDrawingAnnotation()
// seting the
sGroup = QT_TR_NOOP("Drawing");
sMenuText = QT_TR_NOOP("&Annotation");
sToolTipText = QT_TR_NOOP("Inserts an Annotation view in the active document");
sToolTipText = QT_TR_NOOP("Inserts an Annotation view in the active drawing");
sWhatsThis = "Drawing_Annotation";
sStatusTip = QT_TR_NOOP("Inserts an Annotation view in the active document");
sStatusTip = QT_TR_NOOP("Inserts an Annotation view in the active drawing");
sPixmap = "actions/drawing-annotation";
}
@ -398,6 +398,48 @@ bool CmdDrawingAnnotation::isActive(void)
return (getActiveGuiDocument() ? true : false);
}
//===========================================================================
// Drawing_Clip
//===========================================================================
DEF_STD_CMD_A(CmdDrawingClip);
CmdDrawingClip::CmdDrawingClip()
: Command("Drawing_Clip")
{
// seting the
sGroup = QT_TR_NOOP("Drawing");
sMenuText = QT_TR_NOOP("&Clip");
sToolTipText = QT_TR_NOOP("Inserts a clip group in the active drawing");
sWhatsThis = "Drawing_Annotation";
sStatusTip = QT_TR_NOOP("Inserts a clip group in the active drawing");
sPixmap = "actions/drawing-clip";
}
void CmdDrawingClip::activated(int iMsg)
{
std::vector<App::DocumentObject*> pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId());
if (pages.empty()){
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page to insert"),
QObject::tr("Create a page to insert."));
return;
}
std::string PageName = pages.front()->getNameInDocument();
std::string FeatName = getUniqueObjectName("Clip");
openCommand("Create Clip");
doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureClip','%s')",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
updateActive();
commitCommand();
}
bool CmdDrawingClip::isActive(void)
{
return (getActiveGuiDocument() ? true : false);
}
//===========================================================================
// Drawing_ExportPage
//===========================================================================
@ -495,6 +537,7 @@ void CreateDrawingCommands(void)
rcCmdMgr.addCommand(new CmdDrawingOrthoViews());
rcCmdMgr.addCommand(new CmdDrawingOpenBrowserView());
rcCmdMgr.addCommand(new CmdDrawingAnnotation());
rcCmdMgr.addCommand(new CmdDrawingClip());
rcCmdMgr.addCommand(new CmdDrawingExportPage());
rcCmdMgr.addCommand(new CmdDrawingProjectShape());
}

View File

@ -17,6 +17,7 @@
<file>icons/actions/drawing-orthoviews.svg</file>
<file>icons/actions/drawing-openbrowser.svg</file>
<file>icons/actions/drawing-annotation.svg</file>
<file>icons/actions/drawing-clip.svg</file>
<file>translations/Drawing_af.qm</file>
<file>translations/Drawing_de.qm</file>
<file>translations/Drawing_es.qm</file>

View File

@ -21,6 +21,7 @@ EXTRA_DIST = \
icons/actions/drawing-orthoviews.svg \
icons/actions/drawing-openbrowser.svg \
icons/actions/drawing-annotation.svg \
icons/actions/drawing-clip.svg \
icons/Page.svg \
icons/Pages.svg \
icons/View.svg \

View File

@ -0,0 +1,710 @@
<?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="64px"
height="64px"
id="svg2985"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="drawing-annotation.svg">
<defs
id="defs2987">
<linearGradient
id="linearGradient3883">
<stop
style="stop-color:#ffb400;stop-opacity:1;"
offset="0"
id="stop3885" />
<stop
style="stop-color:#ffe900;stop-opacity:1;"
offset="1"
id="stop3887" />
</linearGradient>
<linearGradient
id="linearGradient3793">
<stop
style="stop-color:#000f8a;stop-opacity:1;"
offset="0"
id="stop3795" />
<stop
style="stop-color:#0066ff;stop-opacity:1;"
offset="1"
id="stop3797" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3793-2"
id="linearGradient3799-8"
x1="12.037806"
y1="54.001419"
x2="52.882648"
y2="9.274148"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3793-2">
<stop
style="stop-color:#000f8a;stop-opacity:1;"
offset="0"
id="stop3795-6" />
<stop
style="stop-color:#0066ff;stop-opacity:1;"
offset="1"
id="stop3797-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3883-6"
id="linearGradient3889-4"
x1="3"
y1="31.671875"
x2="59.25"
y2="31.671875"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.2727273,-0.18181818)" />
<linearGradient
id="linearGradient3883-6">
<stop
style="stop-color:#ffb400;stop-opacity:1;"
offset="0"
id="stop3885-4" />
<stop
style="stop-color:#ffe900;stop-opacity:1;"
offset="1"
id="stop3887-5" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526127,0,0,0.7540853,-19.699324,101.21241)"
r="225.89062"
fy="655.5625"
fx="374.42188"
cy="655.5625"
cx="374.42188"
id="radialGradient4475"
xlink:href="#linearGradient3533"
inkscape:collect="always" />
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(1.131046,0,0,0.5900932,-22.100471,489.57569)"
gradientUnits="userSpaceOnUse"
id="radialGradient4466"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,282.3446)"
gradientUnits="userSpaceOnUse"
id="radialGradient4429"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2871291,0,0,0.588703,-103.70783,273.98098)"
r="143.60872"
fy="641.82562"
fx="361.18896"
cy="641.82562"
cx="361.18896"
id="radialGradient3539"
xlink:href="#linearGradient3533"
inkscape:collect="always" />
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)"
gradientUnits="userSpaceOnUse"
id="radialGradient3979"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
r="141.81195"
fy="249.47238"
fx="317.86237"
cy="249.47238"
cx="317.86237"
spreadMethod="reflect"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
gradientUnits="userSpaceOnUse"
id="radialGradient3976"
xlink:href="#linearGradient6692"
inkscape:collect="always" />
<radialGradient
r="130.08176"
fy="309.10764"
fx="298.66852"
cy="309.10764"
cx="298.66852"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)"
gradientUnits="userSpaceOnUse"
id="radialGradient3969"
xlink:href="#linearGradient3351"
inkscape:collect="always" />
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)"
gradientUnits="userSpaceOnUse"
id="radialGradient3813"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
r="141.81195"
fy="249.47238"
fx="317.86237"
cy="249.47238"
cx="317.86237"
spreadMethod="reflect"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
gradientUnits="userSpaceOnUse"
id="radialGradient3732"
xlink:href="#linearGradient6692"
inkscape:collect="always" />
<radialGradient
r="130.08176"
fy="314.29395"
fx="290.86432"
cy="314.29395"
cx="290.86432"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-127.41403,-8.614628)"
gradientUnits="userSpaceOnUse"
id="radialGradient3686"
xlink:href="#linearGradient3351"
inkscape:collect="always" />
<radialGradient
r="130.08176"
fy="314.29395"
fx="290.86432"
cy="314.29395"
cx="290.86432"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)"
gradientUnits="userSpaceOnUse"
id="radialGradient3396"
xlink:href="#linearGradient3351"
inkscape:collect="always" />
<radialGradient
r="141.81195"
fy="249.47238"
fx="317.86237"
cy="249.47238"
cx="317.86237"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)"
gradientUnits="userSpaceOnUse"
id="radialGradient3394"
xlink:href="#linearGradient6692"
inkscape:collect="always" />
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)"
gradientUnits="userSpaceOnUse"
id="radialGradient3392"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
r="179.50987"
fy="365.75668"
fx="318.06638"
cy="365.75668"
cx="318.06638"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)"
gradientUnits="userSpaceOnUse"
id="radialGradient3385"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<radialGradient
r="179.38509"
fy="244.68217"
fx="333.362"
cy="244.68217"
cx="333.362"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)"
gradientUnits="userSpaceOnUse"
id="radialGradient3383"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<radialGradient
r="179.50987"
fy="365.75668"
fx="318.06638"
cy="365.75668"
cx="318.06638"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)"
gradientUnits="userSpaceOnUse"
id="radialGradient3377"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<radialGradient
r="179.38509"
fy="244.68217"
fx="333.362"
cy="244.68217"
cx="333.362"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)"
gradientUnits="userSpaceOnUse"
id="radialGradient3375"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<radialGradient
r="141.81195"
fy="249.47238"
fx="317.86237"
cy="249.47238"
cx="317.86237"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-0.1554987,-133.93797)"
gradientUnits="userSpaceOnUse"
id="radialGradient3373"
xlink:href="#linearGradient6692"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)"
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
id="radialGradient3361"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)"
r="130.08176"
fy="314.29395"
fx="290.86432"
cy="314.29395"
cx="290.86432"
id="radialGradient3357"
xlink:href="#linearGradient3351"
inkscape:collect="always" />
<radialGradient
r="179.50987"
fy="365.75668"
fx="318.06638"
cy="365.75668"
cx="318.06638"
gradientTransform="matrix(1.0565445,0,0,0.5956187,10.2201,263.97431)"
gradientUnits="userSpaceOnUse"
id="radialGradient2337"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<linearGradient
id="linearGradient4328">
<stop
id="stop4330"
offset="0"
style="stop-color:#398fe5;stop-opacity:1;" />
<stop
id="stop4332"
offset="1"
style="stop-color:#0066cc;stop-opacity:1" />
</linearGradient>
<radialGradient
r="179.38509"
fy="244.68217"
fx="333.362"
cy="244.68217"
cx="333.362"
gradientTransform="matrix(1.0565445,0,0,0.5952981,10.2201,208.24643)"
gradientUnits="userSpaceOnUse"
id="radialGradient2335"
xlink:href="#linearGradient4328"
inkscape:collect="always" />
<radialGradient
r="141.81195"
fy="249.47238"
fx="317.86237"
cy="249.47238"
cx="317.86237"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)"
gradientUnits="userSpaceOnUse"
id="radialGradient2331"
xlink:href="#linearGradient6692"
inkscape:collect="always" />
<linearGradient
id="linearGradient6692">
<stop
id="stop6694"
offset="0"
style="stop-color:#9bffbd;stop-opacity:1;" />
<stop
style="stop-color:#689e33;stop-opacity:1;"
offset="1"
id="stop6700" />
</linearGradient>
<linearGradient
id="linearGradient3364">
<stop
id="stop3366"
offset="0"
style="stop-color:#79a7fc;stop-opacity:1;" />
<stop
id="stop3368"
offset="1"
style="stop-color:#1d3340;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3351">
<stop
id="stop3353"
offset="0"
style="stop-color:#ffffff;stop-opacity:0.86734694;" />
<stop
id="stop3355"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<radialGradient
r="19.966738"
fy="578.88593"
fx="82.9272"
cy="578.88593"
cx="82.9272"
gradientTransform="matrix(7.6237907,4.4015976,-5.0675166,8.7771962,2328.4492,-5270.6109)"
gradientUnits="userSpaceOnUse"
id="radialGradient2333"
xlink:href="#linearGradient3364"
inkscape:collect="always" />
<linearGradient
id="linearGradient3615">
<stop
id="stop3619"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
style="stop-color:#398fe5;stop-opacity:1;"
offset="1"
id="stop3621" />
</linearGradient>
<linearGradient
id="linearGradient3624">
<stop
style="stop-color:#398fe5;stop-opacity:1;"
offset="0"
id="stop3628" />
<stop
id="stop3630"
offset="1"
style="stop-color:#acc1d5;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3533">
<stop
id="stop3535"
offset="0"
style="stop-color:#3a3a3a;stop-opacity:1;" />
<stop
id="stop3537"
offset="1"
style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364"
id="radialGradient3258"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3260"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3351"
id="radialGradient3262"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)"
cx="298.66852"
cy="309.10764"
fx="298.66852"
fy="309.10764"
r="130.08176" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364"
id="radialGradient3268"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3270"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3351"
id="radialGradient3272"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)"
cx="298.66852"
cy="309.10764"
fx="298.66852"
fy="309.10764"
r="130.08176" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3351"
id="radialGradient3275"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,23.62227,-368.49652)"
cx="298.66852"
cy="309.10764"
fx="298.66852"
fy="309.10764"
r="130.08176" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3278"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364"
id="radialGradient3281"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3284"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3287"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient3290"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364-1"
id="radialGradient3281-8"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<linearGradient
id="linearGradient3364-1">
<stop
id="stop3366-0"
offset="0"
style="stop-color:#79a7fc;stop-opacity:1;" />
<stop
id="stop3368-2"
offset="1"
style="stop-color:#1d3340;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="149.30214"
fy="315.40961"
fx="298.10294"
cy="315.40961"
cx="298.10294"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-24.327872,-29.478297)"
gradientUnits="userSpaceOnUse"
id="radialGradient4075"
xlink:href="#linearGradient3364-1"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364-7"
id="radialGradient3281-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<linearGradient
id="linearGradient3364-7">
<stop
id="stop3366-6"
offset="0"
style="stop-color:#79a7fc;stop-opacity:1;" />
<stop
id="stop3368-3"
offset="1"
style="stop-color:#1d3340;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3364"
id="radialGradient4158"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)"
cx="298.10294"
cy="315.40961"
fx="298.10294"
fy="315.40961"
r="149.30214" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6692"
id="radialGradient4160"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect"
cx="317.86237"
cy="249.47238"
fx="317.86237"
fy="249.47238"
r="141.81195" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.375"
inkscape:cx="98.437049"
inkscape:cy="0.4128939"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1280"
inkscape:window-height="755"
inkscape:window-x="0"
inkscape:window-y="22"
inkscape:window-maximized="1" />
<metadata
id="metadata2990">
<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>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g4153">
<path
inkscape:connector-curvature="0"
id="rect3005-1"
d="m 6.208006,14.025321 0,41.67663 45.365638,0 11.036532,-8.201181 0,-33.475449 -56.40217,0 z"
style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.95121026000000009;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;opacity:0.54166667" />
<path
inkscape:connector-curvature="0"
id="rect3005"
d="m 3.0693551,10.163105 0,41.676631 45.3656379,0 11.036532,-8.201181 0,-33.47545 -56.4021699,0 z"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#3f3f3f;stroke-width:1.95121026;stroke-linecap:butt;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
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3778"
d="m 59.296915,43.948975 c 0.160894,-1.443027 -0.62697,-3.44837 -4.966718,-4.52326 0,0 -1.330371,7.361384 -5.232791,11.884644 z"
style="color:#000000;fill:#b4b4b4;fill-opacity:1;fill-rule:evenodd;stroke:#3f3f3f;stroke-width:1.95121026;stroke-linecap:butt;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" />
</g>
<g
id="layer2"
inkscape:label="layer2"
transform="translate(-562.78983,-342.8385)" />
<rect
style="color:#000000;fill:#ffa3a3;stroke:#ff0000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 4;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;fill-opacity:1"
id="rect3236"
width="35.963303"
height="27.40196"
x="7.4952588"
y="16.845205" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -63,6 +63,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
*part << "Drawing_OrthoViews";
*part << "Drawing_OpenBrowserView";
*part << "Drawing_Annotation";
*part << "Drawing_Clip";
*part << "Drawing_ExportPage";
return root;
@ -80,6 +81,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
*part << "Drawing_OrthoViews";
*part << "Drawing_OpenBrowserView";
*part << "Drawing_Annotation";
*part << "Drawing_Clip";
*part << "Drawing_ExportPage";
return root;
}
@ -97,6 +99,8 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
*img << "Drawing_NewPage";
*img << "Drawing_OrthoViews";
*img << "Drawing_OpenBrowserView";
*img << "Drawing_Annotation";
*img << "Drawing_Clip";
img = new Gui::ToolBarItem(root);
img->setCommand("Views");
*img << "Drawing_NewView";