[qet] [3388] Remove action : save current diagram

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3388
Author:   blacksun
Date:     2014-10-21 01:06:32 +0200 (Tue, 21 Oct 2014)
Log Message:
-----------
Remove action : save current diagram

Modified Paths:
--------------
    trunk/sources/projectview.cpp
    trunk/sources/projectview.h
    trunk/sources/qetdiagrameditor.cpp
    trunk/sources/qetdiagrameditor.h

Modified: trunk/sources/projectview.cpp
===================================================================
--- trunk/sources/projectview.cpp	2014-10-20 21:23:12 UTC (rev 3387)
+++ trunk/sources/projectview.cpp	2014-10-20 23:06:32 UTC (rev 3388)
@@ -586,14 +586,6 @@
 }
 
 /**
-	Save the current diagram.
-	@return A QETResult object reflecting the situation.
-*/
-QETResult ProjectView::saveCurrentDiagram() {
-	return(doSave(CurrentDiagram));
-}
-
-/**
 	Save project content according to \a options, then write the project file. May
 	call saveAs if no filepath was provided before.
 	@param options May be used to specify what should be saved (e.g. modified

Modified: trunk/sources/projectview.h
===================================================================
--- trunk/sources/projectview.h	2014-10-20 21:23:12 UTC (rev 3387)
+++ trunk/sources/projectview.h	2014-10-20 23:06:32 UTC (rev 3388)
@@ -78,7 +78,6 @@
 	void exportProject();
 	QETResult save();
 	QETResult saveAs(ProjectSaveOptions = ProjectSaveOptions(AllDiagrams | ModifiedDiagramsOnly));
-	QETResult saveCurrentDiagram();
 	QETResult doSave(ProjectSaveOptions);
 	void saveDiagrams(const QList<Diagram *> &);
 	int cleanProject();

Modified: trunk/sources/qetdiagrameditor.cpp
===================================================================
--- trunk/sources/qetdiagrameditor.cpp	2014-10-20 21:23:12 UTC (rev 3387)
+++ trunk/sources/qetdiagrameditor.cpp	2014-10-20 23:06:32 UTC (rev 3388)
@@ -228,7 +228,6 @@
 	QAction *open_file = m_file_actions_group.addAction( QET::Icons::DocumentOpen,    tr("&Ouvrir")							  );
 	save_file          = m_file_actions_group.addAction( QET::Icons::DocumentSave,    tr("&Enregistrer")					  );
 	save_file_as       = m_file_actions_group.addAction( QET::Icons::DocumentSaveAs,  tr("Enregistrer sous")				  );
-	save_cur_diagram   = m_file_actions_group.addAction( QET::Icons::DocumentSaveAll, tr("&Enregistrer le sch\351ma courant") );
 	close_file         = m_file_actions_group.addAction( QET::Icons::DocumentClose,   tr("&Fermer")							  );
 
 	new_file   -> setShortcut( QKeySequence::New   );
@@ -241,11 +240,9 @@
 	close_file       -> setStatusTip( tr("Ferme le sch\351ma courant", "status bar tip")								 );
 	save_file        -> setStatusTip( tr("Enregistre le projet courant et tous ses sch\351mas", "status bar tip")		 );
 	save_file_as     -> setStatusTip( tr("Enregistre le project courant avec un autre nom de fichier", "status bar tip") );
-	save_cur_diagram -> setStatusTip( tr("Enregistre le sch\351ma courant du projet courant", "status bar tip")			 );
 
 	connect(save_file_as,     SIGNAL( triggered() ), this, SLOT( saveAs()			   ) );
 	connect(save_file,        SIGNAL( triggered() ), this, SLOT( save()				   ) );
-	connect(save_cur_diagram, SIGNAL( triggered() ), this, SLOT( saveCurrentDiagram()  ) );
 	connect(new_file,         SIGNAL( triggered() ), this, SLOT( newProject()		   ) );
 	connect(open_file,        SIGNAL( triggered() ), this, SLOT( openProject()		   ) );
 	connect(close_file,       SIGNAL( triggered() ), this, SLOT( closeCurrentProject() ) );
@@ -635,21 +632,6 @@
 }
 
 /**
-	Methode enregistrant tous les schemas.
-	@return true si l'enregistrement a reussi, false sinon
-*/
-void QETDiagramEditor::saveCurrentDiagram() {
-	if (ProjectView *project_view = currentProject()) {
-		QETResult save_file = project_view -> saveCurrentDiagram();
-		if (save_file.isOk()) {
-			QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
-		} else {
-			showError(save_file);
-		}
-	}
-}
-
-/**
  * @brief QETDiagramEditor::newProject
  * Create an empty project
  * @return
@@ -1147,7 +1129,6 @@
 	close_file        -> setEnabled(opened_project);
 	save_file         -> setEnabled(editable_project);
 	save_file_as      -> setEnabled(opened_project);
-	save_cur_diagram  -> setEnabled(editable_diagram);
 	prj_edit_prop     -> setEnabled(opened_project);
 	prj_add_diagram   -> setEnabled(editable_project);
 	//prj_add_diagram_foliolist   -> setEnabled(editable_project);

Modified: trunk/sources/qetdiagrameditor.h
===================================================================
--- trunk/sources/qetdiagrameditor.h	2014-10-20 21:23:12 UTC (rev 3387)
+++ trunk/sources/qetdiagrameditor.h	2014-10-20 23:06:32 UTC (rev 3388)
@@ -91,7 +91,6 @@
 	void exportDialog();
 	void save();
 	void saveAs();
-	void saveCurrentDiagram();
 	bool newProject();
 	bool openProject();
 	bool openRecentFile(const QString &);
@@ -220,7 +219,6 @@
 	QAction *close_file;			   ///< Close current project file
 	QAction *save_file;				   ///< Save current project
 	QAction *save_file_as;			   ///< Save current project as a specific file
-	QAction *save_cur_diagram;		   ///< Save current diagram of the current project only
 
 	private:
 	QMdiArea workspace;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/