mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Introduce NO_MARBLE define, make GlobeGPS a dummy
Some users have requested a way to build subsurface without marble. This hides all traces in the ui and creates a GlobeGPS-dummy thats just a QLabel saying that marble is disabled, in case its shown somehow. The dummy is there so we can just ignore the fact that marble is disabled in the rest of the code. Fixes #394 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									027ffc41bb
								
							
						
					
					
						commit
						770bf9afba
					
				
					 4 changed files with 36 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
#include "globe.h"
 | 
			
		||||
#ifndef NO_MARBLE
 | 
			
		||||
#include "kmessagewidget.h"
 | 
			
		||||
#include "mainwindow.h"
 | 
			
		||||
#include "ui_mainwindow.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -295,3 +296,12 @@ void GlobeGPS::resizeEvent(QResizeEvent *event)
 | 
			
		|||
		messageWidget->setGeometry(5, 5, size - 10, 0);
 | 
			
		||||
	messageWidget->setMaximumHeight(500);
 | 
			
		||||
}
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
GlobeGPS::GlobeGPS(QWidget* parent) { setText("MARBLE DISABLED AT BUILD TIME"); }
 | 
			
		||||
void GlobeGPS::repopulateLabels() {}
 | 
			
		||||
void GlobeGPS::centerOn(dive* dive) {}
 | 
			
		||||
bool GlobeGPS::eventFilter(QObject *obj, QEvent *ev) {}
 | 
			
		||||
void GlobeGPS::prepareForGetDiveCoordinates() {}
 | 
			
		||||
void GlobeGPS::reload() {}
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue