##// END OF EJS Templates
Improved polygon splitter and started some perf functions.
Improved polygon splitter and started some perf functions.

File last commit:

r14:72560b13551a default
r16:b59e8f9f1232 tip default
Show More
pcbmodule.cpp
42 lines | 1.9 KiB | text/x-c | CppLexer
PCB Viewer is working but still WIP.
r7 /*------------------------------------------------------------------------------
-- This file is a part of the Kicad Tools Software
-- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program 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 General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------*/
/*-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@member.fsf.org
----------------------------------------------------------------------------*/
#include "pcbmodule.h"
#include "pcbline.h"
Added Polygon drawing but huge perf issue, to be solved.
r14 #include "pcbpad.h"
PCB Viewer is working but still WIP.
r7
PCBModule::PCBModule(QIlib::QIcadPcbModule *moduleNode, PCBContext *context)
:QGraphicsItemGroup(),context(context)
{
this->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
this->setFlags(ItemIsMovable|ItemIsSelectable|ItemIsFocusable);
this->setPos(moduleNode->pos());
for(int i=0;i<moduleNode->fp_lines.count();i++)
{
this->addToGroup(new PCBLine((QIlib::QIcadAbstractPcbLine*)moduleNode->fp_lines.at(i),moduleNode->pos(),context));
}
for(int i=0;i<moduleNode->pads.count();i++)
{
Added Polygon drawing but huge perf issue, to be solved.
r14 this->addToGroup(new PCBPad((QIlib::QIcadPcbPad*)moduleNode->pads.at(i),moduleNode->pos(),context));
PCB Viewer is working but still WIP.
r7 }
this->setRotation(moduleNode->angle());
}