Svg DrawViewSpreadsheet

This commit is contained in:
WandererFan 2016-05-04 15:15:49 -04:00 committed by wmayer
parent 898587454f
commit 665bea53cf
26 changed files with 2206 additions and 36 deletions

View File

@ -29,10 +29,10 @@
#include "DrawProjGroupItem.h"
#include "DrawProjGroup.h"
#include "DrawViewSymbol.h"
//#include "DrawProjection.h"
#include "DrawViewClip.h"
#include "DrawHatch.h"
#include "DrawViewDraft.h"
#include "DrawViewSpreadsheet.h"
extern struct PyMethodDef TechDraw_methods[];
@ -48,7 +48,6 @@ void TechDrawExport initTechDraw()
try {
Base::Interpreter().loadModule("Part");
Base::Interpreter().loadModule("Measure");
//Base::Interpreter().loadModule("Mesh");
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
@ -66,9 +65,9 @@ void TechDrawExport initTechDraw()
TechDraw::DrawView ::init();
TechDraw::DrawViewCollection ::init();
TechDraw::DrawViewPart ::init();
//TechDraw::DrawProjection ::init();
TechDraw::DrawViewAnnotation ::init();
TechDraw::DrawViewSymbol ::init();
TechDraw::DrawViewSpreadsheet ::init();
TechDraw::DrawViewSection ::init();
TechDraw::DrawViewDimension ::init();

View File

@ -22,7 +22,7 @@ link_directories(${OCC_LIBRARY_DIR})
set(TechDrawLIBS
Measure
Part
FreeCADApp
Spreadsheet
)
generate_from_xml(DrawPagePy)
@ -51,6 +51,8 @@ SET(Draw_SRCS
DrawViewAnnotation.h
DrawViewSymbol.cpp
DrawViewSymbol.h
DrawViewSpreadsheet.cpp
DrawViewSpreadsheet.h
DrawViewClip.cpp
DrawViewClip.h
DrawProjGroup.cpp

View File

@ -25,6 +25,7 @@
#include <App/DocumentObject.h>
#include <App/PropertyStandard.h>
#include <App/PropertyGeo.h>
#include <App/FeaturePython.h>
namespace TechDraw

View File

@ -0,0 +1,330 @@
/***************************************************************************
* Copyright (c) Yorik van Havre (yorik@uncreated.net) 2015 *
* Copyright (c) 2016 WandererFan (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 <App/Application.h>
#include <App/Property.h>
#include <App/PropertyStandard.h>
#include <App/PropertyUnits.h>
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/FileInfo.h>
#include <Base/Parameter.h>
#include "DrawViewSpreadsheet.h"
#include <Mod/Spreadsheet/App/Cell.h>
#include <Mod/Spreadsheet/App/Sheet.h>
using namespace TechDraw;
using namespace std;
//===========================================================================
// DrawViewSpreadsheet
//===========================================================================
PROPERTY_SOURCE(TechDraw::DrawViewSpreadsheet, TechDraw::DrawViewSymbol)
DrawViewSpreadsheet::DrawViewSpreadsheet(void)
{
static const char *vgroup = "Spreadsheet";
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
ADD_PROPERTY_TYPE(Source ,(0),vgroup,App::Prop_None,"Spreadsheet to view");
ADD_PROPERTY_TYPE(CellStart ,("A1"),vgroup,App::Prop_None,"The top left cell of the range to display");
ADD_PROPERTY_TYPE(CellEnd ,("B2"),vgroup,App::Prop_None,"The bottom right cell of the range to display");
ADD_PROPERTY_TYPE(Font ,((fontName.c_str())),vgroup,App::Prop_None,"The name of the font to use");
ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The default color of the text and lines");
ADD_PROPERTY_TYPE(TextSize,(12.0),vgroup,App::Prop_None,"The size of the text");
ADD_PROPERTY_TYPE(LineWidth,(0.35),vgroup,App::Prop_None,"The thickness of the cell lines");
//ADD_PROPERTY_TYPE(Symbol,(""),vgroup,App::Prop_Hidden,"The SVG image of this spreadsheet");
EditableTexts.setStatus(App::Property::Hidden,true);
}
DrawViewSpreadsheet::~DrawViewSpreadsheet()
{
}
void DrawViewSpreadsheet::onChanged(const App::Property* prop)
{
if (!isRestoring()) {
if (prop == &Source ||
prop == &CellStart ||
prop == &CellEnd ||
prop == &Font ||
prop == &TextSize ||
prop == &TextColor ||
prop == &LineWidth) {
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
}
catch (...) {
}
}
}
TechDraw::DrawView::onChanged(prop);
}
App::DocumentObjectExecReturn *DrawViewSpreadsheet::execute(void)
{
App::DocumentObject* link = Source.getValue();
std::string scellstart = CellStart.getValue();
std::string scellend = CellEnd.getValue();
if (!link)
return new App::DocumentObjectExecReturn("No spreadsheet linked");
if (!link->getTypeId().isDerivedFrom(Spreadsheet::Sheet::getClassTypeId()))
return new App::DocumentObjectExecReturn("The linked object is not a spreadsheet");
if ( (scellstart.empty()) || (scellend.empty()) )
return new App::DocumentObjectExecReturn("Empty cell value");
Symbol.setValue(getSheetImage());
return TechDraw::DrawView::execute();
}
std::vector<std::string> DrawViewSpreadsheet::getAvailColumns(void)
{
// build a list of available colums: A, B, C, ... AA, AB, ... ZY, ZZ.
std::string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
std::vector<std::string> availcolumns;
for (int i=0; i<26; ++i) {
std::stringstream s;
s << alphabet[i];
availcolumns.push_back(s.str());
}
for (int i=0; i<26; ++i) {
for (int j=0; i<26; ++i) {
std::stringstream s;
s << alphabet[i] << alphabet[j];
availcolumns.push_back(s.str());
}
}
return availcolumns;
}
//note: newlines need to be double escaped for python, but single for C++
std::string DrawViewSpreadsheet::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 DrawViewSpreadsheet::getSVGTail(void)
{
std::string tail = "\n</svg>";
return tail;
}
std::string DrawViewSpreadsheet::getSheetImage(void)
{
std::stringstream result;
App::DocumentObject* link = Source.getValue();
std::string scellstart = CellStart.getValue();
std::string scellend = CellEnd.getValue();
std::vector<std::string> availcolumns = getAvailColumns();
// build rows range and columns range
std::vector<std::string> columns;
std::vector<int> rows;
try {
for (unsigned int i=0; i<scellstart.length(); ++i) {
if (isdigit(scellstart[i])) {
columns.push_back(scellstart.substr(0,i));
rows.push_back(std::atoi(scellstart.substr(i,scellstart.length()-1).c_str()));
}
}
for (unsigned int i=0; i<scellend.length(); ++i) {
if (isdigit(scellend[i])) {
std::string startcol = columns.back();
std::string endcol = scellend.substr(0,i);
bool valid = false;
for (std::vector<std::string>::const_iterator j = availcolumns.begin(); j != availcolumns.end(); ++j) {
if ( (*j) == startcol) {
if ( (*j) != endcol) {
valid = true;
}
} else {
if (valid) {
if ( (*j) == endcol) {
columns.push_back((*j));
valid = false;
} else {
columns.push_back((*j));
}
}
}
}
int endrow = std::atoi(scellend.substr(i,scellend.length()-1).c_str());
for (int j=rows.back()+1; j<=endrow; ++j) {
rows.push_back(j);
}
}
}
} catch (std::exception) {
Base::Console().Error("Invalid cell range for %s\n",getNameInDocument());
return result.str();
}
// create the containing group
std::string ViewName = Label.getValue();
result << getSVGHead();
App::Color c = TextColor.getValue();
result << "<g id=\"" << ViewName << "\">" << endl;
// fill the cells
float rowoffset = 0.0;
float coloffset = 0.0;
float cellheight = 100;
float cellwidth = 100;
std::string celltext;
Spreadsheet::Sheet* sheet = static_cast<Spreadsheet::Sheet*>(link);
std::vector<std::string> skiplist;
for (std::vector<std::string>::const_iterator col = columns.begin(); col != columns.end(); ++col) {
// create a group for each column
result << " <g id=\"" << ViewName << "_col" << (*col) << "\">" << endl;
for (std::vector<int>::const_iterator row = rows.begin(); row != rows.end(); ++row) {
// get cell size
std::stringstream srow;
srow << (*row);
App::CellAddress address((*col) + srow.str());
cellwidth = sheet->getColumnWidth(address.col());
cellheight = sheet->getRowHeight(address.row());
celltext = "";
// get the text
App::Property* prop = sheet->getPropertyByName(address.toString().c_str());
std::stringstream field;
if (prop != 0) {
if (prop->isDerivedFrom((App::PropertyQuantity::getClassTypeId())))
field << static_cast<App::PropertyQuantity*>(prop)->getValue();
else if (prop->isDerivedFrom((App::PropertyFloat::getClassTypeId())))
field << static_cast<App::PropertyFloat*>(prop)->getValue();
else if (prop->isDerivedFrom((App::PropertyString::getClassTypeId())))
field << static_cast<App::PropertyString*>(prop)->getValue();
else
assert(0);
celltext = field.str();
}
// get colors, style, alignment and span
int alignment;
std::string bcolor = "none";
std::string fcolor = c.asCSSString();
std::string textstyle = "";
Spreadsheet::Cell* cell = sheet->getCell(address);
if (cell) {
App::Color f,b;
std::set<std::string> st;
int colspan, rowspan;
if (cell->getBackground(b)) {
bcolor = b.asCSSString();
}
if (cell->getForeground(f)) {
fcolor = f.asCSSString();
}
if (cell->getStyle(st)) {
for (std::set<std::string>::const_iterator i = st.begin(); i != st.end(); ++i) {
if ((*i) == "bold")
textstyle = textstyle + "font-weight: bold; ";
else if ((*i) == "italic")
textstyle = textstyle + "font-style: italic; ";
else if ((*i) == "underline")
textstyle = textstyle + "text-decoration: underline; ";
}
}
if (cell->getSpans(rowspan,colspan)) {
for (int i=0; i<colspan; ++i) {
for (int j=0; j<rowspan; ++j) {
App::CellAddress nextcell(address.row()+j,address.col()+i);
if (i > 0)
cellwidth = cellwidth + sheet->getColumnWidth(nextcell.col());
if (j > 0)
cellheight = cellheight + sheet->getRowHeight(nextcell.row());
if ( (i > 0) || (j > 0) )
skiplist.push_back(nextcell.toString());
}
}
}
cell->getAlignment(alignment);
}
// skip cell if found in skiplist
if (std::find(skiplist.begin(), skiplist.end(), address.toString()) == skiplist.end()) {
result << " <rect x=\"" << coloffset << "\" y=\"" << rowoffset << "\" width=\"" << cellwidth
<< "\" height=\"" << cellheight << "\" style=\"fill:" << bcolor << ";stroke-width:"
<< LineWidth.getValue()/Scale.getValue() << ";stroke:" << c.asCSSString() << ";\" />" << endl;
if (alignment & Spreadsheet::Cell::ALIGNMENT_LEFT)
result << " <text style=\"" << textstyle << "\" x=\"" << coloffset + TextSize.getValue()/2 << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
if (alignment & Spreadsheet::Cell::ALIGNMENT_HCENTER)
result << " <text text-anchor=\"middle\" style=\"" << textstyle << "\" x=\"" << coloffset + cellwidth/2 << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
if (alignment & Spreadsheet::Cell::ALIGNMENT_RIGHT)
result << " <text text-anchor=\"end\" style=\"" << textstyle << "\" x=\"" << coloffset + (cellwidth - TextSize.getValue()/2) << "\" y=\"" << rowoffset + 0.75 * cellheight << "\" font-family=\"" ;
result << Font.getValue() << "\"" << " font-size=\"" << TextSize.getValue() << "\""
<< " fill=\"" << fcolor << "\">" << celltext << "</text>" << endl;
}
rowoffset = rowoffset + cellheight;
}
result << " </g>" << endl;
rowoffset = 0.0;
coloffset = coloffset + cellwidth;
}
// close the containing group
result << "</g>" << endl;
result << getSVGTail();
return result.str();
}
// Python Drawing feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(TechDraw::DrawViewSpreadsheetPython, TechDraw::DrawViewSpreadsheet)
template<> const char* TechDraw::DrawViewSpreadsheetPython::getViewProviderName(void) const {
return "TechDrawGui::ViewProviderSpreadsheet";
}
/// @endcond
// explicit template instantiation
template class TechDrawExport FeaturePythonT<TechDraw::DrawViewSpreadsheet>;
}

View File

@ -0,0 +1,80 @@
/***************************************************************************
* Copyright (c) 2016 WandererFan (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 _DrawViewSpreadsheet_h_
#define _DrawViewSpreadsheet_h_
#include <App/DocumentObject.h>
#include <App/PropertyLinks.h>
#include "App/PropertyStandard.h"
#include <App/PropertyGeo.h>
#include <App/FeaturePython.h>
#include "DrawViewSymbol.h"
namespace TechDraw
{
class TechDrawExport DrawViewSpreadsheet : public TechDraw::DrawViewSymbol
{
PROPERTY_HEADER(TechDraw::DrawViewSpreadsheet);
public:
DrawViewSpreadsheet(void);
virtual ~DrawViewSpreadsheet();
App::PropertyLink Source;
App::PropertyString CellStart;
App::PropertyString CellEnd;
App::PropertyString Font;
App::PropertyColor TextColor;
App::PropertyFloat LineWidth;
App::PropertyFloat TextSize;
virtual App::DocumentObjectExecReturn *execute(void);
std::string getSheetImage(void);
virtual const char* getViewProviderName(void) const {
return "TechDrawGui::ViewProviderSpreadsheet";
}
protected:
virtual void onChanged(const App::Property* prop);
std::vector<std::string> getAvailColumns(void);
std::string getSVGHead(void);
std::string getSVGTail(void);
private:
};
typedef App::FeaturePythonT<DrawViewSpreadsheet> DrawViewSpreadsheetPython;
} //namespace TechDraw
#endif

View File

@ -116,20 +116,6 @@ App::DocumentObjectExecReturn *DrawViewSymbol::execute(void)
svg = newsvg;
}
//TODO: shouldn't there be a Symbol.setValue(svg) here??? -wf
#if 0
std::stringstream result;
result << "<g transform=\"translate(" << X.getValue() << "," << Y.getValue() << ")"
<< " rotate(" << Rotation.getValue() << ")"
<< " scale(" << Scale.getValue() << ")\">" << endl
<< svg << endl
<< "</g>" << endl;
// Apply the resulting fragment
// no more ViewResult! Need to xlate SVG to Geometry object???
//ViewResult.setValue(result.str().c_str());
#endif
//return App::DocumentObject::StdReturn;
return DrawView::execute();
}

View File

@ -32,11 +32,13 @@
# define PartExport __declspec(dllimport)
# define MeasureExport __declspec(dllimport)
# define MeshExport __declspec(dllimport)
# define SpreadsheetExport __declspec(dllimport)
#else // for Linux
# define TechDrawExport
# define MeasureExport
# define PartExport
# define MeshExport
# define SpreadsheetExport
#endif
#ifdef _PreComp_
@ -235,4 +237,3 @@
#endif // _PreComp_
#endif

View File

@ -47,6 +47,7 @@
#include "ViewProviderSymbol.h"
#include "ViewProviderViewClip.h"
#include "ViewProviderHatch.h"
#include "ViewProviderSpreadsheet.h"
//#include "resources/qrc_TechDraw.cpp"
// use a different name to CreateCommand()
@ -103,6 +104,7 @@ void TechDrawGuiExport initTechDrawGui()
TechDrawGui::ViewProviderAnnotation::init();
TechDrawGui::ViewProviderSymbol::init();
TechDrawGui::ViewProviderHatch::init();
TechDrawGui::ViewProviderSpreadsheet::init();
// register preferences pages
new Gui::PrefPageProducer<TechDrawGui::DlgPrefsTechDrawImp> ("TechDraw");

View File

@ -39,6 +39,7 @@ set(TechDrawGui_MOC_HDRS
QGIViewSection.h
QGIViewAnnotation.h
QGIViewSymbol.h
QGIViewSpreadsheet.h
QGIViewClip.h
TaskProjGroup.h
DlgPrefsTechDrawImp.h
@ -123,6 +124,8 @@ SET(TechDrawGuiView_SRCS
QGIViewAnnotation.h
QGIViewSymbol.cpp
QGIViewSymbol.h
QGIViewSpreadsheet.cpp
QGIViewSpreadsheet.h
QGIViewClip.cpp
QGIViewClip.h
QGIHatch.cpp
@ -152,6 +155,8 @@ SET(TechDrawGuiViewProvider_SRCS
ViewProviderAnnotation.h
ViewProviderSymbol.cpp
ViewProviderSymbol.h
ViewProviderSpreadsheet.cpp
ViewProviderSpreadsheet.h
ViewProviderViewClip.cpp
ViewProviderViewClip.h
ViewProviderHatch.cpp

View File

@ -51,6 +51,7 @@
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Part/App/Part2DObject.h>
#include <Mod/Spreadsheet/App/Sheet.h>
#include <Mod/TechDraw/App/DrawPage.h>
#include <Mod/TechDraw/App/DrawViewPart.h>
@ -806,6 +807,54 @@ bool CmdTechDrawDraftView::isActive(void)
return hasActiveDocument();
}
//===========================================================================
// TechDraw_Spreadheet
//===========================================================================
DEF_STD_CMD_A(CmdTechDrawSpreadsheet);
CmdTechDrawSpreadsheet::CmdTechDrawSpreadsheet()
: Command("TechDraw_Spreadsheet")
{
// seting the
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Spreadsheet");
sToolTipText = QT_TR_NOOP("Inserts a view of a selected spreadsheet into a drawing");
sWhatsThis = "TechDraw_Spreadsheet";
sStatusTip = QT_TR_NOOP("Inserts a view of a selected spreadsheet into a drawing");
sPixmap = "actions/techdraw-spreadsheet";
}
void CmdTechDrawSpreadsheet::activated(int iMsg)
{
const std::vector<App::DocumentObject*> spreads = getSelection().getObjectsOfType(Spreadsheet::Sheet::getClassTypeId());
if (spreads.size() != 1) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select exactly one Spreadsheet object."));
return;
}
std::string SpreadName = spreads.front()->getNameInDocument();
TechDraw::DrawPage* page = _findPage(this);
if (!page) {
return;
}
std::string PageName = page->getNameInDocument();
openCommand("Create spreadsheet view");
std::string FeatName = getUniqueObjectName("Sheet");
doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawViewSpreadsheet','%s')",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),SpreadName.c_str());
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
updateActive();
commitCommand();
}
bool CmdTechDrawSpreadsheet::isActive(void)
{
return (getActiveGuiDocument() ? true : false);
}
//===========================================================================
// TechDraw_ExportPage
@ -867,4 +916,5 @@ void CreateTechDrawCommands(void)
rcCmdMgr.addCommand(new CmdTechDrawSymbol());
rcCmdMgr.addCommand(new CmdTechDrawExportPage());
rcCmdMgr.addCommand(new CmdTechDrawDraftView());
rcCmdMgr.addCommand(new CmdTechDrawSpreadsheet());
}

View File

@ -86,6 +86,7 @@
#include <Mod/TechDraw/App/DrawViewSymbol.h>
#include <Mod/TechDraw/App/DrawViewClip.h>
#include <Mod/TechDraw/App/DrawHatch.h>
#include "../App/DrawViewSpreadsheet.h"
#include "QGIDrawingTemplate.h"
#include "QGIView.h"
@ -332,6 +333,8 @@ int MDIViewPage::attachView(App::DocumentObject *obj)
} else if(obj->getTypeId().isDerivedFrom(TechDraw::DrawViewClip::getClassTypeId()) ) {
TechDraw::DrawViewClip *viewClip = dynamic_cast<TechDraw::DrawViewClip *>(obj);
qview = m_view->addDrawViewClip(viewClip);
} else if(obj->getTypeId().isDerivedFrom(TechDraw::DrawViewSpreadsheet::getClassTypeId()) ) {
qview = m_view->addDrawViewSpreadsheet( dynamic_cast<TechDraw::DrawViewSpreadsheet *>(obj) );
} else if(obj->getTypeId().isDerivedFrom(TechDraw::DrawHatch::getClassTypeId()) ) {
//Hatch is not attached like other Views (since it isn't really a View)
} else {

View File

@ -32,10 +32,12 @@
# define TechDrawExport __declspec(dllimport)
# define PartExport __declspec(dllimport)
# define TechDrawGuiExport __declspec(dllexport)
# define SpreadsheetExport __declspec(dllimport)
#else // for Linux
# define TechDrawExport
# define PartExport
# define TechDrawGuiExport
# define SpreadsheetExport
#endif
#ifdef _MSC_VER

View File

@ -87,7 +87,8 @@ QGIView::QGIView(const QPoint &pos, QGraphicsScene *scene)
m_font.setPointSize(5.0); //scene units (mm), not points
//Add object to scene
scene->addItem(this);
if(scene) // TODO: Get rid of the ctor args as in the refactor attempt
scene->addItem(this);
m_label = new QGraphicsTextItem();
addToGroup(m_label);
@ -99,10 +100,6 @@ QGIView::QGIView(const QPoint &pos, QGraphicsScene *scene)
m_decorPen.setWidth(0); // 0 => 1px "cosmetic pen"
}
QGIView::~QGIView()
{
}
void QGIView::alignTo(QGraphicsItem*item, const QString &alignment)
{
@ -357,6 +354,7 @@ void QGIView::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
QGraphicsItemGroup::paint(painter, &myOption, widget);
}
//This should count everything except Frame,Label,Dimension - custom or not
QRectF QGIView::customChildrenBoundingRect() {
QList<QGraphicsItem*> children = childItems();
int dimItemType = QGraphicsItem::UserType + 106;

View File

@ -45,7 +45,7 @@ class TechDrawGuiExport QGIView : public QObject, public QGraphicsItemGroup
public:
QGIView(const QPoint &position, QGraphicsScene *scene);
~QGIView();
virtual ~QGIView() = default;
enum {Type = QGraphicsItem::UserType + 101};
int type() const { return Type;}

View File

@ -0,0 +1,67 @@
/***************************************************************************
* Copyright (c) 2016 wandererfan <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 <cmath>
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QGraphicsSceneHoverEvent>
#include <QMenu>
#include <QMouseEvent>
#include <QString>
#include <sstream>
#endif
#include <qmath.h>
#include <App/Application.h>
#include <App/Material.h>
#include <Base/Console.h>
#include <Base/Parameter.h>
#include "../App/DrawView.h"
#include "../App/DrawViewSpreadsheet.h"
#include "QGIViewSpreadsheet.h"
using namespace TechDrawGui;
QGIViewSpreadsheet::QGIViewSpreadsheet() : QGIViewSymbol(QPoint(), nullptr)
{
setHandlesChildEvents(false);
setCacheMode(QGraphicsItem::NoCache);
setAcceptHoverEvents(true);
setFlag(QGraphicsItem::ItemIsMovable, true);
}
QGIViewSpreadsheet::~QGIViewSpreadsheet()
{
}
void QGIViewSpreadsheet::setViewFeature(TechDraw::DrawViewSpreadsheet *obj)
{
// called from QGVPage. (once)
QGIView::setViewFeature(static_cast<TechDraw::DrawView *>(obj));
}
#include "moc_QGIViewSpreadsheet.cpp"

View File

@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (c) 2016 wandererfan <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 DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
#define DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H
#include <QObject>
#include <QPainter>
#include <QString>
#include <QByteArray>
#include <QSvgRenderer>
#include <QGraphicsSvgItem>
#include "QGIViewSymbol.h"
#include "QGIView.h"
namespace TechDraw {
class DrawViewSpreadsheet;
}
namespace TechDrawGui
{
class TechDrawGuiExport QGIViewSpreadsheet : public QGIViewSymbol
{
Q_OBJECT
public:
explicit QGIViewSpreadsheet();
~QGIViewSpreadsheet();
enum {Type = QGraphicsItem::UserType + 124};
int type() const { return Type;}
//void updateView(bool update = false);
void setViewFeature(TechDraw::DrawViewSpreadsheet *obj);
protected:
//void drawSvg();
protected:
};
} // namespace MDIViewPageGui
#endif // DRAWINGGUI_QGRAPHICSITEMVIEWSPREADSHEET_H

View File

@ -114,13 +114,20 @@ void QGIViewSymbol::drawSvg()
TechDraw::DrawViewSymbol *viewSymbol = dynamic_cast<TechDraw::DrawViewSymbol *>(getViewObject());
QString qs(QString::fromUtf8(viewSymbol->Symbol.getValue()));
symbolToSvg(qs);
}
void QGIViewSymbol::symbolToSvg(QString qs)
{
if (qs.isEmpty()) {
return;
}
QByteArray qba;
qba.append(qs);
if (!load(&qba)) {
Base::Console().Error("QGIViewSymbol::drawSvg - Could not load %s.Symbol into renderer\n", viewSymbol->getNameInDocument());
Base::Console().Error("Error - Could not load Symbol into SVG renderer for %s\n", getViewObject()->getNameInDocument());
}
m_svgItem->setPos(0.,0.);
}

View File

@ -64,8 +64,8 @@ Q_SIGNALS:
protected:
bool load(QByteArray *svgString);
void drawSvg();
virtual void drawSvg();
void symbolToSvg(QString qs);
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
QGCustomSvg *m_svgItem;

View File

@ -57,6 +57,7 @@
#include <Mod/TechDraw/App/DrawViewSymbol.h>
#include <Mod/TechDraw/App/DrawViewClip.h>
#include "../App/DrawHatch.h"
#include "../App/DrawViewSpreadsheet.h"
#include "QGIDrawingTemplate.h"
@ -69,6 +70,7 @@
#include "QGIViewAnnotation.h"
#include "QGIViewSymbol.h"
#include "QGIViewClip.h"
#include "QGIViewSpreadsheet.h"
#include "ZVALUE.h"
#include "QGVPage.h"
@ -256,6 +258,16 @@ QGIView * QGVPage::addDrawViewClip(TechDraw::DrawViewClip *view)
return qview;
}
QGIView * QGVPage::addDrawViewSpreadsheet(TechDraw::DrawViewSpreadsheet *view)
{
QGIViewSpreadsheet *qview(new QGIViewSpreadsheet);
qview->setViewFeature(view);
addView(qview);
return qview;
}
QGIView * QGVPage::addViewDimension(TechDraw::DrawViewDimension *dim)
{
QGIViewDimension *dimGroup = new QGIViewDimension(QPoint(0,0), scene());

View File

@ -38,6 +38,7 @@ class DrawViewSymbol;
class DrawViewClip;
class DrawHatch;
class DrawViewCollection;
class DrawViewSpreadsheet;
}
namespace TechDrawGui
@ -69,6 +70,7 @@ public:
QGIView * addDrawViewAnnotation(TechDraw::DrawViewAnnotation *view);
QGIView * addDrawViewSymbol(TechDraw::DrawViewSymbol *view);
QGIView * addDrawViewClip(TechDraw::DrawViewClip *view);
QGIView * addDrawViewSpreadsheet(TechDraw::DrawViewSpreadsheet *view);
QGIView * findView(App::DocumentObject *obj) const;
QGIView * findParent(QGIView *) const;

View File

@ -6,6 +6,7 @@
<file>icons/TechDraw_Tree_PageTemplate.svg</file>
<file>icons/TechDraw_Tree_ProjGroup.svg</file>
<file>icons/TechDraw_Tree_Section.svg</file>
<file>icons/TechDraw_Tree_Spreadsheet.svg</file>
<file>icons/TechDraw_Tree_Symbol.svg</file>
<file>icons/TechDraw_Tree_View.svg</file>
<file>icons/TechDraw_Pages.svg</file>
@ -42,5 +43,6 @@
<file>icons/actions/techdraw-hatch.svg</file>
<file>icons/actions/techdraw-toggleframe.svg</file>
<file>icons/actions/techdraw-projgroup.svg</file>
<file>icons/actions/techdraw-spreadsheet.svg</file>
</qresource>
</RCC>

View File

@ -0,0 +1,704 @@
<?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"
version="1.1"
width="64"
height="64"
id="svg2985">
<defs
id="defs2987">
<linearGradient
id="linearGradient3883">
<stop
id="stop3885"
style="stop-color:#ffb400;stop-opacity:1"
offset="0" />
<stop
id="stop3887"
style="stop-color:#ffe900;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3793">
<stop
id="stop3795"
style="stop-color:#000f8a;stop-opacity:1"
offset="0" />
<stop
id="stop3797"
style="stop-color:#0066ff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="12.037806"
y1="54.001419"
x2="52.882648"
y2="9.274148"
id="linearGradient3799-8"
xlink:href="#linearGradient3793-2"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3793-2">
<stop
id="stop3795-6"
style="stop-color:#000f8a;stop-opacity:1"
offset="0" />
<stop
id="stop3797-0"
style="stop-color:#0066ff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="3"
y1="31.671875"
x2="59.25"
y2="31.671875"
id="linearGradient3889-4"
xlink:href="#linearGradient3883-6"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.2727273,-0.18181818)" />
<linearGradient
id="linearGradient3883-6">
<stop
id="stop3885-4"
style="stop-color:#ffb400;stop-opacity:1"
offset="0" />
<stop
id="stop3887-5"
style="stop-color:#ffe900;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="374.42188"
cy="655.5625"
r="225.89062"
fx="374.42188"
fy="655.5625"
id="radialGradient4475"
xlink:href="#linearGradient3533"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526127,0,0,0.7540853,-19.699324,101.21241)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4466"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,0.5900932,-22.100471,489.57569)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4429"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,282.3446)" />
<radialGradient
cx="361.18896"
cy="641.82562"
r="143.60872"
fx="361.18896"
fy="641.82562"
id="radialGradient3539"
xlink:href="#linearGradient3533"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2871291,0,0,0.588703,-103.70783,273.98098)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3979"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3976"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3969"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3813"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3732"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3686"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-127.41403,-8.614628)" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3396"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3394"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3392"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient3385"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)" />
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient3383"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient3377"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)" />
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient3375"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3373"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-0.1554987,-133.93797)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3361"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3357"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient2337"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,10.2201,263.97431)" />
<linearGradient
id="linearGradient4328">
<stop
id="stop4330"
style="stop-color:#398fe5;stop-opacity:1"
offset="0" />
<stop
id="stop4332"
style="stop-color:#0066cc;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient2335"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,10.2201,208.24643)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient2331"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)" />
<linearGradient
id="linearGradient6692">
<stop
id="stop6694"
style="stop-color:#9bffbd;stop-opacity:1"
offset="0" />
<stop
id="stop6700"
style="stop-color:#689e33;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3364">
<stop
id="stop3366"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3351">
<stop
id="stop3353"
style="stop-color:#ffffff;stop-opacity:0.86734694"
offset="0" />
<stop
id="stop3355"
style="stop-color:#ffffff;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="82.9272"
cy="578.88593"
r="19.966738"
fx="82.9272"
fy="578.88593"
id="radialGradient2333"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(7.6237907,4.4015976,-5.0675166,8.7771962,2328.4492,-5270.6109)" />
<linearGradient
id="linearGradient3615">
<stop
id="stop3619"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3621"
style="stop-color:#398fe5;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3624">
<stop
id="stop3628"
style="stop-color:#398fe5;stop-opacity:1"
offset="0" />
<stop
id="stop3630"
style="stop-color:#acc1d5;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3533">
<stop
id="stop3535"
style="stop-color:#3a3a3a;stop-opacity:1"
offset="0" />
<stop
id="stop3537"
style="stop-color:#ffffff;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3258"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3260"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3262"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3268"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3270"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3272"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3275"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,23.62227,-368.49652)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3278"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3284"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3287"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3290"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281-8"
xlink:href="#linearGradient3364-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<linearGradient
id="linearGradient3364-1">
<stop
id="stop3366-0"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368-2"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4075"
xlink:href="#linearGradient3364-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-24.327872,-29.478297)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281-0"
xlink:href="#linearGradient3364-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<linearGradient
id="linearGradient3364-7">
<stop
id="stop3366-6"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368-3"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4158"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient4160"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect" />
<radialGradient
cx="45.883327"
cy="28.869568"
r="19.467436"
fx="45.883327"
fy="28.869568"
id="radialGradient3692"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="135.38333"
cy="97.369568"
r="19.467436"
fx="135.38333"
fy="97.369568"
id="radialGradient3703"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
style="stop-color:#faff2b;stop-opacity:1"
offset="0" />
<stop
id="stop3381"
style="stop-color:#ffaa00;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="148.88333"
cy="81.869568"
r="19.467436"
fx="148.88333"
fy="81.869568"
id="radialGradient3705"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3852588,-0.05136783,0.03705629,0.9993132,-60.392403,7.7040438)" />
</defs>
<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">
<g
id="g4153">
<path
d="m 6.208006,14.025321 0,41.67663 45.365638,0 11.036532,-8.201181 0,-33.475449 -56.40217,0 z"
id="rect3005-1"
style="opacity:0.54166667;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.95121026;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 3.0693551,10.163105 0,41.676631 45.3656379,0 11.036532,-8.201181 0,-33.47545 -56.4021699,0 z"
id="rect3005"
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
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"
id="path3778"
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
transform="translate(-562.78983,-342.8385)"
id="layer2" />
<g
transform="matrix(0.6115108,0,0,0.6115108,7.5206005,11.370829)"
id="layer1-7">
<rect
width="56.18182"
height="46.545456"
x="4"
y="9.272728"
id="rect3002"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
width="56.18182"
height="46.545456"
x="4"
y="9.272728"
id="rect3002-9"
style="color:#000000;fill:none;stroke:#000000;stroke-width:4;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
d="m 4,20.545455 55.636364,0"
id="path3790"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="M 20.909091,9.6363636 20.909091,56"
id="path3792"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 4,32.429811 55.090909,0"
id="path3794"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 4,44.483064 55.636364,0"
id="path3796"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,704 @@
<?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"
version="1.1"
width="64"
height="64"
id="svg2985">
<defs
id="defs2987">
<linearGradient
id="linearGradient3883">
<stop
id="stop3885"
style="stop-color:#ffb400;stop-opacity:1"
offset="0" />
<stop
id="stop3887"
style="stop-color:#ffe900;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3793">
<stop
id="stop3795"
style="stop-color:#000f8a;stop-opacity:1"
offset="0" />
<stop
id="stop3797"
style="stop-color:#0066ff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="12.037806"
y1="54.001419"
x2="52.882648"
y2="9.274148"
id="linearGradient3799-8"
xlink:href="#linearGradient3793-2"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3793-2">
<stop
id="stop3795-6"
style="stop-color:#000f8a;stop-opacity:1"
offset="0" />
<stop
id="stop3797-0"
style="stop-color:#0066ff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="3"
y1="31.671875"
x2="59.25"
y2="31.671875"
id="linearGradient3889-4"
xlink:href="#linearGradient3883-6"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.2727273,-0.18181818)" />
<linearGradient
id="linearGradient3883-6">
<stop
id="stop3885-4"
style="stop-color:#ffb400;stop-opacity:1"
offset="0" />
<stop
id="stop3887-5"
style="stop-color:#ffe900;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="374.42188"
cy="655.5625"
r="225.89062"
fx="374.42188"
fy="655.5625"
id="radialGradient4475"
xlink:href="#linearGradient3533"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0526127,0,0,0.7540853,-19.699324,101.21241)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4466"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,0.5900932,-22.100471,489.57569)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4429"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,282.3446)" />
<radialGradient
cx="361.18896"
cy="641.82562"
r="143.60872"
fx="361.18896"
fy="641.82562"
id="radialGradient3539"
xlink:href="#linearGradient3533"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2871291,0,0,0.588703,-103.70783,273.98098)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3979"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3976"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3969"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3813"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3732"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3686"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-127.41403,-8.614628)" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3396"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3394"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3392"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient3385"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)" />
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient3383"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient3377"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,-200.72763,179.91578)" />
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient3375"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,-200.72763,124.1879)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3373"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-0.1554987,-133.93797)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3361"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-29.352716,-17.655402)" />
<radialGradient
cx="290.86432"
cy="314.29395"
r="130.08176"
fx="290.86432"
fy="314.29395"
id="radialGradient3357"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4674635,0,0,1.0734203,-134.66628,-8.6146276)" />
<radialGradient
cx="318.06638"
cy="365.75668"
r="179.50987"
fx="318.06638"
fy="365.75668"
id="radialGradient2337"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5956187,10.2201,263.97431)" />
<linearGradient
id="linearGradient4328">
<stop
id="stop4330"
style="stop-color:#398fe5;stop-opacity:1"
offset="0" />
<stop
id="stop4332"
style="stop-color:#0066cc;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="333.362"
cy="244.68217"
r="179.38509"
fx="333.362"
fy="244.68217"
id="radialGradient2335"
xlink:href="#linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0565445,0,0,0.5952981,10.2201,208.24643)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient2331"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,210.79224,-49.879453)" />
<linearGradient
id="linearGradient6692">
<stop
id="stop6694"
style="stop-color:#9bffbd;stop-opacity:1"
offset="0" />
<stop
id="stop6700"
style="stop-color:#689e33;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3364">
<stop
id="stop3366"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3351">
<stop
id="stop3353"
style="stop-color:#ffffff;stop-opacity:0.86734694"
offset="0" />
<stop
id="stop3355"
style="stop-color:#ffffff;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="82.9272"
cy="578.88593"
r="19.966738"
fx="82.9272"
fy="578.88593"
id="radialGradient2333"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(7.6237907,4.4015976,-5.0675166,8.7771962,2328.4492,-5270.6109)" />
<linearGradient
id="linearGradient3615">
<stop
id="stop3619"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop3621"
style="stop-color:#398fe5;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3624">
<stop
id="stop3628"
style="stop-color:#398fe5;stop-opacity:1"
offset="0" />
<stop
id="stop3630"
style="stop-color:#acc1d5;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3533">
<stop
id="stop3535"
style="stop-color:#3a3a3a;stop-opacity:1"
offset="0" />
<stop
id="stop3537"
style="stop-color:#ffffff;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3258"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3260"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3262"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3268"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.131046,0,0,1.131204,-22.100471,-17.655402)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3270"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,218.04449,-49.879453)"
spreadMethod="reflect" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3272"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,586.4121,-25.658023)" />
<radialGradient
cx="298.66852"
cy="309.10764"
r="130.08176"
fx="298.66852"
fy="309.10764"
id="radialGradient3275"
xlink:href="#linearGradient3351"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.2436217,0.8776417,-1.1344403,0.3149057,23.62227,-368.49652)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3278"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3284"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3287"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9225535,0.5499376,-0.6128212,1.0614374,-344.74534,-392.71795)"
spreadMethod="reflect" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient3290"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281-8"
xlink:href="#linearGradient3364-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<linearGradient
id="linearGradient3364-1">
<stop
id="stop3366-0"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368-2"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4075"
xlink:href="#linearGradient3364-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-24.327872,-29.478297)" />
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient3281-0"
xlink:href="#linearGradient3364-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<linearGradient
id="linearGradient3364-7">
<stop
id="stop3366-6"
style="stop-color:#79a7fc;stop-opacity:1"
offset="0" />
<stop
id="stop3368-3"
style="stop-color:#1d3340;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="298.10294"
cy="315.40961"
r="149.30214"
fx="298.10294"
fy="315.40961"
id="radialGradient4158"
xlink:href="#linearGradient3364"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.1174411,0,0,0.1174575,-18.224818,-25.892201)" />
<radialGradient
cx="317.86237"
cy="249.47238"
r="141.81195"
fx="317.86237"
fy="249.47238"
id="radialGradient4160"
xlink:href="#linearGradient6692"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09579247,0.05710226,-0.06363172,0.11021335,6.7104086,-29.238154)"
spreadMethod="reflect" />
<radialGradient
cx="45.883327"
cy="28.869568"
r="19.467436"
fx="45.883327"
fy="28.869568"
id="radialGradient3692"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="135.38333"
cy="97.369568"
r="19.467436"
fx="135.38333"
fy="97.369568"
id="radialGradient3703"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
style="stop-color:#faff2b;stop-opacity:1"
offset="0" />
<stop
id="stop3381"
style="stop-color:#ffaa00;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="148.88333"
cy="81.869568"
r="19.467436"
fx="148.88333"
fy="81.869568"
id="radialGradient3705"
xlink:href="#linearGradient3377"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3852588,-0.05136783,0.03705629,0.9993132,-60.392403,7.7040438)" />
</defs>
<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">
<g
id="g4153">
<path
d="m 6.208006,14.025321 0,41.67663 45.365638,0 11.036532,-8.201181 0,-33.475449 -56.40217,0 z"
id="rect3005-1"
style="opacity:0.54166667;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.95121026;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="m 3.0693551,10.163105 0,41.676631 45.3656379,0 11.036532,-8.201181 0,-33.47545 -56.4021699,0 z"
id="rect3005"
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
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"
id="path3778"
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
transform="translate(-562.78983,-342.8385)"
id="layer2" />
<g
transform="matrix(0.6115108,0,0,0.6115108,7.5206005,11.370829)"
id="layer1-7">
<rect
width="56.18182"
height="46.545456"
x="4"
y="9.272728"
id="rect3002"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<rect
width="56.18182"
height="46.545456"
x="4"
y="9.272728"
id="rect3002-9"
style="color:#000000;fill:none;stroke:#000000;stroke-width:4;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
d="m 4,20.545455 55.636364,0"
id="path3790"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="M 20.909091,9.6363636 20.909091,56"
id="path3792"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 4,32.429811 55.090909,0"
id="path3794"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 4,44.483064 55.636364,0"
id="path3796"
style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,85 @@
/***************************************************************************
* Copyright (c) 2016 wandererfan <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_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Console.h>
#include <Base/Parameter.h>
#include <Base/Exception.h>
#include <Base/Sequencer.h>
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <Gui/SoFCSelection.h>
#include <Gui/Selection.h>
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
#include "ViewProviderSpreadsheet.h"
using namespace TechDrawGui;
PROPERTY_SOURCE(TechDrawGui::ViewProviderSpreadsheet, Gui::ViewProviderDocumentObject)
//**************************************************************************
// Construction/Destruction
ViewProviderSpreadsheet::ViewProviderSpreadsheet()
{
sPixmap = "TechDraw_Tree_Spreadsheet";
}
ViewProviderSpreadsheet::~ViewProviderSpreadsheet()
{
}
void ViewProviderSpreadsheet::attach(App::DocumentObject *pcFeat)
{
// call parent attach method
ViewProviderDocumentObject::attach(pcFeat);
}
void ViewProviderSpreadsheet::setDisplayMode(const char* ModeName)
{
ViewProviderDocumentObject::setDisplayMode(ModeName);
}
std::vector<std::string> ViewProviderSpreadsheet::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList = ViewProviderDocumentObject::getDisplayModes();
return StrList;
}
void ViewProviderSpreadsheet::updateData(const App::Property*)
{
}
TechDraw::DrawViewSpreadsheet* ViewProviderSpreadsheet::getViewObject() const
{
return dynamic_cast<TechDraw::DrawViewSpreadsheet*>(pcObject);
}

View File

@ -0,0 +1,60 @@
/***************************************************************************
* Copyright (c) 2016 wandererfan <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 DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
#define DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H
#include <Gui/ViewProviderFeature.h>
namespace TechDraw{
class DrawViewSpreadsheet;
}
namespace TechDrawGui {
class TechDrawGuiExport ViewProviderSpreadsheet : public Gui::ViewProviderDocumentObject
{
PROPERTY_HEADER(TechDrawGui::ViewProviderSpreadsheet);
public:
/// constructor
ViewProviderSpreadsheet();
/// destructor
virtual ~ViewProviderSpreadsheet();
virtual void attach(App::DocumentObject *);
virtual void setDisplayMode(const char* ModeName);
virtual bool useNewSelectionModel(void) const {return false;}
/// returns a list of all possible modes
virtual std::vector<std::string> getDisplayModes(void) const;
virtual void updateData(const App::Property*);
TechDraw::DrawViewSpreadsheet* getViewObject() const;
};
} // namespace TechDrawGui
#endif // DRAWINGGUI_VIEWPROVIDERSPREADSHEET_H

View File

@ -67,6 +67,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
*draw << "TechDraw_NewViewSection";
*draw << "TechDraw_Annotation";
*draw << "TechDraw_Symbol";
*draw << "TechDraw_Spreadsheet";
*draw << "TechDraw_Clip";
*draw << "TechDraw_ClipPlus";
*draw << "TechDraw_ClipMinus";
@ -98,6 +99,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
*views << "TechDraw_NewViewSection";
*views << "TechDraw_Annotation";
*views << "TechDraw_DraftView";
*views << "TechDraw_Spreadsheet";
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
clips->setCommand("TechDraw Clips");
@ -143,6 +145,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
*views << "TechDraw_NewViewSection";
*views << "TechDraw_Annotation";
*views << "TechDraw_DraftView";
*views << "TechDraw_Spreadsheet";
Gui::ToolBarItem *clips = new Gui::ToolBarItem(root);
clips->setCommand("TechDraw Clips");