|  | QElectroTech 0.100.0-dev
    | 
The QETApp class This class represents the QElectroTech application. More...
#include <qetapp.h>
Inherits QObject.

| Public Slots | |
| void | systray (QSystemTrayIcon::ActivationReason) | 
| QETApp::systray Manages QSystemTrayIcon related events. | |
| void | reduceEveryEditor () | 
| QETApp::reduceEveryEditor Minimizes all application windows in the systray. | |
| void | restoreEveryEditor () | 
| QETApp::restoreEveryEditor Restores all application windows in the systray. | |
| void | reduceDiagramEditors () | 
| QETApp::reduceDiagramEditors Minimize all schema editors in the systray. | |
| void | restoreDiagramEditors () | 
| QETApp::restoreDiagramEditors Restore all schema editors in the systray. | |
| void | reduceElementEditors () | 
| QETApp::reduceElementEditors Minimize all element editors in systray. | |
| void | restoreElementEditors () | 
| QETApp::restoreElementEditors Restore all element editors in the systray. | |
| void | reduceTitleBlockTemplateEditors () | 
| QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors. | |
| void | restoreTitleBlockTemplateEditors () | 
| QETApp::restoreTitleBlockTemplateEditors Restore all known template editors. | |
| void | newDiagramEditor () | 
| QETApp::newDiagramEditor launches a new schema editor. | |
| void | newElementEditor () | 
| QETApp::newElementEditor launches a new element editor. | |
| bool | closeEveryEditor () | 
| QETApp::closeEveryEditor Close all editors. | |
| void | setMainWindowVisible (QMainWindow *, bool) | 
| QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors) | |
| void | invertMainWindowVisibility (QWidget *) | 
| QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hidden or hides it if it is displayed. | |
| void | useSystemPalette (bool) | 
| QETApp::useSystemPalette Change the application palette. | |
| void | quitQET () | 
| QETApp::quitQET Request the closing of all windows; if the user accepts them, the application quits. | |
| void | checkRemainingWindows () | 
| QETApp::checkRemainingWindows Check if there are any windows (hidden or not) and exit if there are no more. | |
| void | openFiles (const QETArguments &) | 
| QETApp::openFiles Open files passed as arguments. | |
| void | openProjectFiles (const QStringList &) | 
| QETApp::openProjectFiles Opens a list of files. Files are opened in the first visible schematic editor. Otherwise, the first existing schema editor becomes visible and is uses. If there is no schematic editor open, a new one is created and uses. | |
| void | openElementFiles (const QStringList &) | 
| QETApp::openElementFiles Open the elements files passed in parameter. If an element is already open, the window which edits it is activated. | |
| void | openElementLocations (const QList< ElementsLocation > &) | 
| QETApp::openElementLocations Open the elements whose location is passed in parameter. If an element is already open, the window which is edited is active. | |
| void | openTitleBlockTemplate (const TitleBlockTemplateLocation &, bool=false) | 
| QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template. | |
| void | openTitleBlockTemplate (const QString &) | 
| QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template. | |
| void | openTitleBlockTemplateFiles (const QStringList &) | 
| QETApp::openTitleBlockTemplateFiles Open provided title block template files. If a title block template is already opened, the adequate window is activated. | |
| void | configureQET () | 
| QETApp::configureQET Allows the user to configure QET by launching an appropriate dialog. | |
| void | aboutQET () | 
| QETApp::aboutQET Open the dialog about qet. | |
| void | receiveMessage (int instanceId, QByteArray message) | 
| QETApp::receiveMessage openFiles from message. | |
| Public Member Functions | |
| QETApp () | |
| QETApp::QETApp. | |
| ~QETApp () override | |
| QETApp::~QETApp. | |
| void | setLanguage (const QString &) | 
| QETApp::setLanguage Change the language used by the application. | |
| void | switchLayout (Qt::LayoutDirection) | 
| Static Public Attributes | |
| static QString | lang_dir = QString() | 
| lang_dir Directory containing localization files. | |
| Private Member Functions | |
| QETApp (const QETApp &) | |
| template<class T > | |
| QList< T * > | detectWindows () const | 
| template<class T > | |
| void | setMainWindowsVisible (bool) | 
| QList< QWidget * > | floatingToolbarsAndDocksForMainWindow (QMainWindow *) const | 
| QETApp::floatingToolbarsAndDocksForMainWindow. | |
| void | parseArguments () | 
| QETApp::parseArguments Parse the following arguments: | |
| void | initSplashScreen () | 
| QETApp::initSplashScreen Initializes the splash screen if and only if the execution is interactive. Otherwise, the splash_screen_ attribute is 0. | |
| void | setSplashScreenStep (const QString &=QString()) | 
| QETApp::setSplashScreenStep Changes the text of the splash screen and takes events into account. If the application is running non-interactively, this method does nothing. | |
| void | initLanguage () | 
| QETApp::initLanguage Determine and apply the language to use for the application. | |
| void | initStyle () | 
| QETApp::initStyle Setup the gui style. | |
| void | initConfiguration () | 
| QETApp::initConfiguration Reads and takes into account the configuration of the application. This method will create, if necessary: | |
| void | initSystemTray () | 
| QETApp::initSystemTray Build the icon in the systray and its menu. | |
| void | buildSystemTrayMenu () | 
| QETApp::buildSystemTrayMenu builds the icon menu in the systray. | |
| void | checkBackupFiles () | 
| QETApp::checkBackupFiles Check for backup files. If backup was found, open a dialog and ask user what to do. | |
| void | fetchWindowStats (const QList< QETDiagramEditor * > &, const QList< QETElementEditor * > &, const QList< QETTitleBlockTemplateEditor * > &) | 
| QETApp::fetchWindowStats Updates the booleans concerning the state of the windows. | |
| template<class T > | |
| void | addWindowsListToMenu (QMenu *, const QList< T * > &) | 
| Static Private Member Functions | |
| static int | projectIdFromString (const QString &) | 
| QETApp::projectIdFromString. | |
| static QETProject * | projectFromString (const QString &) | 
| QETApp::projectFromString. | |
| Private Attributes | |
| QTranslator | qtTranslator | 
| QTranslator | qetTranslator | 
| QSystemTrayIcon * | m_qsti | 
| QSplashScreen * | m_splash_screen | 
| QMenu * | menu_systray | 
| QAction * | quitter_qet | 
| QAction * | reduce_appli | 
| QAction * | restore_appli | 
| QAction * | reduce_diagrams | 
| QAction * | restore_diagrams | 
| QAction * | reduce_elements | 
| QAction * | restore_elements | 
| QAction * | reduce_templates | 
| QAction * | restore_templates | 
| QAction * | new_diagram | 
| QAction * | new_element | 
| QHash< QMainWindow *, QByteArray > | window_geometries | 
| QHash< QMainWindow *, QByteArray > | window_states | 
| bool | every_editor_reduced | 
| bool | every_diagram_reduced | 
| bool | every_diagram_visible | 
| bool | every_element_reduced | 
| bool | every_element_visible | 
| bool | every_template_reduced | 
| bool | every_template_visible | 
| QSignalMapper | signal_map | 
| QETArguments | qet_arguments_ | 
| Command-line arguments parser. | |
| bool | non_interactive_execution_ | 
| non_interactive_execution_ Whether the application will end without any user interaction | |
| QPalette | initial_palette_ | 
| System color palette. | |
The QETApp class This class represents the QElectroTech application.
| QETApp::QETApp | ( | ) | 
| 
 | override | 
| 
 | private | 
| 
 | slot | 
| 
 | private | 
Add a list of windows to menu. This template function assumes it will be given a QList of pointers to objects inheriting the QMainWindow class. T the class inheriting QMainWindow
| menu | the menu windows will be added to | 
| windows | A list of top-level windows. | 
| 
 | static | 
QETApp::availableTitleBlockTemplatesCollections.


| 
 | private | 
QETApp::buildSystemTrayMenu builds the icon menu in the systray.


| 
 | private | 
QETApp::checkBackupFiles Check for backup files. If backup was found, open a dialog and ask user what to do.


| 
 | slot | 
QETApp::checkRemainingWindows Check if there are any windows (hidden or not) and exit if there are no more.


| 
 | slot | 
QETApp::closeEveryEditor Close all editors.


| 
 | static | 

| 
 | static | 

| 
 | static | 
QETApp::commonElementsDirN like QString QETApp::commonElementsDir but without "/" at the end.


| 
 | static | 
QETApp::commonTitleBlockTemplatesCollection.


| 
 | static | 
QETApp::commonTitleBlockTemplatesDir.

| 
 | static | 


| 
 | static | 
QETApp::companyElementsDirN like QString QETApp::companyElementsDir but without "/" at the end.


| 
 | static | 
QETApp::companyTitleBlockTemplatesCollection.


