[PATCH 2/2] Fixed white space in profile

Dirk Hohndel dirk at hohndel.org
Thu Feb 27 18:57:00 PST 2014


thanks for this patch - but it is missing a Signed-off-by: line so I
can't apply it as is

/D

On Thu, 2014-02-27 at 15:29 -0600, Alberto wrote:
> From: Alberto Corona <albcoron at gmail.com>
> 
> ---
>  qt-ui/profile/profilewidget2.cpp | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
> index ee9e80b..8b16f07 100644
> --- a/qt-ui/profile/profilewidget2.cpp
> +++ b/qt-ui/profile/profilewidget2.cpp
> @@ -74,9 +74,9 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
>  	diveComputerText(new DiveTextItem()),
>  	diveCeiling(new DiveCalculatedCeiling()),
>  	reportedCeiling(new DiveReportedCeiling()),
> -	pn2GasItem( new PartialPressureGasItem()),
> -	pheGasItem( new PartialPressureGasItem()),
> -	po2GasItem( new PartialPressureGasItem()),
> +	pn2GasItem(new PartialPressureGasItem()),
> +	pheGasItem(new PartialPressureGasItem()),
> +	po2GasItem(new PartialPressureGasItem()),
>  	heartBeatAxis(new DiveCartesianAxis()),
>  	heartBeatItem(new DiveHeartrateItem()),
>  	isPlotZoomed(prefs.zoomed_plot),
> @@ -176,7 +176,7 @@ void ProfileWidget2::setupItemOnScene()
>  
>  	setupItem(reportedCeiling, timeAxis, profileYAxis, dataModel, DivePlotDataModel::CEILING, DivePlotDataModel::TIME, 1);
>  	setupItem(diveCeiling, timeAxis, profileYAxis, dataModel, DivePlotDataModel::CEILING, DivePlotDataModel::TIME, 1);
> -	for(int i = 0; i < 16; i++){
> +	for (int i = 0; i < 16; i++) {
>  		DiveCalculatedTissue *tissueItem = new DiveCalculatedTissue();
>  		setupItem(tissueItem, timeAxis, profileYAxis, dataModel, DivePlotDataModel::TISSUE_1 + i, DivePlotDataModel::TIME, 1+i);
>  		allTissues.append(tissueItem);
> @@ -409,7 +409,7 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
>  		event = event->next;
>  	}
>  	// Only set visible the ones that should be visible, but how?
> -	Q_FOREACH(DiveEventItem *event, eventItems){
> +	Q_FOREACH(DiveEventItem *event, eventItems) {
>  		event->setVisible(true);
>  		// qDebug() << event->getEvent()->name << "@" << event->getEvent()->time.seconds;
>  	}
> @@ -420,28 +420,28 @@ void ProfileWidget2::settingsChanged()
>  {
>  	QSettings s;
>  	s.beginGroup("TecDetails");
> -	if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){
> +	if (s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()) {
>  		profileYAxis->animateChangeLine(itemPos.depth.shrinked);
>  		temperatureAxis->animateChangeLine(itemPos.temperature.shrinked);
>  		cylinderPressureAxis->animateChangeLine(itemPos.cylinder.shrinked);
> -	}else{
> +	} else {
>  		profileYAxis->animateChangeLine(itemPos.depth.expanded);
>  		temperatureAxis->animateChangeLine(itemPos.temperature.expanded);
>  		cylinderPressureAxis->animateChangeLine(itemPos.cylinder.expanded);
>  	}
> -	if(s.value("zoomed_plot").toBool() != isPlotZoomed){
> +	if (s.value("zoomed_plot").toBool() != isPlotZoomed) {
>  		isPlotZoomed = s.value("zoomed_plot").toBool();
>  		int diveId = dataModel->id();
>  		dataModel->clear();
>  		plotDives(QList<dive*>() << getDiveById(diveId));
>  	}
>  
> -	if(currentState == PROFILE){
> +	if (currentState == PROFILE) {
>  		bool rulerVisible = s.value("rulergraph", false).toBool();
>  		rulerItem->setVisible(rulerVisible);
>  		rulerItem->destNode()->setVisible(rulerVisible );
>  		rulerItem->sourceNode()->setVisible(rulerVisible );
> -	}else{
> +	} else {
>  		rulerItem->setVisible(false);
>  		rulerItem->destNode()->setVisible(false);
>  		rulerItem->sourceNode()->setVisible(false);
> @@ -457,10 +457,10 @@ void ProfileWidget2::resizeEvent(QResizeEvent* event)
>  
>  void ProfileWidget2::fixBackgroundPos()
>  {
> -	if(currentState != EMPTY)
> +	if (currentState != EMPTY)
>  		return;
>  	QPixmap toBeScaled;
> -	if (!backgrounds.keys().contains(backgroundFile)){
> +	if (!backgrounds.keys().contains(backgroundFile)) {
>  		backgrounds[backgroundFile] = QPixmap(backgroundFile);
>  	}
>  	toBeScaled = backgrounds[backgroundFile];
> @@ -515,7 +515,7 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent* event)
>  bool ProfileWidget2::eventFilter(QObject *object, QEvent *event)
>  {
>  	QGraphicsScene *s = qobject_cast<QGraphicsScene*>(object);
> -	if (s && event->type() == QEvent::GraphicsSceneHelp){
> +	if (s && event->type() == QEvent::GraphicsSceneHelp) {
>  		event->ignore();
>  		return true;
>  	}
> @@ -547,10 +547,10 @@ void ProfileWidget2::setEmptyState()
>  	rulerItem->setVisible(false);
>  	rulerItem->destNode()->setVisible(false);
>  	rulerItem->sourceNode()->setVisible(false);
> -	Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
> +	Q_FOREACH(DiveCalculatedTissue *tissue, allTissues) {
>  		tissue->setVisible(false);
>  	}
> -	Q_FOREACH(DiveEventItem *event, eventItems){
> +	Q_FOREACH(DiveEventItem *event, eventItems) {
>  		event->setVisible(false);
>  	}
>  }
> @@ -570,11 +570,11 @@ void ProfileWidget2::setProfileState()
>  	profileYAxis->setPos(itemPos.depth.pos.on);
>  	QSettings s;
>  	s.beginGroup("TecDetails");
> -	if(s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()){
> +	if (s.value("phegraph").toBool()|| s.value("po2graph").toBool()|| s.value("pn2graph").toBool()) {
>  		profileYAxis->setLine(itemPos.depth.shrinked);
>  		temperatureAxis->setLine(itemPos.temperature.shrinked);
>  		cylinderPressureAxis->setLine(itemPos.cylinder.shrinked);
> -	}else{
> +	} else {
>  		profileYAxis->setLine(itemPos.depth.expanded);
>  		temperatureAxis->setLine(itemPos.temperature.expanded);
>  		cylinderPressureAxis->setLine(itemPos.cylinder.expanded);
> @@ -598,7 +598,7 @@ void ProfileWidget2::setProfileState()
>  	diveCeiling->setVisible(s.value("calcceiling").toBool());
>  	reportedCeiling->setVisible(s.value("dcceiling").toBool());
>  
> -	if(s.value("calcalltissues").toBool()){
> +	if (s.value("calcalltissues").toBool()) {
>  		Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
>  			tissue->setVisible(true);
>  		}




More information about the subsurface mailing list