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()); }
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); } } }
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()); }