Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 painting.cpp - description 00003 ------------------- 00004 begin : Sat Nov 22 2003 00005 copyright : (C) 2003 by Michael Margraf 00006 email : michael.margraf@alumni.tu-berlin.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #include "painting.h" 00018 00019 Painting::Painting() 00020 { 00021 Type = isPainting; 00022 State = 0; 00023 } 00024 00025 Painting* Painting::newOne() 00026 { 00027 return new Painting(); 00028 } 00029 00030 void Painting::Bounding(int& _x1, int& _y1, int& _x2, int& _y2) 00031 { 00032 _x1 = cx; _y1 = cy; 00033 _x2 = cx+x2; _y2 = cy+y2; 00034 } 00035 00036 QString Painting::save() 00037 { 00038 return QString(); 00039 } 00040 00041 QString Painting::saveCpp() 00042 { 00043 return QString(); 00044 } 00045 00046 QString Painting::saveJSON() 00047 { 00048 return QString(); 00049 } 00050 00051 QString Painting::toPenString (int pen) { 00052 switch (pen) { 00053 case Qt::NoPen: return "Qt::NoPen"; 00054 case Qt::SolidLine: return "Qt::SolidLine"; 00055 case Qt::DashLine: return "Qt::DashLine"; 00056 case Qt::DotLine: return "Qt::DotLine"; 00057 case Qt::DashDotLine: return "Qt::DashDotLine"; 00058 case Qt::DashDotDotLine: return "Qt::DashDotDotLine"; 00059 case Qt::MPenStyle: return "Qt::MPenStyle"; 00060 } 00061 return "Qt::NoPen"; 00062 } 00063 00064 QString Painting::toBrushString (int brush) { 00065 switch (brush) { 00066 case Qt::NoBrush: return "Qt::NoBrush"; 00067 case Qt::SolidPattern: return "Qt::SolidPattern"; 00068 case Qt::Dense1Pattern: return "Qt::Dense1Pattern"; 00069 case Qt::Dense2Pattern: return "Qt::Dense2Pattern"; 00070 case Qt::Dense3Pattern: return "Qt::Dense3Pattern"; 00071 case Qt::Dense4Pattern: return "Qt::Dense4Pattern"; 00072 case Qt::Dense5Pattern: return "Qt::Dense5Pattern"; 00073 case Qt::Dense6Pattern: return "Qt::Dense6Pattern"; 00074 case Qt::Dense7Pattern: return "Qt::Dense7Pattern"; 00075 case Qt::HorPattern: return "Qt::HorPattern"; 00076 case Qt::VerPattern: return "Qt::VerPattern"; 00077 case Qt::CrossPattern: return "Qt::CrossPattern"; 00078 case Qt::BDiagPattern: return "Qt::BDiagPattern"; 00079 case Qt::FDiagPattern: return "Qt::FDiagPattern"; 00080 case Qt::DiagCrossPattern: return "Qt::DiagCrossPattern"; 00081 case Qt::TexturePattern : return "Qt::CustomPattern "; 00082 } 00083 return "Qt::NoBrush"; 00084 }