53 int tHeight = metrics.lineSpacing();
55 int colWidth=0, x=6, y;
60 if(
y2 < (tHeight + 8))
66 Lines.append(
new Line(0,
y2, 0, 0, QPen(Qt::black,0)));
68 Lines.append(
new Line(0, 0,
x2, 0, QPen(Qt::black,0)));
69 Lines.append(
new Line(0, y+2,
x2, y+2, QPen(Qt::black,2)));
77 Str = QObject::tr(
"no variables");
89 int counting, invisibleCount=0;
100 invisibleCount = NumAll - y/tHeight;
112 z = metrics.width(
"1");
113 colWidth = metrics.width(
"0");
114 if(z > colWidth) colWidth = z;
116 counting = int(log(
double(NumAll)) / log(2.0) + 0.9999);
118 if((x+colWidth*counting) >=
x2) {
126 if(y < tHeight)
break;
128 for(
int zi=counting-1; zi>=0; zi--) {
129 if(z & (1 << zi)) Str =
"1";
131 Texts.append(
new Text( startWriting, y, Str));
132 startWriting += colWidth;
136 x = startWriting + 15;
138 Lines.append(
new Line(x-8,
y2, x-8, 0, QPen(Qt::black,2)));
152 if(colWidth < 0)
goto funcEnd;
161 if(g->
Var.right(2) !=
".X") {
163 for(z = NumAll; z>0; z--) {
165 if(startWriting-- > 0)
continue;
166 if(y < tHeight)
break;
167 Str = QString::number(sqrt((*pdy)*(*pdy) + (*(pdy+1))*(*(pdy+1))));
170 if(colWidth < 0)
goto funcEnd;
179 counting = strlen((
char*)py);
181 digitWidth = metrics.width(
"X") + 2;
182 if((x+digitWidth*counting) >=
x2) {
187 for(z = NumAll; z>0; z--) {
188 if(startWriting-- > 0) {
192 if(y < tHeight)
break;
204 digitWidth *= counting;
205 if(colWidth < digitWidth)
206 colWidth = digitWidth;
211 Str = QObject::tr(
"wrong dependency");
213 if(colWidth < 0)
goto funcEnd;
218 Str = QObject::tr(
"no data");
220 if(colWidth < 0)
goto funcEnd;
225 Lines.append(
new Line(x-8,
y2, x-8, 0, QPen(Qt::black,0)));
229 if(invisibleCount > 0) {
236 NumLeft = NumAll - NumLeft - y;
264 Name = QObject::tr(
"Truth Table");
265 BitmapFile = (
char *)
"truth";
TruthDiagram(int _cx=0, int _cy=0)
#define MIN_SCROLLBAR_SIZE
bool sameDependencies(Graph *, Graph *)
Definitions and declarations for the main application.
Q3PtrList< Graph > Graphs
Q3PtrList< struct Arc > Arcs
int checkColumnWidth(const QString &, const QFontMetrics &, int, int, int)
Superclass of all schematic drawing elements.
static Element * info(QString &, char *&, bool getNewOne=false)
Q3PtrList< DataX > cPointsX