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: 6984 $: 22 $Author: irascibl@gmail.com $: 23 $Date: 2013-04-22 23:44:56 +0200 (Mo, 22. Apr 2013) $ 24 25 ********************************************************************/ 26 27 #ifndef SCREWTERMINAL_H 28 #define SCREWTERMINAL_H 29 30 #include "paletteitem.h" 31 32 class ScrewTerminal : public PaletteItem 33 { 34 Q_OBJECT 35 36 public: 37 // after calling this constructor if you want to render the loaded svg (either from model or from file), MUST call <renderImage> 38 ScrewTerminal(ModelPart *, ViewLayer::ViewID, const ViewGeometry & viewGeometry, long id, QMenu * itemMenu, bool doLabel); 39 ~ScrewTerminal(); 40 41 PluralType isPlural(); 42 QStringList collectValues(const QString & family, const QString & prop, QString & value); 43 bool collectExtraInfo(QWidget * parent, const QString & family, const QString & prop, const QString & value, bool swappingEnabled, QString & returnProp, QString & returnValue, QWidget * & returnWidget, bool & hide); 44 45 public slots: 46 void swapEntry(const QString & text); 47 48 public: 49 static QString genFZP(const QString & moduleid); 50 static QString genModuleID(QMap<QString, QString> & currPropsMap); 51 static QString makeBreadboardSvg(const QString & expectedFileName); 52 static QString makeSchematicSvg(const QString & expectedFileName); 53 static QString obsoleteMakeSchematicSvg(const QString & expectedFileName); 54 static QString makePcbSvg(const QString & expectedFileName); 55 56 protected: 57 static void initSpacings(); 58 59 60 }; 61 62 #endif 63