mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Restore commit 4476
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4478 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1524,6 +1524,34 @@ ProjectView *QETDiagramEditor::viewForFile(const QString &filepath) const {
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETDiagramEditor::acessCurrentProject
|
||||
* Retrieve current Project open in diagram editor
|
||||
*/
|
||||
ProjectView *QETDiagramEditor::acessCurrentProject (){
|
||||
QMdiSubWindow *current_window = workspace.activeSubWindow();
|
||||
if (!current_window) return(0);
|
||||
|
||||
QWidget *current_widget = current_window -> widget();
|
||||
if (!current_widget) return(0);
|
||||
|
||||
if (ProjectView *project_view = qobject_cast<ProjectView *>(current_widget)) {
|
||||
return(project_view);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETDiagramEditor::acessCurrentDiagramView
|
||||
* Retrieve current DiagramView used in diagram editor
|
||||
*/
|
||||
DiagramView *QETDiagramEditor::acessCurrentDiagramView () {
|
||||
if (ProjectView *project_view = currentProject()) {
|
||||
return(project_view -> currentDiagram());
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
met a jour le menu "Fenetres"
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user