Remove action : save current diagram

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3388 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun 2014-10-20 23:06:32 +00:00
parent a4461fd1ba
commit ee4208329d
4 changed files with 0 additions and 30 deletions

View File

@ -585,14 +585,6 @@ QETResult ProjectView::saveAs(ProjectSaveOptions options) {
return(doSave(options));
}
/**
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.

View File

@ -78,7 +78,6 @@ class ProjectView : public QWidget {
void exportProject();
QETResult save();
QETResult saveAs(ProjectSaveOptions = ProjectSaveOptions(AllDiagrams | ModifiedDiagramsOnly));
QETResult saveCurrentDiagram();
QETResult doSave(ProjectSaveOptions);
void saveDiagrams(const QList<Diagram *> &);
int cleanProject();

View File

@ -228,7 +228,6 @@ void QETDiagramEditor::actions() {
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 @@ void QETDiagramEditor::actions() {
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() ) );
@ -634,21 +631,6 @@ void QETDiagramEditor::saveAs() {
}
}
/**
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
@ -1147,7 +1129,6 @@ void QETDiagramEditor::slot_updateActions() {
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);

View File

@ -91,7 +91,6 @@ class QETDiagramEditor : public QETMainWindow {
void exportDialog();
void save();
void saveAs();
void saveCurrentDiagram();
bool newProject();
bool openProject();
bool openRecentFile(const QString &);
@ -220,7 +219,6 @@ class QETDiagramEditor : public QETMainWindow {
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;