The ProjectView class This class provides a widget displaying the diagrams of a particular project using tabs.
More...
#include <projectview.h>
Inherits QWidget.
The ProjectView class This class provides a widget displaying the diagrams of a particular project using tabs.
◆ ProjectView() [1/2]
ProjectView::ProjectView |
( |
QETProject * |
project, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
Constructeur
- Parameters
-
project | projet a visualiser |
parent | Widget parent |
◆ ~ProjectView()
ProjectView::~ProjectView |
( |
| ) |
|
|
override |
◆ ProjectView() [2/2]
◆ adjustReadOnlyState
void ProjectView::adjustReadOnlyState |
( |
| ) |
|
|
privateslot |
Effectue les actions necessaires lorsque le projet visualise entre ou sort du mode lecture seule.
◆ askUserForFilePath()
QString ProjectView::askUserForFilePath |
( |
bool |
assign = true | ) |
|
|
private |
Ask the user to provide a file path in which the currently edited project will be saved.
- Parameters
-
assign | When true, assign the provided filepath to the project through setFilePath(). Defaults to true. |
- Returns
- the file path, or an empty string if none were provided
◆ changeFirstTab()
void ProjectView::changeFirstTab |
( |
| ) |
|
change current diagramview to first tab
◆ changeLastTab()
void ProjectView::changeLastTab |
( |
| ) |
|
change current diagramview to last tab
◆ changeTabDown()
void ProjectView::changeTabDown |
( |
| ) |
|
change current diagramview to next folio
◆ changeTabUp()
void ProjectView::changeTabUp |
( |
| ) |
|
change current diagramview to previous tab
◆ cleanProject
int ProjectView::cleanProject |
( |
| ) |
|
|
slot |
Allow the user to clean the project, which includes: deleting unused title block templates deleting unused elements deleting empty categories
- Returns
- an integer value above zero if elements and/or categories were cleaned.
◆ closeEvent()
void ProjectView::closeEvent |
( |
QCloseEvent * |
qce | ) |
|
|
override |
Gere la fermeture du schema.
- Parameters
-
qce | Le QCloseEvent decrivant l'evenement |
◆ currentDiagram()
◆ diagram_views()
QList< DiagramView * > ProjectView::diagram_views |
( |
| ) |
const |
- Returns
- la liste des schemas ouverts dans le projet
◆ diagramActivated
◆ diagramAdded [1/2]
void ProjectView::diagramAdded |
( |
Diagram * |
diagram | ) |
|
|
privateslot |
◆ diagramAdded [2/2]
◆ diagramRemoved
◆ doSave
Save project content, then write the project file. May call saveAs if no filepath was provided before.
- Returns
- a QETResult object reflecting the situation; note that a valid QETResult object is returned if the operation was cancelled.
◆ editCurrentDiagramProperties
void ProjectView::editCurrentDiagramProperties |
( |
| ) |
|
|
slot |
Edite les proprietes du schema courant
◆ editDiagramProperties [1/2]
void ProjectView::editDiagramProperties |
( |
Diagram * |
diagram | ) |
|
|
slot |
Edite les proprietes du schema diagram
◆ editDiagramProperties [2/2]
void ProjectView::editDiagramProperties |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
Edite les proprietes du schema diagram_view
◆ editProjectProperties
void ProjectView::editProjectProperties |
( |
| ) |
|
|
slot |
Enable the user to edit properties of the current project through a configuration dialog.
◆ errorEncountered
void ProjectView::errorEncountered |
( |
const QString & |
| ) |
|
|
signal |
◆ exportProject
void ProjectView::exportProject |
( |
| ) |
|
|
slot |
◆ findDiagram()
- Parameters
-
- Returns
- le DiagramView correspondant au schema passe en parametre, ou 0 si le schema n'est pas trouve
◆ findElementRequired
◆ firstDiagram()
- Returns
- first folio of current project
◆ initActions()
void ProjectView::initActions |
( |
| ) |
|
|
private |
Initialize actions for this widget.
◆ initLayout()
void ProjectView::initLayout |
( |
| ) |
|
|
private |
Initialize layout for this widget.
◆ initWidgets()
void ProjectView::initWidgets |
( |
| ) |
|
|
private |
Initialize child widgets for this widget.
◆ lastDiagram()
- Returns
- last folio of current project
◆ loadDiagrams()
void ProjectView::loadDiagrams |
( |
| ) |
|
|
private |
ProjectView::loadDiagrams Load diagrams of project. We create a diagram view for each diagram, and add it to the project view.
◆ moveDiagramDown [1/2]
void ProjectView::moveDiagramDown |
( |
Diagram * |
diagram | ) |
|
|
slot |
Deplace le schema diagram vers le bas / la droite
◆ moveDiagramDown [2/2]
void ProjectView::moveDiagramDown |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
Deplace le schema diagram_view vers le bas / la droite
◆ moveDiagramDownx10 [1/2]
void ProjectView::moveDiagramDownx10 |
( |
Diagram * |
diagram | ) |
|
|
slot |
Deplace le schema diagram vers le bas / la droite x10
◆ moveDiagramDownx10 [2/2]
void ProjectView::moveDiagramDownx10 |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
Deplace le schema diagram_view vers le bas / la droite x10
◆ moveDiagramUp [1/2]
void ProjectView::moveDiagramUp |
( |
Diagram * |
diagram | ) |
|
|
slot |
Deplace le schema diagram vers le haut / la gauche
◆ moveDiagramUp [2/2]
void ProjectView::moveDiagramUp |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
Deplace le schema diagram_view vers le haut / la gauche
◆ moveDiagramUpTop [1/2]
void ProjectView::moveDiagramUpTop |
( |
Diagram * |
diagram | ) |
|
|
slot |
◆ moveDiagramUpTop [2/2]
void ProjectView::moveDiagramUpTop |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
◆ moveDiagramUpx10 [1/2]
void ProjectView::moveDiagramUpx10 |
( |
Diagram * |
diagram | ) |
|
|
slot |
Deplace le schema diagram vers le haut / la gauche x10
◆ moveDiagramUpx10 [2/2]
void ProjectView::moveDiagramUpx10 |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
Deplace le schema diagram_view vers le haut / la gauche x10
◆ nextDiagram()
- Returns
- next folio of current diagramview
◆ noProjectResult()
QETResult ProjectView::noProjectResult |
( |
| ) |
const |
|
private |
- Returns
- the QETResult object to be returned when it appears this project view is not associated to any project.
◆ previousDiagram()
- Returns
- previous folio of current diagramview
◆ project()
- Returns
- le projet actuellement visualise par le ProjectView
◆ projectClosed
◆ rebuildDiagramsMap()
void ProjectView::rebuildDiagramsMap |
( |
| ) |
|
|
private |
Reconstruit la map associant les index des onglets avec les DiagramView
◆ removeDiagram [1/2]
void ProjectView::removeDiagram |
( |
Diagram * |
diagram | ) |
|
|
slot |
◆ removeDiagram [2/2]
void ProjectView::removeDiagram |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
◆ save
Save project properties along with all modified diagrams.
- See also
- filePath()
-
setFilePath()
- Returns
- a QETResult object reflecting the situation
◆ saveAs
Ask users for a filepath in order to save the project.
- Parameters
-
options | May be used to specify what should be saved; defaults to all modified diagrams. |
- Returns
- a QETResult object reflecting the situation; note that a valid QETResult object is returned if the operation was cancelled.
◆ setDisplayFallbackWidget
void ProjectView::setDisplayFallbackWidget |
( |
bool |
fallback | ) |
|
|
privateslot |
- Parameters
-
fallback | true pour afficher le widget de fallback, false pour afficher les onglets. Le widget de Fallback est le widget affiche lorsque le projet ne comporte aucun schema. |
◆ setProject()
void ProjectView::setProject |
( |
QETProject * |
project | ) |
|
|
private |
◆ showDiagram [1/2]
void ProjectView::showDiagram |
( |
Diagram * |
diagram | ) |
|
|
slot |
Active l'onglet adequat pour afficher le schema passe en parametre
- Parameters
-
◆ showDiagram [2/2]
Active l'onglet adequat pour afficher le schema passe en parametre
- Parameters
-
◆ tabChanged
void ProjectView::tabChanged |
( |
int |
tab_id | ) |
|
|
privateslot |
ProjectView::tabChanged Manage the tab change. If tab_id == -1 (there is no diagram opened), we display the fallback widget.
- Parameters
-
◆ tabDoubleClicked
void ProjectView::tabDoubleClicked |
( |
int |
tab_id | ) |
|
|
privateslot |
Gere le double-clic sur un onglet : edite les proprietes du schema
- Parameters
-
tab_id | Index de l'onglet concerne |
◆ tabMoved
void ProjectView::tabMoved |
( |
int |
from, |
|
|
int |
to |
|
) |
| |
|
slot |
- Parameters
-
from | Index de l'onglet avant le deplacement |
to | Index de l'onglet apres le deplacement |
◆ tryClosing()
bool ProjectView::tryClosing |
( |
| ) |
|
|
private |
Cette methode essaye de fermer successivement les editeurs d'element puis les schemas du projet. L'utilisateur peut refuser de fermer un schema ou un editeur.
- Returns
- true si tout a pu etre ferme, false sinon
- See also
- tryClosingElementEditors()
-
tryClosingDiagrams()
◆ tryClosingDiagrams()
int ProjectView::tryClosingDiagrams |
( |
| ) |
|
|
private |
ProjectView::tryClosingDiagrams try to close this project, if diagram or project option are changed a dialog ask if user want to save the modification.
- Returns
- the answer of dialog or discard if no change.
◆ tryClosingElementEditors()
bool ProjectView::tryClosingElementEditors |
( |
| ) |
|
|
private |
Un projet comporte des elements integres. Cette methode ferme les editeurs d'elements associes a ce projet. L'utilisateur peut refuser la fermeture d'un editeur d'element.
- Returns
- true si tous les editeurs d'element ont pu etre fermes, false sinon
◆ updateAllTabsTitle
void ProjectView::updateAllTabsTitle |
( |
| ) |
|
|
slot |
◆ updateTabTitle
void ProjectView::updateTabTitle |
( |
DiagramView * |
diagram_view | ) |
|
|
slot |
◆ updateWindowTitle
void ProjectView::updateWindowTitle |
( |
| ) |
|
|
slot |
◆ fallback_label_
QLabel* ProjectView::fallback_label_ |
|
private |
◆ fallback_widget_
QWidget* ProjectView::fallback_widget_ |
|
private |
◆ layout_
QVBoxLayout* ProjectView::layout_ |
|
private |
◆ m_add_new_diagram
QAction* ProjectView::m_add_new_diagram |
|
private |
◆ m_diagram_ids
◆ m_diagram_view_list
◆ m_end_view
QAction * ProjectView::m_end_view |
|
private |
◆ m_first_view
QAction * ProjectView::m_first_view |
|
private |
◆ m_previous_tab_index
int ProjectView::m_previous_tab_index = -1 |
|
private |
◆ m_project
◆ m_tab
QTabWidget* ProjectView::m_tab |
|
private |
The documentation for this class was generated from the following files: