code format
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "graphic_conf.h"
|
||||
|
||||
#include "qad_types.h"
|
||||
#include "ui_graphic_conf.h"
|
||||
|
||||
@@ -7,11 +8,10 @@ GraphicConf::GraphicConf(QVector<GraphicType> & graphics_, QWidget * parent): QD
|
||||
ui = new Ui::GraphicConf();
|
||||
ui->setupUi(this);
|
||||
QStringList styles;
|
||||
int fh = qMax<int>(fontMetrics().size(0, "0").height(), 22);
|
||||
int fh = qMax<int>(fontMetrics().size(0, "0").height(), 22);
|
||||
int thick = lineThickness(this);
|
||||
QSize sz(fh * 2.5, fh);
|
||||
styles << tr("NoPen") << tr("Solid") << tr("Dash")
|
||||
<< tr("Dot") << tr("Dash-Dot") << tr("Dash-Dot-Dot");
|
||||
styles << tr("NoPen") << tr("Solid") << tr("Dash") << tr("Dot") << tr("Dash-Dot") << tr("Dash-Dot-Dot");
|
||||
ui->comboStyleGrid->setIconSize(sz);
|
||||
ui->comboStyleGraphic->setIconSize(sz);
|
||||
ui->cbGraphicNames->setIconSize(sz);
|
||||
@@ -72,8 +72,10 @@ void GraphicConf::on_comboStyleGraphic_currentIndexChanged(int index) {
|
||||
|
||||
void GraphicConf::on_spinLineWidthGraphic_valueChanged(double value) {
|
||||
if (graphicItems.isEmpty()) return;
|
||||
if (qRound(value) == value) graphics[ui->cbGraphicNames->currentIndex()].pen.setWidth(qRound(value));
|
||||
else graphics[ui->cbGraphicNames->currentIndex()].pen.setWidthF(value);
|
||||
if (qRound(value) == value)
|
||||
graphics[ui->cbGraphicNames->currentIndex()].pen.setWidth(qRound(value));
|
||||
else
|
||||
graphics[ui->cbGraphicNames->currentIndex()].pen.setWidthF(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user