mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Good deal of whitespace fixes and code cleanup.
I just went thru all of subsurface code removing some whitespaces issues and trying to make the code prettyer, I also removed a few QString issues.d Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
		
							parent
							
								
									9ed933d033
								
							
						
					
					
						commit
						1b9a4f2bf8
					
				
					 11 changed files with 50 additions and 131 deletions
				
			
		|  | @ -67,8 +67,6 @@ ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent | |||
| 
 | ||||
| 	setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff); | ||||
| 	setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff); | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| /* since we cannot use translate() directly on the scene we hack on
 | ||||
|  | @ -286,7 +284,6 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw) | |||
| 
 | ||||
| 	/* Depth profile */ | ||||
| 	plot_depth_profile(); | ||||
| 
 | ||||
| 	plot_events(dc); | ||||
| 
 | ||||
| 	if (rulerEnabled && !printMode) | ||||
|  | @ -300,11 +297,8 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw) | |||
| 
 | ||||
| 	/* Text on top of all graphs.. */ | ||||
| 	plot_temperature_text(); | ||||
| 
 | ||||
| 	plot_depth_text(); | ||||
| 
 | ||||
| 	plot_cylinder_pressure_text(); | ||||
| 
 | ||||
| 	plot_deco_text(); | ||||
| 
 | ||||
| 	/* Put the dive computer name in the lower left corner */ | ||||
|  | @ -649,7 +643,6 @@ void ProfileGraphicsView::plot_depth_sample(struct plot_data *entry,text_render_ | |||
| 	plot_text(tro, QPointF(sec, entry->depth), QString("%1").arg(d, 0, 'f', 1)); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void ProfileGraphicsView::plot_temperature_text() | ||||
| { | ||||
| 	int i; | ||||
|  | @ -768,13 +761,11 @@ void ProfileGraphicsView::plot_cylinder_pressure(struct divecomputer *dc) | |||
| 			scene()->addItem(item); | ||||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 		from = QPointF(SCALEGC(entry->sec, mbar)); | ||||
| 		last_index = entry->cylinderindex; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /* set the color for the pressure plot according to temporary sac rate
 | ||||
|  * as compared to avg_sac; the calculation simply maps the delta between | ||||
|  * sac and avg_sac to indexes 0 .. (SAC_COLORS - 1) with everything | ||||
|  | @ -926,7 +917,6 @@ void ProfileGraphicsView::remove_ruler() | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void ProfileGraphicsView::plot_depth_profile() | ||||
| { | ||||
| 	int i, incr; | ||||
|  | @ -1324,7 +1314,6 @@ void ToolTipItem::clear() | |||
| 
 | ||||
| void ToolTipItem::setRect(const QRectF& r) | ||||
| { | ||||
| 
 | ||||
| 	// qDeleteAll(childItems());
 | ||||
| 	delete background; | ||||
| 
 | ||||
|  | @ -1355,7 +1344,6 @@ void ToolTipItem::setRect(const QRectF& r) | |||
| 	updateTitlePosition(); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void ToolTipItem::collapse() | ||||
| { | ||||
| 	QPropertyAnimation *animation = new QPropertyAnimation(this, "rect"); | ||||
|  | @ -1370,10 +1358,8 @@ void ToolTipItem::collapse() | |||
| 
 | ||||
| void ToolTipItem::expand() | ||||
| { | ||||
| 
 | ||||
| 	if (!title) { | ||||
| 	if (!title) | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| 	double width = 0, height = title->boundingRect().height() + SPACING; | ||||
| 	Q_FOREACH(ToolTip t, toolTips) { | ||||
|  | @ -1418,7 +1404,6 @@ ToolTipItem::~ToolTipItem() | |||
| 	clear(); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void ToolTipItem::updateTitlePosition() | ||||
| { | ||||
| 	if (rectangle.width() < title->boundingRect().width() + SPACING*4) { | ||||
|  | @ -1532,8 +1517,6 @@ EventItem::EventItem(QGraphicsItem* parent, bool grayscale): QGraphicsPolygonIte | |||
| 	ball->setPen(QPen(getColor(ALERT_FG))); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| RulerNodeItem::RulerNodeItem(QGraphicsItem *parent, graphics_context context) : QGraphicsEllipseItem(parent), gc(context), entry(NULL) , ruler(NULL) | ||||
| { | ||||
| 	setRect(QRect(QPoint(-8,8),QPoint(8,-8))); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue