]> sigrok.org Git - pulseview.git/commitdiff
view: Minor whitespace fixes.
authorUwe Hermann <redacted>
Tue, 26 Aug 2014 20:52:55 +0000 (22:52 +0200)
committerUwe Hermann <redacted>
Tue, 26 Aug 2014 20:52:55 +0000 (22:52 +0200)
pv/view/viewport.cpp

index 9f60c1a82ad123897d93b4a6b3360045ffa074ea..f0c78e67fcd727bdea0249120259b80331f8f1b1 100644 (file)
@@ -38,7 +38,7 @@ namespace view {
 
 Viewport::Viewport(View &parent) :
        QWidget(&parent),
-        _view(parent),
+       _view(parent),
        _mouse_down_valid(false),
        _pinch_zoom_active(false)
 {
@@ -102,7 +102,7 @@ void Viewport::paintEvent(QPaintEvent*)
 
 bool Viewport::event(QEvent *event)
 {
-       switch(event->type()) {
+       switch (event->type()) {
        case QEvent::TouchBegin:
        case QEvent::TouchUpdate:
        case QEvent::TouchEnd:
@@ -121,8 +121,7 @@ void Viewport::mousePressEvent(QMouseEvent *event)
 {
        assert(event);
 
-       if (event->button() == Qt::LeftButton)
-       {
+       if (event->button() == Qt::LeftButton) {
                _mouse_down_point = event->pos();
                _mouse_down_offset = _view.offset();
                _mouse_down_valid = true;
@@ -134,18 +133,15 @@ void Viewport::mouseReleaseEvent(QMouseEvent *event)
        assert(event);
 
        if (event->button() == Qt::LeftButton)
-       {
                _mouse_down_valid = false;
-       }
 }
 
 void Viewport::mouseMoveEvent(QMouseEvent *event)
 {
        assert(event);
 
-       if (event->buttons() & Qt::LeftButton)
-       {
-               if (! _mouse_down_valid) {
+       if (event->buttons() & Qt::LeftButton) {
+               if (!_mouse_down_valid) {
                        _mouse_down_point = event->pos();
                        _mouse_down_offset = _view.offset();
                        _mouse_down_valid = true;