[qet] [2874] Removed QRubberBand Class.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2874
Author:   abhishekm71
Date:     2014-02-23 20:50:06 +0100 (Sun, 23 Feb 2014)
Log Message:
-----------
Removed QRubberBand Class. Not required, at present commented out the sections

Modified Paths:
--------------
    trunk/sources/diagramview.cpp

Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp	2014-02-23 18:55:26 UTC (rev 2873)
+++ trunk/sources/diagramview.cpp	2014-02-23 19:50:06 UTC (rev 2874)
@@ -459,28 +459,28 @@
 				current_behavior = noAction;
 				break;
 			case addingLine:
-				if (!rubber_band) {
+		//		if (!rubber_band) {
 					rubber_band_origin = mapToScene(e -> pos());
-					rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
-				}
-				rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
-				rubber_band->show();
+			//		rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
+				//}
+				//rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
+				//rubber_band->show();
 				break;
 			case addingRectangle:
-				if (!rubber_band) {
+				//if (!rubber_band) {
 					rubber_band_origin = mapToScene(e -> pos());
-					rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
-				}
-				rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
-				rubber_band->show();
+					//rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
+			//	}
+				//rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
+				//rubber_band->show();
 				break;
 			case addingEllipse:
-				if (!rubber_band) {
+			//	if (!rubber_band) {
 					rubber_band_origin = mapToScene(e -> pos());
-					rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
-				}
-				rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
-				rubber_band->show();
+				//	rubber_band = new QRubberBand(QRubberBand::Rectangle, this);
+				//}
+				//rubber_band->setGeometry(QRectF(rubber_band_origin, QSize()).toRect());
+				//rubber_band->show();
 				break;
 			case dragView:
 				current_behavior = noAction;
@@ -512,9 +512,9 @@
 		center_view_ = mapToScene(this -> viewport() -> rect()).boundingRect().center();
 		return;
 	}
-	if ((e -> buttons() & Qt::LeftButton) &&
+	/*if ((e -> buttons() & Qt::LeftButton) &&
 		(current_behavior == addingLine || current_behavior == addingRectangle || current_behavior == addingEllipse))
-		rubber_band -> setGeometry(QRectF(rubber_band_origin, mapToScene(e->pos())).normalized().toRect());
+		rubber_band -> setGeometry(QRectF(rubber_band_origin, mapToScene(e->pos())).normalized().toRect());*/
 	QGraphicsView::mouseMoveEvent(e);
 }
 
@@ -546,8 +546,8 @@
 			scene -> addItem(ellipse);
 			emit(EllipseAdded(false));
 		}
-		rubber_band -> hide();
-		rubber_band = 0;
+		//rubber_band -> hide();
+		//rubber_band = 0;
 		current_behavior = noAction;
 	}
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/