mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	More Code Cleanup
The code now seems to be mostly working. There is unfortunately a QAction shortcut conflict between the implementation and the MainWindow. - I'm gonna fix that in the next commit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
		
							parent
							
								
									aef0dd0fa0
								
							
						
					
					
						commit
						9bc7d8f514
					
				
					 1 changed files with 3 additions and 14 deletions
				
			
		|  | @ -2,27 +2,21 @@ | ||||||
| #include "graphicsview-common.h" | #include "graphicsview-common.h" | ||||||
| #include "models.h" | #include "models.h" | ||||||
| #include "modeldelegates.h" | #include "modeldelegates.h" | ||||||
|  | #include "ui_diveplanner.h" | ||||||
|  | #include "mainwindow.h" | ||||||
| 
 | 
 | ||||||
| #include "../dive.h" | #include "../dive.h" | ||||||
| #include "../divelist.h" | #include "../divelist.h" | ||||||
| #include "../planner.h" | #include "../planner.h" | ||||||
| 
 | 
 | ||||||
| #include <cmath> |  | ||||||
| #include <QMouseEvent> | #include <QMouseEvent> | ||||||
| #include <QDebug> | #include <QDebug> | ||||||
| #include <QGraphicsWidget> |  | ||||||
| #include <QGraphicsProxyWidget> |  | ||||||
| #include <QPushButton> |  | ||||||
| #include <QGraphicsSceneMouseEvent> | #include <QGraphicsSceneMouseEvent> | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include <QStringListModel> | #include <QStringListModel> | ||||||
| #include <QGraphicsProxyWidget> |  | ||||||
| #include <QListView> | #include <QListView> | ||||||
| #include <QDesktopWidget> |  | ||||||
| #include <QModelIndex> | #include <QModelIndex> | ||||||
| #include <QSettings> | #include <QSettings> | ||||||
| #include "ui_diveplanner.h" |  | ||||||
| #include "mainwindow.h" |  | ||||||
| 
 | 
 | ||||||
| #define TIME_INITIAL_MAX 30 | #define TIME_INITIAL_MAX 30 | ||||||
| 
 | 
 | ||||||
|  | @ -196,7 +190,6 @@ void DivePlannerGraphics::keyDownAction() | ||||||
| 				plannerModel->editStop(row, dp); | 				plannerModel->editStop(row, dp); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		createDecoStops(); |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -244,7 +237,6 @@ void DivePlannerGraphics::keyLeftAction() | ||||||
| 			plannerModel->editStop(row, dp); | 			plannerModel->editStop(row, dp); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	createDecoStops(); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void DivePlannerGraphics::keyRightAction() | void DivePlannerGraphics::keyRightAction() | ||||||
|  | @ -272,7 +264,7 @@ void DivePlannerGraphics::keyRightAction() | ||||||
| 			dp.time += 60; | 			dp.time += 60; | ||||||
| 			plannerModel->editStop(row, dp); | 			plannerModel->editStop(row, dp); | ||||||
| 		} | 		} | ||||||
| 	}	createDecoStops(); | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void DivePlannerGraphics::keyDeleteAction() | void DivePlannerGraphics::keyDeleteAction() | ||||||
|  | @ -286,7 +278,6 @@ void DivePlannerGraphics::keyDeleteAction() | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		plannerModel->removeSelectedPoints(selectedIndexes); | 		plannerModel->removeSelectedPoints(selectedIndexes); | ||||||
| 		createDecoStops(); |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -324,7 +315,6 @@ void DivePlannerGraphics::keyEscAction() | ||||||
| 		scene()->clearSelection(); | 		scene()->clearSelection(); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 
 |  | ||||||
| 	cancelPlan(); | 	cancelPlan(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -378,7 +368,6 @@ void DivePlannerGraphics::decreaseDepth() | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 |  | ||||||
| 	depthLine->setMaximum(depthLine->maximum() - 10); | 	depthLine->setMaximum(depthLine->maximum() - 10); | ||||||
| 	depthLine->updateTicks(); | 	depthLine->updateTicks(); | ||||||
| 	createDecoStops(); | 	createDecoStops(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue