QElectroTech  0.8-dev
Public Slots | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QETApp Class Reference

The QETApp class This class represents the QElectroTech application. More...

#include <qetapp.h>

Inherits QObject.

Collaboration diagram for QETApp:
Collaboration graph

Public Slots

void systray (QSystemTrayIcon::ActivationReason)
 QETApp::systray Manages QSystemTrayIcon related events. More...
 
void reduceEveryEditor ()
 QETApp::reduceEveryEditor Minimizes all application windows in the systray. More...
 
void restoreEveryEditor ()
 QETApp::restoreEveryEditor Restores all application windows in the systray. More...
 
void reduceDiagramEditors ()
 QETApp::reduceDiagramEditors Minimize all schema editors in the systray. More...
 
void restoreDiagramEditors ()
 QETApp::restoreDiagramEditors Restore all schema editors in the systray. More...
 
void reduceElementEditors ()
 QETApp::reduceElementEditors Minimize all element editors in systray. More...
 
void restoreElementEditors ()
 QETApp::restoreElementEditors Restore all element editors in the systray. More...
 
void reduceTitleBlockTemplateEditors ()
 QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors. More...
 
void restoreTitleBlockTemplateEditors ()
 QETApp::restoreTitleBlockTemplateEditors Restore all known template editors. More...
 
void newDiagramEditor ()
 QETApp::newDiagramEditor launches a new schema editor. More...
 
void newElementEditor ()
 QETApp::newElementEditor launches a new element editor. More...
 
bool closeEveryEditor ()
 QETApp::closeEveryEditor Close all editors. More...
 
void setMainWindowVisible (QMainWindow *, bool)
 QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors) More...
 
void invertMainWindowVisibility (QWidget *)
 QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hidden or hides it if it is displayed. More...
 
void useSystemPalette (bool)
 QETApp::useSystemPalette Change the application palette. More...
 
void quitQET ()
 QETApp::quitQET Request the closing of all windows; if the user accepts them, the application quits. More...
 
void checkRemainingWindows ()
 QETApp::checkRemainingWindows Check if there are any windows (hidden or not) and exit if there are no more. More...
 
void openFiles (const QETArguments &)
 QETApp::openFiles Open files passed as arguments. More...
 
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. More...
 
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. More...
 
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. More...
 
void openTitleBlockTemplate (const TitleBlockTemplateLocation &, bool=false)
 QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template. More...
 
void openTitleBlockTemplate (const QString &)
 QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template. More...
 
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. More...
 
void configureQET ()
 QETApp::configureQET Allows the user to configure QET by launching an appropriate dialog. More...
 
void aboutQET ()
 QETApp::aboutQET Open the dialog about qet. More...
 
void receiveMessage (int instanceId, QByteArray message)
 QETApp::receiveMessage openFiles from message. More...
 

Public Member Functions

 QETApp ()
 QETApp::QETApp. More...
 
 ~QETApp () override
 QETApp::~QETApp. More...
 
void setLanguage (const QString &)
 QETApp::setLanguage Change the language used by the application. More...
 
void switchLayout (Qt::LayoutDirection)
 

Static Public Member Functions

static QETAppinstance ()
 QETApp::instance. More...
 
static QString langFromSetting ()
 QETApp::langFromSetting. More...
 
static void printHelp ()
 QETApp::printHelp Display help and usage on standard output. More...
 
static void printVersion ()
 QETApp::printVersion Print version to standard output. More...
 
static void printLicense ()
 QETApp::printLicense Display license on standard output. More...
 
static ElementsCollectionCachecollectionCache ()
 QETApp::collectionCache. More...
 
static QStringList elementInfoKeys ()
 QETApp::elementInfoKeys. More...
 
static QString elementTranslatedInfoKey (const QString &)
 ElementsProperties::translatedInfo Return the translated information key given by info If info don't match, return an empty string. More...
 
static QString elementInfoToVar (const QString &info)
 QETApp::elementInfoToVar. More...
 
static QStringList conductorInfoKeys ()
 QETApp::conductorInfoKeys. More...
 
static QString conductorTranslatedInfoKey (const QString &key)
 QETApp::conductorTranslatedInfoKey. More...
 
static QStringList diagramInfoKeys ()
 QETApp::diagramInfoKeys. More...
 
static QString diagramTranslatedInfoKey (const QString &key)
 QETApp::diagramTranslatedInfoKey. More...
 
static TitleBlockTemplatesFilesCollectioncommonTitleBlockTemplatesCollection ()
 QETApp::commonTitleBlockTemplatesCollection. More...
 
