51 int tHeight = metrics.lineSpacing();
53 int colWidth=0,
x=6, y;
58 if(
y2 < (tHeight + 8))
64 Lines.append(
new Line(0,
y2, 0, 0, QPen(QPen::black,0)));
66 Lines.append(
new Line(0, 0,
x2, 0, QPen(QPen::black,0)));
67 Lines.append(
new Line(0, y+2,
x2, y+2, QPen(QPen::black,2)));
75 Str = QObject::tr(
"no variables");
87 int counting, invisibleCount=0;
98 invisibleCount = NumAll - y/tHeight;
110 z = metrics.width(
"1");
111 colWidth = metrics.width(
"0");
112 if(z > colWidth) colWidth = z;
114 counting = int(
log(
double(NumAll)) /
log(2.0) + 0.9999);
116 if((
x+colWidth*counting) >=
x2) {
124 if(y < tHeight)
break;
126 for(
int zi=counting-1; zi>=0; zi--) {
127 if(z & (1 << zi)) Str =
"1";
129 Texts.append(
new Text( startWriting, y, Str));
130 startWriting += colWidth;
134 x = startWriting + 15;
136 Lines.append(
new Line(
x-8,
y2,
x-8, 0, QPen(QPen::black,2)));
150 if(colWidth < 0)
goto funcEnd;
159 if(g->
Var.right(2) !=
".X") {
161 for(z = NumAll; z>0; z--) {
163 if(startWriting-- > 0)
continue;
164 if(y < tHeight)
break;
165 Str = QString::number(
sqrt((*pdy)*(*pdy) + (*(pdy+1))*(*(pdy+1))));
168 if(colWidth < 0)
goto funcEnd;
177 counting = strlen((
char*)py);
179 digitWidth = metrics.width(
"X") + 2;
180 if((
x+digitWidth*counting) >=
x2) {
185 for(z = NumAll; z>0; z--) {
186 if(startWriting-- > 0) {
190 if(y < tHeight)
break;
202 digitWidth *= counting;
203 if(colWidth < digitWidth)
204 colWidth = digitWidth;
209 Str = QObject::tr(
"wrong dependency");
211 if(colWidth < 0)
goto funcEnd;
216 Str = QObject::tr(
"no data");
218 if(colWidth < 0)
goto funcEnd;
223 Lines.append(
new Line(
x-8,
y2,
x-8, 0, QPen(QPen::black,0)));
227 if(invisibleCount > 0) {
234 NumLeft = NumAll - NumLeft - y;
262 Name = QObject::tr(
"Truth Table");
263 BitmapFile = (
char *)
"truth";