| 
 | static | 
QETApp::companyTitleBlockTemplatesDir.


| 
 | static | 
QETApp::configDir Return the QET configuration folder, i.e. the path to the folder in which QET will read configuration and customization information specific to the current user. This file is generally C:\Documents And Settings\user\Application Data\ qet on Windows and ~/.qet under UNIX-like systems.

| 
 | slot | 
QETApp::configureQET Allows the user to configure QET by launching an appropriate dialog.


| 
 | static | 
QETApp::createTextOrientationSpinBoxWidget Instantiates a QTextOrientationSpinBoxWidget and configures:


| 
 | static | 


| 
 | static | 
QETApp::customElementsDirN like QString QETApp::customElementsDir but without "/" at the end.


| 
 | static | 
QETApp::customTitleBlockTemplatesCollection.


| 
 | static | 
QETApp::customTitleBlockTemplatesDir.


| 
 | static | 
QETApp::defaultTitleBlockTemplate.


| 
 | private | 
| T | a class inheriting QMainWindow | 

| 
 | static | 
| project | 


| 
 | static | 
QETApp::diagramEditorAncestorOf.
| child | 


| 
 | static | 
| filepath | : A file path | 


| 
 | static | 


| 
 | static | 
QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9.
| size | : the size of font | 

| 
 | static | 
QETApp::diagramTextsItemFont the font for to use in independent text item.
| size | of font | 

| 
 | static | 
QETApp::dynamicTextsFont the default font of dynamic element text item.
| size | 


| 
 | static | 


| 
 | static | 
| project | : a project | 

| 
 | static | 

| 
 | private | 
QETApp::fetchWindowStats Updates the booleans concerning the state of the windows.
| diagrams | : QList<QETDiagramEditor *> | 
| elements | : QList<QETElementEditor *> | 
| tbtemplates | : QList<QETTitleBlockTemplateEditor *> | 

| 
 | private | 
QETApp::floatingToolbarsAndDocksForMainWindow.
| window | : window where you have to find the toolbars and floating dock | 

| 
 | static | 
QETApp::handledFileExtensions.

| 
 | static | 
| urls | : URLs list | 


| 
 | static | 
QETApp::indiTextsItemFont The default font to use for independent text item.
| size | 


| 
 | private | 
QETApp::initConfiguration Reads and takes into account the configuration of the application. This method will create, if necessary:


| 
 | private | 
QETApp::initLanguage Determine and apply the language to use for the application.


| 
 | private | 
QETApp::initSplashScreen Initializes the splash screen if and only if the execution is interactive. Otherwise, the splash_screen_ attribute is 0.


| 
 | private | 
QETApp::initStyle Setup the gui style.


| 
 | private | 
QETApp::initSystemTray Build the icon in the systray and its menu.


| 
 | static | 
| 
 | slot | 
QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hidden or hides it if it is displayed.
| window | : window to show / hide | 


| 
 | static | 

| 
 | static | 

| 
 | slot | 
| 
 | slot | 
| 
 | slot | 
QETApp::openElementFiles Open the elements files passed in parameter. If an element is already open, the window which edits it is activated.
| files_list | : Files to open | 


| 
 | slot | 
QETApp::openElementLocations Open the elements whose location is passed in parameter. If an element is already open, the window which is edited is active.
| locations_list | : Locations to open | 


| 
 | slot | 
QETApp::openFiles Open files passed as arguments.
| args | : Object containing arguments; the files | 


| 
 | slot | 
QETApp::openProjectFiles Opens a list of files. Files are opened in the first visible schematic editor. Otherwise, the first existing schema editor becomes visible and is uses. If there is no schematic editor open, a new one is created and uses.
| files_list | : Files to open | 


| 
 | slot | 
QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.
| filepath | Path of the .titleblock file to be opened | 
| 
 | slot | 
QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.
| location | location of the title block template to be edited | 
| duplicate | if true, the template is opened for duplication, which means the user will be prompter for a new template name. | 

| 
 | slot | 
QETApp::openTitleBlockTemplateFiles Open provided title block template files. If a title block template is already opened, the adequate window is activated.
| files_list | Files to be opened | 


| 
 | static | 
QETApp::overrideLangDir Redefines the path of the folder containing the language files.
| new_ld | : New path of the folder containing the language files | 

| 
 | private | 
QETApp::parseArguments Parse the following arguments:
The other arguments are normally file paths. If they exist, they are just stored in the arguments_files_ attribute. Otherwise, they are stored in the arguments_options_ attribute.


| 
 | static | 
QETApp::printHelp Display help and usage on standard output.

| 
 | static | 
QETApp::printLicense Display license on standard output.


| 
 | static | 
QETApp::printVersion Print version to standard output.


| 
 | static | 
| id | : Id of the desired project | 

| 
 | staticprivate | 
| url | The location of a collection item (title block template, element, category, ...). | 


| 
 | static | 
| project | : Project whose id we want to retrieve | 


| 
 | staticprivate | 
| url | The location of a collection item (title block template, element, category, ...). | 

| 
 | static | 

| 
 | slot | 
QETApp::quitQET Request the closing of all windows; if the user accepts them, the application quits.


| 
 | static | 
QETApp::realPath Allows you to know the absolute path of the * .elmt file corresponding to a symbolic path (of the type custom: // tools_pervers / sado_maso / contact_bizarre)
| sym_path | Character string representing the absolute path of the file | 


| 
 | slot | 
QETApp::receiveMessage openFiles from message.
| instanceId | Q_UNUSED | 
| message | 


| 
 | slot | 
QETApp::reduceDiagramEditors Minimize all schema editors in the systray.

| 
 | slot | 
QETApp::reduceElementEditors Minimize all element editors in systray.

| 
 | slot | 
QETApp::reduceEveryEditor Minimizes all application windows in the systray.


| 
 | slot | 
QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors.

| 
 | static | 

| 
 | static | 
| project | : Project to register with the application | 


| 
 | static | 
QETApp::resetCollectionsPath Reset the path of the user and common element collection and also the user titleblock path. Use this function when one of these three path change.

| 
 | slot | 
QETApp::restoreDiagramEditors Restore all schema editors in the systray.

| 
 | slot | 
QETApp::restoreElementEditors Restore all element editors in the systray.

| 
 | slot | 
QETApp::restoreEveryEditor Restores all application windows in the systray.


| 
 | slot | 
QETApp::restoreTitleBlockTemplateEditors Restore all known template editors.

| void QETApp::setLanguage | ( | const QString & | desired_language | ) | 
QETApp::setLanguage Change the language used by the application.
| desired_language | : wanted language | 


| 
 | private | 
T a class inheriting QMainWindow
| visible | whether detected main windows should be visible | 

| 
 | slot | 
QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors)
| window | : window to show / hide | 
| visible | : true to display the window, false otherwise | 


| 
 | private | 
QETApp::setSplashScreenStep Changes the text of the splash screen and takes events into account. If the application is running non-interactively, this method does nothing.
| message | : the text of the splash screen | 

| void QETApp::switchLayout | ( | Qt::LayoutDirection | direction | ) | 
Switches the application to the provided layout.

| 
 | static | 
QETApp::symbolicPath Build the symbolic path (of the type custom: // tools_pervers / sado_maso / contact_bizarre) corresponding to a file.
| real_path | : Character string representing the symbolic path of the file | 

| 
 | slot | 
QETApp::systray Manages QSystemTrayIcon related events.
| reason | : reason an integer representing the event on the systray | 


| 
 | static | 
QETApp::titleBlockTemplateEditors.


| 
 | static | 
QETApp::titleBlockTemplateEditors.
| project | Opened project object. | 

| 
 | static | 
QETApp::titleBlockTemplatesCollection.
| protocol | Protocol string | 


| 
 | static | 
QETApp::unregisterProject Cancel the recording of the project project.
| project | : Project to be unregistered | 


| 
 | slot | 
QETApp::useSystemPalette Change the application palette.
| use | : true to use the system colors, false to use those of the current theme | 


| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
System color palette.
| 
 | static | 
lang_dir Directory containing localization files.
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | private | 
| 
 | private | 
| 
 | staticprivate | 
| 
 | staticprivate | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | staticprivate | 
| 
 | private | 
non_interactive_execution_ Whether the application will end without any user interaction
| 
 | private | 
Command-line arguments parser.
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | staticprivate | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private |