static TitleBlockTemplatesFilesCollectioncustomTitleBlockTemplatesCollection ()
 QETApp::customTitleBlockTemplatesCollection. More...
 
static QList< TitleBlockTemplatesCollection * > availableTitleBlockTemplatesCollections ()
 QETApp::availableTitleBlockTemplatesCollections. More...
 
static TitleBlockTemplatesCollectiontitleBlockTemplatesCollection (const QString &)
 QETApp::titleBlockTemplatesCollection. More...
 
static QString commonElementsDir ()
 QETApp::commonElementsDir. More...
 
static QString customElementsDir ()
 QETApp::customElementsDir. More...
 
static QString commonElementsDirN ()
 QETApp::commonElementsDirN like QString QETApp::commonElementsDir but without "/" at the end. More...
 
static QString customElementsDirN ()
 QETApp::customElementsDirN like QString QETApp::customElementsDir but without "/" at the end. More...
 
static void resetUserElementsDir ()
 QETApp::resetUserElementsDir Reset the path of the user common and custom elements dir. Use this function when the user path (common and/or custom) change. More...
 
static QString commonTitleBlockTemplatesDir ()
 QETApp::commonTitleBlockTemplatesDir. More...
 
static QString customTitleBlockTemplatesDir ()
 QETApp::customTitleBlockTemplatesDir. More...
 
static bool registerProject (QETProject *)
 QETApp::registerProject. More...
 
static bool unregisterProject (QETProject *)
 QETApp::unregisterProject Cancel the recording of the project project. More...
 
static QMap< uint, QETProject * > registeredProjects ()
 QETApp::registeredProjects. More...
 
static QETProjectproject (const uint &)
 QETApp::project. More...
 
static int projectId (const QETProject *)
 QETApp::projectId. More...
 
static QString configDir ()
 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. More...
 
static QString languagesPath ()
 QETApp::languagesPath. More...
 
static QString realPath (const QString &)
 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) More...
 
static QString symbolicPath (const QString &)
 QETApp::symbolicPath Build the symbolic path (of the type custom: // tools_pervers / sado_maso / contact_bizarre) corresponding to a file. More...
 
static QStringList handledFileExtensions ()
 QETApp::handledFileExtensions. More...
 
static QStringList handledFiles (const QList< QUrl > &)
 QETApp::handledFiles. More...
 
static RecentFilesprojectsRecentFiles ()
 QETApp::projectsRecentFiles. More...
 
static RecentFileselementsRecentFiles ()
 QETApp::elementsRecentFiles. More...
 
static void overrideLangDir (const QString &)
 QETApp::overrideLangDir Redefines the path of the folder containing the language files. More...
 
static QFont diagramTextsFont (qreal=-1.0)
 QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9. More...
 
static QFont diagramTextsItemFont (qreal=-1.0)
 QETApp::diagramTextsItemFont the font for to use in independent text item. More...
 
static QFont dynamicTextsItemFont (qreal=-1.0)
 QETApp::dynamicTextsFont the default font of dynamic element text item. More...
 
static QFont indiTextsItemFont (qreal=-1.0)
 QETApp::indiTextsItemFont The default font to use for independent text item. More...
 
static QETDiagramEditordiagramEditorForFile (const QString &)
 QETApp::diagramEditorForFile. More...
 
static QETDiagramEditordiagramEditorAncestorOf (const QWidget *child)
 QETApp::diagramEditorAncestorOf. More...
 
static QList< QETDiagramEditor * > diagramEditors ()
 QETApp::diagramEditors. More...
 
static QList< QETElementEditor * > elementEditors ()
 QETApp::elementEditors. More...
 
static QList< QETElementEditor * > elementEditors (QETProject *)
 QETApp::elementEditors. More...
 
static QList< QETTitleBlockTemplateEditor * > titleBlockTemplateEditors ()
 QETApp::titleBlockTemplateEditors. More...
 
static QList< QETTitleBlockTemplateEditor * > titleBlockTemplateEditors (QETProject *)
 QETApp::titleBlockTemplateEditors. More...
 
static QTextOrientationSpinBoxWidgetcreateTextOrientationSpinBoxWidget ()
 QETApp::createTextOrientationSpinBoxWidget Instantiates a QTextOrientationSpinBoxWidget and configures: More...
 
static TitleBlockTemplatedefaultTitleBlockTemplate ()
 QETApp::defaultTitleBlockTemplate. More...
 

Static Public Attributes

static QString lang_dir = QString()
 lang_dir Directory containing localization files. More...
 

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. More...
 
void parseArguments ()
 QETApp::parseArguments Parse the following arguments: More...
 
void initSplashScreen ()
 QETApp::initSplashScreen Initializes the splash screen if and only if the execution is interactive. Otherwise, the splash_screen_ attribute is 0. More...
 
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. More...
 
void initLanguage ()
 QETApp::initLanguage Determine and apply the language to use for the application. More...
 
void initStyle ()
 QETApp::initStyle Setup the gui style. More...
 
void initConfiguration ()
 QETApp::initConfiguration Reads and takes into account the configuration of the application. This method will create, if necessary: More...
 
void initSystemTray ()
 QETApp::initSystemTray Build the icon in the systray and its menu. More...
 
void buildSystemTrayMenu ()
 QETApp::buildSystemTrayMenu builds the icon menu in the systray. More...
 
void checkBackupFiles ()
 QETApp::checkBackupFiles Check for backup files. If backup was found, open a dialog and ask user what to do. More...
 
void fetchWindowStats (const QList< QETDiagramEditor * > &, const QList< QETElementEditor * > &, const QList< QETTitleBlockTemplateEditor * > &)
 QETApp::fetchWindowStats Updates the booleans concerning the state of the windows. More...
 
template<class T >
void addWindowsListToMenu (QMenu *, const QList< T * > &)
 

Static Private Member Functions

static int projectIdFromString (const QString &)
 QETApp::projectIdFromString. More...
 
static QETProjectprojectFromString (const QString &)
 QETApp::projectFromString. More...
 

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_
 Comand-line arguments parser. More...
 
bool non_interactive_execution_
 non_interactive_execution_ Whether the application will end without any user interaction More...
 
QPalette initial_palette_
 System color palette. More...
 

Static Private Attributes

static QETAppm_qetapp = nullptr
 
static TitleBlockTemplatesFilesCollectionm_common_tbt_collection
 
static TitleBlockTemplatesFilesCollectionm_custom_tbt_collection
 
static ElementsCollectionCachecollections_cache_ = nullptr
 
static QMap< uint, QETProject * > registered_projects_ = QMap<uint, QETProject *>()
 
static uint next_project_id = 0
 
static RecentFilesm_projects_recent_files = nullptr
 
static RecentFilesm_elements_recent_files = nullptr
 
static TitleBlockTemplatedefault_titleblock_template_ = nullptr
 
static QString m_user_common_elements_dir = QString()
 
static QString m_user_custom_elements_dir = QString()
 
static QString m_user_custom_tbt_dir = QString()
 

Detailed Description

The QETApp class This class represents the QElectroTech application.

Constructor & Destructor Documentation

◆ QETApp() [1/2]

QETApp::QETApp ( )

QETApp::QETApp.

Here is the call graph for this function:

◆ ~QETApp()

QETApp::~QETApp ( )
override

QETApp::~QETApp.

Here is the call graph for this function:

◆ QETApp() [2/2]

QETApp::QETApp ( const QETApp )
private

Member Function Documentation

◆ aboutQET

void QETApp::aboutQET ( )
slot

QETApp::aboutQET Open the dialog about qet.

◆ addWindowsListToMenu()

template<class T >
void QETApp::addWindowsListToMenu ( QMenu *  menu,
const QList< T * > &  windows 
)
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

Parameters
menuthe menu windows will be added to
windowsA list of top-level windows.

◆ availableTitleBlockTemplatesCollections()

QList< TitleBlockTemplatesCollection * > QETApp::availableTitleBlockTemplatesCollections ( )
static

QETApp::availableTitleBlockTemplatesCollections.

Returns
the list of all available title block tempaltes collections, beginning with the common and custom ones, plus the projects-embedded ones.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildSystemTrayMenu()

void QETApp::buildSystemTrayMenu ( )
private

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkBackupFiles()

void QETApp::checkBackupFiles ( )
private

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkRemainingWindows

void QETApp::checkRemainingWindows ( )
slot

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeEveryEditor

bool QETApp::closeEveryEditor ( )
slot

QETApp::closeEveryEditor Close all editors.

Returns
true if the user has accepted all closures, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collectionCache()

ElementsCollectionCache * QETApp::collectionCache ( )
static

QETApp::collectionCache.

Returns
the collection cache provided by the application itself.
Here is the caller graph for this function:

◆ commonElementsDir()

QString QETApp::commonElementsDir ( )
static

QETApp::commonElementsDir.

Returns
the dir path of the common elements collection.
Here is the caller graph for this function:

◆ commonElementsDirN()

QString QETApp::commonElementsDirN ( )
static

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

Returns
QString path
Here is the call graph for this function:
Here is the caller graph for this function:

◆ commonTitleBlockTemplatesCollection()

TitleBlockTemplatesFilesCollection * QETApp::commonTitleBlockTemplatesCollection ( )
static

QETApp::commonTitleBlockTemplatesCollection.

Returns
the common title block templates collection, i.e. the one provided by QElecrotTech
Here is the call graph for this function:
Here is the caller graph for this function:

◆ commonTitleBlockTemplatesDir()

QString QETApp::commonTitleBlockTemplatesDir ( )
static

QETApp::commonTitleBlockTemplatesDir.

Returns
the path of the directory containing the common title block templates collection.
Here is the caller graph for this function:

◆ conductorInfoKeys()

QStringList QETApp::conductorInfoKeys ( )
static

QETApp::conductorInfoKeys.

Returns
the conductor information keys
Here is the caller graph for this function:

◆ conductorTranslatedInfoKey()

QString QETApp::conductorTranslatedInfoKey ( const QString &  key)
static

QETApp::conductorTranslatedInfoKey.

Parameters
key
Returns
the translated information key given by key If key don't match, return an empty string
Here is the caller graph for this function:

◆ configDir()

QString QETApp::configDir ( )
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.

Returns
The path of the QElectroTech configuration folder
Here is the caller graph for this function:

◆ configureQET

void QETApp::configureQET ( )
slot

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

See also
ConfigDialog
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTextOrientationSpinBoxWidget()

QTextOrientationSpinBoxWidget * QETApp::createTextOrientationSpinBoxWidget ( )
static

QETApp::createTextOrientationSpinBoxWidget Instantiates a QTextOrientationSpinBoxWidget and configures:

  • his font
  • his strings
    Note
    that the deletion of the widget thus allocated is the responsibility of the caller.
    Returns
    See also
    QTextOrientationSpinBoxWidget
Here is the call graph for this function:
Here is the caller graph for this function:

◆ customElementsDir()

QString QETApp::customElementsDir ( )
static

QETApp::customElementsDir.

Returns
the dir path of user elements collection ened by a "/" separator
Here is the call graph for this function:
Here is the caller graph for this function:

◆ customElementsDirN()

QString QETApp::customElementsDirN ( )
static

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

Returns
QString path
Here is the call graph for this function:
Here is the caller graph for this function:

◆ customTitleBlockTemplatesCollection()

TitleBlockTemplatesFilesCollection * QETApp::customTitleBlockTemplatesCollection ( )
static

QETApp::customTitleBlockTemplatesCollection.

Returns
the custom title block templates collection, i.e. the one managed by the end user
Here is the call graph for this function:
Here is the caller graph for this function:

◆ customTitleBlockTemplatesDir()

QString QETApp::customTitleBlockTemplatesDir ( )
static

QETApp::customTitleBlockTemplatesDir.

Returns
the path of the directory containing the custom title block templates collection.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ defaultTitleBlockTemplate()

TitleBlockTemplate * QETApp::defaultTitleBlockTemplate ( )
static

QETApp::defaultTitleBlockTemplate.

Returns
the default titleblock template for diagrams
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detectWindows()

template<class T >
QList< T * > QETApp::detectWindows
private
Parameters
Ta class inheriting QMainWindow
Returns
the list of windows of type T

◆ diagramEditorAncestorOf()

QETDiagramEditor * QETApp::diagramEditorAncestorOf ( const QWidget *  child)
static

QETApp::diagramEditorAncestorOf.

Parameters
child
Returns
the parent QETDiagramEditor (or grandparent and so on to any level) of the given child. If not return nullptr;
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diagramEditorForFile()

QETDiagramEditor * QETApp::diagramEditorForFile ( const QString &  filepath)
static

QETApp::diagramEditorForFile.

Parameters
filepath: A file path
Note
if filepath is an empty string, this method returns 0.
Returns
the QETDiagramEditor editing the filepath file, or 0 if this file is not edited by the application.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diagramEditors()

QList< QETDiagramEditor * > QETApp::diagramEditors ( )
static

QETApp::diagramEditors.

Returns
schema editors
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diagramInfoKeys()

QStringList QETApp::diagramInfoKeys ( )
static

QETApp::diagramInfoKeys.

Returns
the diagram default default information keys
Here is the caller graph for this function:

◆ diagramTextsFont()

QFont QETApp::diagramTextsFont ( qreal  size = -1.0)
static

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

Parameters
size: the size of font
Returns
the font to use
Here is the caller graph for this function:

◆ diagramTextsItemFont()

QFont QETApp::diagramTextsItemFont ( qreal  size = -1.0)
static

QETApp::diagramTextsItemFont the font for to use in independent text item.

Parameters
sizeof font
Returns
Here is the caller graph for this function:

◆ diagramTranslatedInfoKey()

QString QETApp::diagramTranslatedInfoKey ( const QString &  key)
static

QETApp::diagramTranslatedInfoKey.

Parameters
key
Returns
the translated information key given by key If key don't match, return an empty string
Here is the caller graph for this function:

◆ dynamicTextsItemFont()

QFont QETApp::dynamicTextsItemFont ( qreal  size = -1.0)
static

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

Parameters
size
Returns
dynamic text font with PointSizeF(size)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementEditors() [1/2]

QList< QETElementEditor * > QETApp::elementEditors ( )
static

QETApp::elementEditors.

Returns
element editors
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementEditors() [2/2]

QList< QETElementEditor * > QETApp::elementEditors ( QETProject project)
static

QETApp::elementEditors.

Parameters
project: a project
Returns
element editors editing an element belonging to the QETProject project
Here is the call graph for this function:

◆ elementInfoKeys()

QStringList QETApp::elementInfoKeys ( )
static

QETApp::elementInfoKeys.

Returns
all available key for describe an element
Here is the caller graph for this function:

◆ elementInfoToVar()

QString QETApp::elementInfoToVar ( const QString &  info)
static

QETApp::elementInfoToVar.

Parameters
info
Returns
var in form %{my-var} corresponding to the info, if there is not available var for the given info the returned var is %{void}
See also
QETApp::elementInfoKeys for list
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementsRecentFiles()

RecentFiles * QETApp::elementsRecentFiles ( )
static

QETApp::elementsRecentFiles.

Returns
The list of recent files for the elements
Here is the caller graph for this function:

◆ elementTranslatedInfoKey()

QString QETApp::elementTranslatedInfoKey ( const QString &  info)
static

ElementsProperties::translatedInfo Return the translated information key given by info If info don't match, return an empty string.

Parameters
infothe key to be translated
Returns
Here is the caller graph for this function:

◆ fetchWindowStats()

void QETApp::fetchWindowStats ( const QList< QETDiagramEditor * > &  diagrams,
const QList< QETElementEditor * > &  elements,
const QList< QETTitleBlockTemplateEditor * > &  tbtemplates 
)
private

QETApp::fetchWindowStats Updates the booleans concerning the state of the windows.

Parameters
diagrams: QList<QETDiagramEditor *>
elements: QList<QETElementEditor *>
tbtemplates: QList<QETTitleBlockTemplateEditor *>
Here is the caller graph for this function:

◆ floatingToolbarsAndDocksForMainWindow()

QList< QWidget * > QETApp::floatingToolbarsAndDocksForMainWindow ( QMainWindow *  window) const
private

QETApp::floatingToolbarsAndDocksForMainWindow.

Parameters
window: window where you have to find the toolbars and floating dock
Returns
the window's toolbars and floating dock
Here is the caller graph for this function:

◆ handledFileExtensions()

QStringList QETApp::handledFileExtensions ( )
static

QETApp::handledFileExtensions.

Returns
the list of file extensions QElectroTech is able to open and supposed to handle. Note they are provided with no leading point.
Here is the caller graph for this function:

◆ handledFiles()

QStringList QETApp::handledFiles ( const QList< QUrl > &  urls)
static

QETApp::handledFiles.

Parameters
urls: URLs list
Returns
the list of filepaths QElectroTech is able to open.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ indiTextsItemFont()

QFont QETApp::indiTextsItemFont ( qreal  size = -1.0)
static

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

Parameters
size
Returns
independent text font with PointSizeF(size)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initConfiguration()

void QETApp::initConfiguration ( )
private

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

  • the configuration folder
  • the folder of the personal collection
  • the directory for custom title blocks
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initLanguage()

void QETApp::initLanguage ( )
private

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSplashScreen()

void QETApp::initSplashScreen ( )
private

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initStyle()

void QETApp::initStyle ( )
private

QETApp::initStyle Setup the gui style.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSystemTray()

void QETApp::initSystemTray ( )
private

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ instance()

QETApp * QETApp::instance ( )
static

QETApp::instance.

Returns
the instance of the QETApp
Here is the caller graph for this function:

◆ invertMainWindowVisibility

void QETApp::invertMainWindowVisibility ( QWidget *  window)
slot

QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hidden or hides it if it is displayed.

Parameters
window: window to show / hide
Here is the call graph for this function:
Here is the caller graph for this function:

◆ langFromSetting()

QString QETApp::langFromSetting ( )
static

QETApp::langFromSetting.

Returns
the langage found in setting file if nothing was found return the system local.
Here is the caller graph for this function:

◆ languagesPath()

QString QETApp::languagesPath ( )
static

QETApp::languagesPath.

Returns
The path of the folder containing the language files
Here is the caller graph for this function:

◆ newDiagramEditor

void QETApp::newDiagramEditor ( )
slot

QETApp::newDiagramEditor launches a new schema editor.

Here is the caller graph for this function:

◆ newElementEditor

void QETApp::newElementEditor ( )
slot

QETApp::newElementEditor launches a new element editor.

Here is the caller graph for this function:

◆ openElementFiles

void QETApp::openElementFiles ( const QStringList &  files_list)
slot

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

Parameters
files_list: Files to open
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openElementLocations

void QETApp::openElementLocations ( const QList< ElementsLocation > &  locations_list)
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.

Parameters
locations_list: Locations to open
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openFiles

void QETApp::openFiles ( const QETArguments args)
slot

QETApp::openFiles Open files passed as arguments.

Parameters
args: Object containing arguments; the files
See also
openProjectFiles openElementFiles
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openProjectFiles

void QETApp::openProjectFiles ( const QStringList &  files_list)
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.

Parameters
files_list: Files to open
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openTitleBlockTemplate [1/2]

void QETApp::openTitleBlockTemplate ( const QString &  filepath)
slot

QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.

Parameters
filepathPath of the .titleblock file to be opened

◆ openTitleBlockTemplate [2/2]

void QETApp::openTitleBlockTemplate ( const TitleBlockTemplateLocation location,
bool  duplicate = false 
)
slot

QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.

Parameters
locationlocation of the title block template to be edited
duplicateif true, the template is opened for duplication, which means the user will be prompter for a new template name.
See also
QETTitleBlockTemplateEditor::setOpenForDuplication()
Here is the caller graph for this function:

◆ openTitleBlockTemplateFiles

void QETApp::openTitleBlockTemplateFiles ( const QStringList &  files_list)
slot

QETApp::openTitleBlockTemplateFiles Open provided title block template files. If a title block template is already opened, the adequate window is activated.

Parameters
files_listFiles to be opened
Here is the call graph for this function:
Here is the caller graph for this function:

◆ overrideLangDir()

void QETApp::overrideLangDir ( const QString &  new_ld)
static

QETApp::overrideLangDir Redefines the path of the folder containing the language files.

Parameters
new_ld: New path of the folder containing the language files
Here is the caller graph for this function:

◆ parseArguments()

void QETApp::parseArguments ( )
private

QETApp::parseArguments Parse the following arguments:

  • –common-elements-dir=
  • –config-dir
  • –help
  • –version
  • -v
  • –license

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printHelp()

void QETApp::printHelp ( )
static

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

Here is the caller graph for this function:

◆ printLicense()

void QETApp::printLicense ( )
static

QETApp::printLicense Display license on standard output.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printVersion()

void QETApp::printVersion ( )
static

QETApp::printVersion Print version to standard output.

Here is the caller graph for this function:

◆ project()

QETProject * QETApp::project ( const uint &  id)
static

QETApp::project.

Parameters
id: Id of the desired project
Returns
the project corresponds to the id passed in parameter
Here is the caller graph for this function:

◆ projectFromString()

QETProject * QETApp::projectFromString ( const QString &  url)
staticprivate

QETApp::projectFromString.

Parameters
urlThe location of a collection item (title block template, element, category, ...).
Returns
the project mentionned in the URL, or 0 if none could be found.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectId()

int QETApp::projectId ( const QETProject project)
static

QETApp::projectId.

Parameters
project: Project whose id we want to retrieve
Returns
the project id as a parameter if it is saved, -1 otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectIdFromString()

int QETApp::projectIdFromString ( const QString &  url)
staticprivate

QETApp::projectIdFromString.

Parameters
urlThe location of a collection item (title block template, element, category, ...).
Returns
the id of the project mentionned in the URL, or -1 if none could be found.
Here is the caller graph for this function:

◆ projectsRecentFiles()

RecentFiles * QETApp::projectsRecentFiles ( )
static

QETApp::projectsRecentFiles.

Returns
The list of recent files for projects
Here is the caller graph for this function:

◆ quitQET

void QETApp::quitQET ( )
slot

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realPath()

QString QETApp::realPath ( const QString &  sym_path)
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)

Parameters
sym_pathCharacter string representing the absolute path of the file
Returns
An empty string in case of error or the absolute path of the * .elmt file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ receiveMessage

void QETApp::receiveMessage ( int  instanceId,
QByteArray  message 
)
slot

QETApp::receiveMessage openFiles from message.

Parameters
instanceIdQ_UNUSED
message
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceDiagramEditors

void QETApp::reduceDiagramEditors ( )
slot

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

Here is the caller graph for this function:

◆ reduceElementEditors

void QETApp::reduceElementEditors ( )
slot

QETApp::reduceElementEditors Minimize all element editors in systray.

Here is the caller graph for this function:

◆ reduceEveryEditor

void QETApp::reduceEveryEditor ( )
slot

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduceTitleBlockTemplateEditors

void QETApp::reduceTitleBlockTemplateEditors ( )
slot

QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors.

Here is the caller graph for this function:

◆ registeredProjects()

QMap< uint, QETProject * > QETApp::registeredProjects ( )
static

QETApp::registeredProjects.

Returns
the list of projects with their associated ids
Here is the caller graph for this function:

◆ registerProject()

bool QETApp::registerProject ( QETProject project)
static

QETApp::registerProject.

Parameters
project: Project to register with the application
Returns
true if the project could be saved, false otherwise Failure to save a project usually means that it is already saved.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetUserElementsDir()

void QETApp::resetUserElementsDir ( )
static

QETApp::resetUserElementsDir Reset the path of the user common and custom elements dir. Use this function when the user path (common and/or custom) change.

Here is the caller graph for this function:

◆ restoreDiagramEditors

void QETApp::restoreDiagramEditors ( )
slot

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

Here is the caller graph for this function:

◆ restoreElementEditors

void QETApp::restoreElementEditors ( )
slot

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

Here is the caller graph for this function:

◆ restoreEveryEditor

void QETApp::restoreEveryEditor ( )
slot

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restoreTitleBlockTemplateEditors

void QETApp::restoreTitleBlockTemplateEditors ( )
slot

QETApp::restoreTitleBlockTemplateEditors Restore all known template editors.

Here is the caller graph for this function:

◆ setLanguage()

void QETApp::setLanguage ( const QString &  desired_language)

QETApp::setLanguage Change the language used by the application.

Parameters
desired_language: wanted language
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMainWindowsVisible()

template<class T >
void QETApp::setMainWindowsVisible ( bool  visible)
private

T a class inheriting QMainWindow

Parameters
visiblewhether detected main windows should be visible
Here is the call graph for this function:

◆ setMainWindowVisible

void QETApp::setMainWindowVisible ( QMainWindow *  window,
bool  visible 
)
slot

QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors)

Parameters
window: window to show / hide
visible: true to display the window, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSplashScreenStep()

void QETApp::setSplashScreenStep ( const QString &  message = QString())
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.

Parameters
message: the text of the splash screen
Here is the caller graph for this function:

◆ switchLayout()

void QETApp::switchLayout ( Qt::LayoutDirection  direction)

Switches the application to the provided layout.

Here is the caller graph for this function:

◆ symbolicPath()

QString QETApp::symbolicPath ( const QString &  real_path)
static

QETApp::symbolicPath Build the symbolic path (of the type custom: // tools_pervers / sado_maso / contact_bizarre) corresponding to a file.

Parameters
real_path: Character string representing the symbolic path of the file
Returns
An empty string in case of error or the path symbolic designating the element.
Here is the call graph for this function:

◆ systray

void QETApp::systray ( QSystemTrayIcon::ActivationReason  reason)
slot

QETApp::systray Manages QSystemTrayIcon related events.

Parameters
reason: reason an integer representing the event on the systray
Here is the call graph for this function:
Here is the caller graph for this function:

◆ titleBlockTemplateEditors() [1/2]

QList< QETTitleBlockTemplateEditor * > QETApp::titleBlockTemplateEditors ( )
static

QETApp::titleBlockTemplateEditors.

Returns
the title block template editors
Here is the call graph for this function:
Here is the caller graph for this function:

◆ titleBlockTemplateEditors() [2/2]

QList< QETTitleBlockTemplateEditor * > QETApp::titleBlockTemplateEditors ( QETProject project)
static

QETApp::titleBlockTemplateEditors.

Parameters
projectOpened project object.
Returns
the list of title block template editors which are currently editing a template embedded within project.
Here is the call graph for this function:

◆ titleBlockTemplatesCollection()

TitleBlockTemplatesCollection * QETApp::titleBlockTemplatesCollection ( const QString &  protocol)
static

QETApp::titleBlockTemplatesCollection.

Parameters
protocolProtocol string
Returns
the templates collection matching the provided protocol, or 0 if none could be found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unregisterProject()

bool QETApp::unregisterProject ( QETProject project)
static

QETApp::unregisterProject Cancel the recording of the project project.

Parameters
project: Project to be unregistered
Returns
true if the cancellation was successful, false otherwise The failure of this method usually means that the project was not saved.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ useSystemPalette

void QETApp::useSystemPalette ( bool  use)
slot

QETApp::useSystemPalette Change the application palette.

Parameters
use: true to use the system colors, false to use those of the current theme
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ collections_cache_

ElementsCollectionCache * QETApp::collections_cache_ = nullptr
staticprivate

◆ default_titleblock_template_

TitleBlockTemplate * QETApp::default_titleblock_template_ = nullptr
staticprivate

◆ every_diagram_reduced

bool QETApp::every_diagram_reduced
private

◆ every_diagram_visible

bool QETApp::every_diagram_visible
private

◆ every_editor_reduced

bool QETApp::every_editor_reduced
private

◆ every_element_reduced

bool QETApp::every_element_reduced
private

◆ every_element_visible

bool QETApp::every_element_visible
private

◆ every_template_reduced

bool QETApp::every_template_reduced
private

◆ every_template_visible

bool QETApp::every_template_visible
private

◆ initial_palette_

QPalette QETApp::initial_palette_
private

System color palette.

◆ lang_dir

QString QETApp::lang_dir = QString()
static

lang_dir Directory containing localization files.

◆ m_common_tbt_collection

TitleBlockTemplatesFilesCollection * QETApp::m_common_tbt_collection
staticprivate

◆ m_custom_tbt_collection

TitleBlockTemplatesFilesCollection * QETApp::m_custom_tbt_collection
staticprivate

◆ m_elements_recent_files

RecentFiles * QETApp::m_elements_recent_files = nullptr
staticprivate

◆ m_projects_recent_files

RecentFiles * QETApp::m_projects_recent_files = nullptr
staticprivate

◆ m_qetapp

QETApp * QETApp::m_qetapp = nullptr
staticprivate

◆ m_qsti

QSystemTrayIcon* QETApp::m_qsti
private

◆ m_splash_screen

QSplashScreen* QETApp::m_splash_screen
private

◆ m_user_common_elements_dir

QString QETApp::m_user_common_elements_dir = QString()
staticprivate

◆ m_user_custom_elements_dir

QString QETApp::m_user_custom_elements_dir = QString()
staticprivate

◆ m_user_custom_tbt_dir

QString QETApp::m_user_custom_tbt_dir = QString()
staticprivate

◆ menu_systray

QMenu* QETApp::menu_systray
private

◆ new_diagram

QAction* QETApp::new_diagram
private

◆ new_element

QAction* QETApp::new_element
private

◆ next_project_id

uint QETApp::next_project_id = 0
staticprivate

◆ non_interactive_execution_

bool QETApp::non_interactive_execution_
private

non_interactive_execution_ Whether the application will end without any user interaction

◆ qet_arguments_

QETArguments QETApp::qet_arguments_
private

Comand-line arguments parser.

◆ qetTranslator

QTranslator QETApp::qetTranslator
private

◆ qtTranslator

QTranslator QETApp::qtTranslator
private

◆ quitter_qet

QAction* QETApp::quitter_qet
private

◆ reduce_appli

QAction* QETApp::reduce_appli
private

◆ reduce_diagrams

QAction* QETApp::reduce_diagrams
private

◆ reduce_elements

QAction* QETApp::reduce_elements
private

◆ reduce_templates

QAction* QETApp::reduce_templates
private

◆ registered_projects_

QMap< uint, QETProject * > QETApp::registered_projects_ = QMap<uint, QETProject *>()
staticprivate

◆ restore_appli

QAction* QETApp::restore_appli
private

◆ restore_diagrams

QAction* QETApp::restore_diagrams
private

◆ restore_elements

QAction* QETApp::restore_elements
private

◆ restore_templates

QAction* QETApp::restore_templates
private

◆ signal_map

QSignalMapper QETApp::signal_map
private

◆ window_geometries

QHash<QMainWindow *, QByteArray> QETApp::window_geometries
private

◆ window_states

QHash<QMainWindow *, QByteArray> QETApp::window_states
private

The documentation for this class was generated from the following files: