1 /******************************************************************* 2 3 Part of the Fritzing project - http://fritzing.org 4 Copyright (c) 2007-2014 Fachhochschule Potsdam - http://fh-potsdam.de 5 6 Fritzing is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Fritzing is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Fritzing. If not, see <http://www.gnu.org/licenses/>. 18 19 ******************************************************************** 20 21 $Revision: 6912 $: 22 $Author: irascibl@gmail.com $: 23 $Date: 2013-03-09 08:18:59 +0100 (Sa, 09. Mrz 2013) $ 24 25 ********************************************************************/ 26 27 28 29 #ifndef BREADBOARDSKETCHWIDGET_H 30 #define BREADBOARDSKETCHWIDGET_H 31 32 #include "sketchwidget.h" 33 34 class BreadboardSketchWidget : public SketchWidget 35 { 36 Q_OBJECT 37 38 public: 39 BreadboardSketchWidget(ViewLayer::ViewID, QWidget *parent=0); 40 41 void addViewLayers(); 42 void initWire(Wire *, int penWidth); 43 bool canDisconnectAll(); 44 bool ignoreFemale(); 45 void addDefaultParts(); 46 void showEvent(QShowEvent * event); 47 double getWireStrokeWidth(Wire *, double wireWidth); 48 void getBendpointWidths(class Wire *, double w, double & w1, double & w2, bool & negativeOffsetRect); 49 50 protected: 51 void setWireVisible(Wire * wire); 52 bool collectFemaleConnectees(ItemBase *, QSet<ItemBase *> &); 53 void findConnectorsUnder(ItemBase * item); 54 bool checkUnder(); 55 bool disconnectFromFemale(ItemBase * item, QHash<long, ItemBase *> & savedItems, ConnectorPairHash &, bool doCommand, bool rubberBandLegEnabled, QUndoCommand * parentCommand); 56 BaseCommand::CrossViewType wireSplitCrossView(); 57 bool canDropModelPart(ModelPart * modelPart); 58 void getLabelFont(QFont &, QColor &, ItemBase *); 59 void setNewPartVisible(ItemBase *); 60 double defaultGridSizeInches(); 61 ViewLayer::ViewLayerID getLabelViewLayerID(ItemBase *); 62 double getTraceWidth(); 63 const QString & traceColor(ViewLayer::ViewLayerPlacement); 64 }; 65 66 #endif 67