00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PINRECORD_H
00021 #define PINRECORD_H
00022
00023 #include <qstring.h>
00024 #include <qpoint.h>
00025 #include <qbitmap.h>
00026
00027 class QCanvas;
00028 class ScheditBitmap;
00029
00033 class PinRecord{
00034 public:
00035 typedef enum {
00036 eBorderLeft,
00037 eBorderBottom,
00038 eBorderRight,
00039 eBorderTop
00040 } eScheditSide;
00041
00042 #pragma pack (push,1)
00043 private:
00044 typedef struct {
00045 unsigned char bInvert:1;
00046 unsigned char bClock:1;
00047 unsigned char bHide:1;
00048 unsigned char bBit3:1;
00049 unsigned char ucMainFunc:4;
00050 } PinPurpose;
00051 #pragma pack (pop)
00052
00053 QString qsPin;
00054 QString qsFun;
00055 QSize sizeBmp;
00056
00057 unsigned char ucSection;
00058 PinPurpose purpose;
00059
00060 unsigned char ucQueA [2];
00061 unsigned char ucSide;
00062 unsigned char ucSpacing;
00063
00064 int iExtension;
00065
00066 static int iBorder;
00067 static int iRadius;
00068 static int iVertLength;
00069 static int iBaseWidth;
00070 static int iPinTextGap;
00071
00072 void expandPoint ( QPoint& tp,
00073 eScheditSide side,
00074 int iExpand );
00075 QPoint getInnerPoint ( QPoint pin, eScheditSide side );
00076 QPoint getOuterPoint ( QPoint pin, eScheditSide side );
00077 QString Export ( QStringList * slFunction );
00078 void drawCrosses ( QPainter& painter, QPoint qp );
00079
00080 public:
00081 PinRecord ( unsigned char * & puc,
00082 ScheditBitmap * Owner);
00083
00084 ~PinRecord();
00085
00086 void PinNum ( QPainter& painter,
00087 QPoint point,
00088 eScheditSide side );
00089
00090 void PinStr ( QPainter& painter,
00091 QPoint point,
00092 eScheditSide side );
00093
00094 void RenderPin ( QPainter& painter );
00095
00096 QPoint getPoint ( void );
00097
00098 eScheditSide getSide ( void );
00099
00100 bool sectionMismatch ( int iSection );
00101
00102
00103
00104
00105
00106
00107 };
00108
00109 #endif