22 #include <qfileinfo.h>
29 Description = QObject::tr(
"equation defined RF device");
36 QObject::tr(
"type of parameters")+
" [Y, Z, S]"));
38 QObject::tr(
"number of ports")));
40 QObject::tr(
"representation during DC analysis")+
41 " [open, short, unspecified, zerofrequency]"));
45 QObject::tr(
"parameter equation") +
" 11"));
47 QObject::tr(
"parameter equation") +
" 12"));
49 QObject::tr(
"parameter equation") +
" 21"));
51 QObject::tr(
"parameter equation") +
" 22"));
69 Name = QObject::tr(
"Equation Defined RF Device");
70 BitmapFile = (
char *)
"rfedd";
74 p->
Props.at(0)->Value =
"Y";
75 p->
Props.at(1)->Value =
"2";
91 s +=
" "+p1->Connection->Name;
96 s +=
" "+p2->Name+
"=\""+p2->Value+
"\"";
99 s +=
" "+p2->Name+
"=\""+p2->Value+
"\"";
103 s +=
" "+p2->Name+
"=\""+Name+
"."+p+n+
"\"";
104 e +=
" Eqn:Eqn"+Name+p2->Name+
" "+
105 Name+
"."+p+n+
"=\""+p2->Value+
"\" Export=\"no\"\n";
116 int fHeight = metrics.lineSpacing();
121 int No =
Props.at(1)->Value.toInt();
124 Props.at(1)->Value = QString::number(No);
127 int NumProps =
Props.count() - 3;
128 if (NumProps < No * No) {
129 for(i = 0; i < NumProps; i++) {
130 tmp=QString::number((i)/No+1)+QString::number((i)%No+1);
131 Props.at(i+3)->Name=
"P"+tmp;
132 Props.at(i+3)->Description=QObject::tr(
"parameter equation") +
" " +tmp;
134 for(i = NumProps; i < No * No; i++) {
135 tmp=QString::number((i)/No+1)+QString::number((i)%No+1);
137 QObject::tr(
"parameter equation") +
" " +tmp));
140 for(i = No * No; i < NumProps; i++) {
143 for(i = 0; i < No * No; i++) {
144 tmp=QString::number((i)/No+1)+QString::number((i)%No+1);
145 Props.at(i+3)->Name=
"P"+tmp;
146 Props.at(i+3)->Description=QObject::tr(
"parameter equation") +
" " +tmp;
152 int h = 30*((No-1)/2) + 15;
159 tmp = QObject::tr(
"RF");
160 w = metrics.width(tmp);
168 tmp = QString::number(i+1);
169 w = metrics.width(tmp);
170 Texts.append(
new Text(-20-w, y-fHeight-2, tmp));
176 tmp = QString::number(i+1);
177 Texts.append(
new Text( 20, y-fHeight-2, tmp));
186 ty =
y1 - fHeight - 4;