mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
Remove unused code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3544 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -624,56 +624,44 @@ void QETDiagramEditor::exportDialog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Methode enregistrant le schema dans le dernier nom de fichier connu.
|
* @brief QETDiagramEditor::save
|
||||||
@return true si l'enregistrement a reussi, false sinon
|
* Ask the current active project to save
|
||||||
*/
|
*/
|
||||||
void QETDiagramEditor::save() {
|
void QETDiagramEditor::save() {
|
||||||
if (ProjectView *project_view = currentProject()) {
|
if (ProjectView *project_view = currentProject()) {
|
||||||
QETResult saved = project_view -> save();
|
QETResult saved = project_view -> save();
|
||||||
|
|
||||||
if (saved.isOk()) {
|
if (saved.isOk()) {
|
||||||
save_file->setDisabled(true);
|
save_file -> setDisabled(true);
|
||||||
QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
|
QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
|
||||||
//fake progressbar
|
|
||||||
progressBar = new QProgressBar;
|
|
||||||
progressBar -> setAlignment(Qt::AlignLeft);
|
|
||||||
progressBar -> setMaximumSize(180, 19);
|
|
||||||
statusBar()-> addPermanentWidget(progressBar);
|
|
||||||
progressBar -> setFormat(tr("Enregistrement : %p%", "Visual rendering of write files - %p is the progress percentage"));
|
|
||||||
progressBar -> setValue(100);
|
|
||||||
QTimer::singleShot(2000, progressBar, SLOT(hide()));
|
|
||||||
QString title = (project_view -> project() -> title ());
|
QString title = (project_view -> project() -> title ());
|
||||||
if (title.isEmpty()) title = "QElectroTech ";
|
if (title.isEmpty()) title = "QElectroTech ";
|
||||||
QString filePath = (project_view -> project() -> filePath ());
|
QString filePath = (project_view -> project() -> filePath ());
|
||||||
statusBar()-> showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000);
|
statusBar()-> showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
showError(saved);
|
showError(saved);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Cette methode demande un nom de fichier a l'utilisateur pour enregistrer le schema
|
* @brief QETDiagramEditor::saveAs
|
||||||
@return true si l'enregistrement a reussi, false sinon
|
* Ask the current active project to save as
|
||||||
*/
|
*/
|
||||||
void QETDiagramEditor::saveAs() {
|
void QETDiagramEditor::saveAs() {
|
||||||
if (ProjectView *project_view = currentProject()) {
|
if (ProjectView *project_view = currentProject()) {
|
||||||
QETResult save_file = project_view -> saveAs();
|
QETResult save_file = project_view -> saveAs();
|
||||||
if (save_file.isOk()) {
|
if (save_file.isOk()) {
|
||||||
QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
|
QETApp::projectsRecentFiles() -> fileWasOpened(project_view -> project() -> filePath());
|
||||||
//fake progressbar
|
|
||||||
progressBar = new QProgressBar;
|
|
||||||
progressBar -> setAlignment(Qt::AlignLeft);
|
|
||||||
progressBar -> setMaximumSize(180, 19);
|
|
||||||
statusBar()-> addPermanentWidget(progressBar);
|
|
||||||
progressBar -> setFormat(tr("Enregistrement : %p%", "Visual rendering of write files - %p is the progress percentage"));
|
|
||||||
progressBar -> setValue(100);
|
|
||||||
QTimer::singleShot(2000, progressBar, SLOT(hide()));
|
|
||||||
QString title = (project_view -> project() -> title ());
|
QString title = (project_view -> project() -> title ());
|
||||||
if (title.isEmpty()) title = "QElectroTech ";
|
if (title.isEmpty()) title = "QElectroTech ";
|
||||||
QString filePath = (project_view -> project() -> filePath ());
|
QString filePath = (project_view -> project() -> filePath ());
|
||||||
|
|
||||||
statusBar()->showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000);
|
statusBar()->showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
showError(save_file);
|
showError(save_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1745,7 +1733,7 @@ void QETDiagramEditor::addDiagramToProject() {
|
|||||||
*/
|
*/
|
||||||
void QETDiagramEditor::addDiagramFolioListToProject() {
|
void QETDiagramEditor::addDiagramFolioListToProject() {
|
||||||
if (ProjectView *current_project = currentProject())
|
if (ProjectView *current_project = currentProject())
|
||||||
current_project -> addNewDiagramFolioList();
|
current_project -> addNewDiagramFolioList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user