28 #include <QMessageBox>
52 float *px,
float *py,
Axis *pa)
62 *py = float(log10(yi / pa->
low)/log10(pa->
up / pa->
low)
64 else *py = float((yi-pa->
low)/(pa->
up-pa->
low)*
double(
y2));
117 double GridStep, corr, zD, zDstep, GridNum;
151 while((z <=
x2) && (z >= 0)) {
155 if((zD < 1.5*zDstep) || (z == 0) || (z ==
x2)) {
157 if(
xAxis.
up < 0.0) tmp =
'-'+tmp;
158 w = metrics.width(tmp);
160 Texts.append(
new Text(z-(w>>1), -y1, tmp));
161 Lines.append(
new Line(z, 5, z, -5, QPen(Qt::black,0)));
165 if(zD > 9.5*zDstep) zDstep *= 10.0;
167 z = int(corr*log10(zD / fabs(
xAxis.
up)) + 0.5);
171 z = int(corr*log10(zD / fabs(
xAxis.
low)) + 0.5);
179 else Expo = log10(fabs(
xAxis.
up));
183 while((z <=
x2) && (z >= 0)) {
184 if(fabs(GridNum) < 0.01*pow(10.0, Expo)) GridNum = 0.0;
186 w = metrics.width(tmp);
187 Texts.append(
new Text(z-(w>>1), -y1, tmp));
192 Lines.append(
new Line(z, 5, z, -5, QPen(Qt::black,0)));
199 Lines.append(
new Line(z, 0, z,
y2, QPen(Qt::black,0)));
210 Lines.append(
new Line(0, z,
x2, z, QPen(Qt::black,0)));
219 Lines.append(
new Line(0, 0,
x2, 0, QPen(Qt::black,0)));
220 Lines.append(
new Line(0,
y2, 0, 0, QPen(Qt::black,0)));
245 Name = QObject::tr(
"Locus Curve");
246 BitmapFile = (
char *)
"curve";
static Element * info(QString &, char *&, bool getNewOne=false)
int regionCode(float, float)
tQucsSettings QucsSettings
void calcCoordinate(double *&, double *&, double *&, float *, float *, Axis *)
CurveDiagram(int _cx=0, int _cy=0)
Definitions and declarations for the main application.
QString StringNiceNum(double num)
Q3PtrList< struct Arc > Arcs
bool calcAxisLogScale(Axis *, int &, double &, double &, double &, int)
Superclass of all schematic drawing elements.
bool calcAxisScale(Axis *, double &, double &, double &, double &, double)
bool insideDiagram(float, float)
bool calcYAxis(Axis *, int)