From 57f4d38841c40cad3c206abdd16eebaed753aa1c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 18 Mar 2018 18:18:57 +0100 Subject: Update all fiels to adhere to style-guide --- src/canvaswidget.cc | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/canvaswidget.cc') diff --git a/src/canvaswidget.cc b/src/canvaswidget.cc index c0e0b88..5ce2731 100644 --- a/src/canvaswidget.cc +++ b/src/canvaswidget.cc @@ -32,64 +32,64 @@ #define SINGLESTEP MAXVAL/100000 #define PAGESTEP MAXVAL/10000 -CanvasWidget::CanvasWidget(QWidget *parent) +CanvasWidget::CanvasWidget(QWidget* parent) { - QGridLayout *g = new QGridLayout(this); + QGridLayout* g = new QGridLayout(this); - canvas = new Canvas(this); - g->addWidget(canvas, 0, 0); + canvas = new Canvas(this); + g->addWidget(canvas, 0, 0); - yoffset = new QScrollBar(Qt::Vertical); - yoffset->setRange(0, MAXVAL); - yoffset->setPageStep(PAGESTEP); - yoffset->setSingleStep(SINGLESTEP); - connect(yoffset, SIGNAL(valueChanged(int)), this, SLOT(setYOffset(int))); - g->addWidget(yoffset, 0, 1); + yoffset = new QScrollBar(Qt::Vertical); + yoffset->setRange(0, MAXVAL); + yoffset->setPageStep(PAGESTEP); + yoffset->setSingleStep(SINGLESTEP); + connect(yoffset, SIGNAL(valueChanged(int)), this, SLOT(setYOffset(int))); + g->addWidget(yoffset, 0, 1); - yscale = new ZoomSlider(Qt::Vertical); - yscale->setRange(0.5, 30); - yscale->setTickWidth(0.1); - connect(yscale, SIGNAL(valueChanged(float)), this, SLOT(setYScale(float))); - yscale->setValue(0.5); - setYScale(0.5); - g->addWidget(yscale, 0, 2); + yscale = new ZoomSlider(Qt::Vertical); + yscale->setRange(0.5, 30); + yscale->setTickWidth(0.1); + connect(yscale, SIGNAL(valueChanged(float)), this, SLOT(setYScale(float))); + yscale->setValue(0.5); + setYScale(0.5); + g->addWidget(yscale, 0, 2); - xoffset = new QScrollBar(Qt::Horizontal); - xoffset->setRange(0, MAXVAL); - xoffset->setPageStep(PAGESTEP); - xoffset->setSingleStep(SINGLESTEP); - connect(xoffset, SIGNAL(valueChanged(int)), this, SLOT(setXOffset(int))); - g->addWidget(xoffset, 1, 0); + xoffset = new QScrollBar(Qt::Horizontal); + xoffset->setRange(0, MAXVAL); + xoffset->setPageStep(PAGESTEP); + xoffset->setSingleStep(SINGLESTEP); + connect(xoffset, SIGNAL(valueChanged(int)), this, SLOT(setXOffset(int))); + g->addWidget(xoffset, 1, 0); - xscale = new ZoomSlider(Qt::Horizontal); - xscale->setRange(1, 0.0001); - xscale->setTickWidth(0.0001); - connect(xscale, SIGNAL(valueChanged(float)), this, SLOT(setXScale(float))); - g->addWidget(xscale, 2, 0); + xscale = new ZoomSlider(Qt::Horizontal); + xscale->setRange(1, 0.0001); + xscale->setTickWidth(0.0001); + connect(xscale, SIGNAL(valueChanged(float)), this, SLOT(setXScale(float))); + g->addWidget(xscale, 2, 0); - setLayout(g); + setLayout(g); } void CanvasWidget::setXScale(float val) { - canvas->setXScale(val); + canvas->setXScale(val); } void CanvasWidget::setYScale(float val) { - canvas->setYScale(val); + canvas->setYScale(val); } void CanvasWidget::setXOffset(int of) { - // range 0.0 - 1.0 - float val = (float)of/(float)MAXVAL; - canvas->setXOffset(val); + // range 0.0 - 1.0 + float val = (float)of/(float)MAXVAL; + canvas->setXOffset(val); } void CanvasWidget::setYOffset(int of) { - // range 0.0 - 1.0 - float val = (float)(of * -1 + MAXVAL)/(float)MAXVAL; - canvas->setYOffset(val); + // range 0.0 - 1.0 + float val = (float)(of * -1 + MAXVAL)/(float)MAXVAL; + canvas->setYOffset(val); } -- cgit v1.2.3