mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Show/Hide pictures working.
This code hoocks the pictures with the preferences change. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									a00d8101c5
								
							
						
					
					
						commit
						b9d04c0cf4
					
				
					 4 changed files with 11 additions and 1 deletions
				
			
		|  | @ -1279,6 +1279,7 @@ TOOLBOX_PREF_PROFILE(profRuler, rulergraph, rulergraph); | |||
| TOOLBOX_PREF_PROFILE(profSAC, show_sac, show_sac); | ||||
| TOOLBOX_PREF_PROFILE(profScaled, zoomed_plot, zoomed_plot); | ||||
| TOOLBOX_PREF_PROFILE(profTogglePicture, show_pictures_in_profile, show_pictures_in_profile); | ||||
| 
 | ||||
| void MainWindow::turnOffNdlTts() | ||||
| { | ||||
| 	const bool triggered = false; | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| #include "divepixmapitem.h" | ||||
| #include "animationfunctions.h" | ||||
| #include <divepicturewidget.h> | ||||
| #include <preferences.h> | ||||
| 
 | ||||
| #include <QPen> | ||||
| #include <QBrush> | ||||
|  | @ -22,6 +23,13 @@ DivePictureItem::DivePictureItem(int row, QObject *parent): DivePixmapItem(paren | |||
| #endif | ||||
| 	rowOnModel = row; | ||||
| 	setScale(0.2); | ||||
| 	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); | ||||
| 	setVisible(prefs.show_pictures_in_profile); | ||||
| } | ||||
| 
 | ||||
| void DivePictureItem::settingsChanged() | ||||
| { | ||||
| 	setVisible(prefs.show_pictures_in_profile); | ||||
| } | ||||
| 
 | ||||
| void DivePictureItem::setPixmap(const QPixmap &pix) | ||||
|  |  | |||
|  | @ -20,6 +20,8 @@ class DivePictureItem : public DivePixmapItem { | |||
| public: | ||||
| 	DivePictureItem(int row, QObject *parent = 0); | ||||
| 	void setPixmap(const QPixmap& pix); | ||||
| public slots: | ||||
| 	void settingsChanged(); | ||||
| protected: | ||||
| 	void hoverEnterEvent(QGraphicsSceneHoverEvent *event); | ||||
| 	void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); | ||||
|  |  | |||
|  | @ -555,7 +555,6 @@ void ProfileWidget2::settingsChanged() | |||
| 		isPlotZoomed = prefs.zoomed_plot; | ||||
| 		needReplot = true; | ||||
| 	} | ||||
| 
 | ||||
| 	if (needReplot) | ||||
| 		replot(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue