本文整理汇总了C++中Axis::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Axis::draw方法的具体用法?C++ Axis::draw怎么用?C++ Axis::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axis
的用法示例。
在下文中一共展示了Axis::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void MainWindow::on_pushButton_3_clicked()
{
Axis x;
x.setFont(QFont("verdana", 6));
x.setTick(ui->eTick->text().toDouble());
if(ui->cKierunek->currentText()=="wewnątrz")
x.setTickDirection(inside);
else if(ui->cKierunek->currentText()=="zewnątrz")
x.setTickDirection(outside);
else x.setTickDirection(middle);
x.setTickSize(4);
x.setMax(ui->eMax->text().toDouble());
x.setMin(ui->eMin->text().toDouble());
if(ui->cStrona->currentText() == "prawa")
x.setPosition(right);
else x.setPosition(left);
x.setUnitVisibility(ui->cJednostka->isChecked());
x.setGeometry(Geometry(0, 0, 40, 400));
x.setUnit(ui->eJednostka->text());
x.setLabel(Label(ui->eTytul->text(), Geometry(0,0,ui->cEtykieta->isChecked()?10:0,10), Icon(Qt::red, Geometry(0,0,0,0)), QFont("Arial", 8), vertical));
x.draw();
ch.addAxisY(x);
ch.drawBackground();
ui->label->setPixmap(ch.draw());
}
示例2: drawAxes
void Graph::drawAxes(Drawable drawable)
{
GraphOptions* ops = (GraphOptions*)ops_;
for (int ii=0; ii<4; ii++) {
for (ChainLink* link = Chain_LastLink(ops->margins[ii].axes); link;
link = Chain_PrevLink(link)) {
Axis *axisPtr = (Axis*)Chain_GetValue(link);
axisPtr->draw(drawable);
}
}
}
示例3: on_pushButton_clicked
void MainWindow::on_pushButton_clicked()
{
Axis x;
x.setFont(QFont("arial", 8));
x.setTick(ui->eTick->text().toDouble());
if(ui->cKierunek->currentText()=="wewnątrz")
x.setTickDirection(inside);
else if(ui->cKierunek->currentText()=="zewnątrz")
x.setTickDirection(outside);
else x.setTickDirection(middle);
x.setTickSize(4);
x.setMax(ui->eMax->text().toDouble());
x.setMin(ui->eMin->text().toDouble());
x.setPosition(left);
x.setUnitVisibility(ui->cJednostka->isChecked());
x.setGeometry(Geometry(0, 0, 40, 400));
x.setUnit(ui->eJednostka->text());
x.draw();
ch.removeAxisY(0);
ch.addAxisY(x);
ch.drawBackground();
ui->label->setPixmap(ch.draw());
}