27#include <QSystemTrayIcon>
35#define QETAPP_COMMON_TBT_PROTOCOL "commontbt"
36#define QETAPP_COMPANY_TBT_PROTOCOL "companytbt"
37#define QETAPP_CUSTOM_TBT_PROTOCOL "customtbt"
101 static QString
realPath(
const QString &);
108#ifdef QET_ALLOW_OVERRIDE_CED_OPTION
110 static void overrideCommonElementsDir(
const QString &);
116 static QString m_overrided_common_elements_dir;
119#ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
121 static void overrideCommonTitleBlockTemplatesDir(
const QString &);
128 static QString common_tbt_dir_;
131#ifdef QET_ALLOW_OVERRIDE_CD_OPTION
133 static void overrideConfigDir(
const QString &);
140 static QString config_dir;
168 bool eventFiltrer(QObject *
object, QEvent *);
233 void systray(QSystemTrayIcon::ActivationReason);
275 const QList<QETDiagramEditor *> &,
276 const QList<QETElementEditor *> &,
277 const QList<QETTitleBlockTemplateEditor *> &
Definition elementscollectioncache.h:32
The QETApp class This class represents the QElectroTech application.
Definition qetapp.h:56
bool every_template_reduced
Definition qetapp.h:197
static TitleBlockTemplatesFilesCollection * customTitleBlockTemplatesCollection()
QETApp::customTitleBlockTemplatesCollection.
Definition qetapp.cpp:471
void configureQET()
QETApp::configureQET Allows the user to configure QET by launching an appropriate dialog.
Definition qetapp.cpp:1827
void newElementEditor()
QETApp::newElementEditor launches a new element editor.
Definition qetapp.cpp:410
static QString customElementsDir()
QETApp::customElementsDir.
Definition qetapp.cpp:596
QAction * reduce_diagrams
Definition qetapp.h:182
static QString m_custom_element_dir
Definition qetapp.h:225
bool every_template_visible
Definition qetapp.h:198
static RecentFiles * elementsRecentFiles()
QETApp::elementsRecentFiles.
Definition qetapp.cpp:1473
void openProjectFiles(const QStringList &)
QETApp::openProjectFiles Opens a list of files. Files are opened in the first visible schematic edito...
Definition qetapp.cpp:1623
void initStyle()
QETApp::initStyle Setup the gui style.
Definition qetapp.cpp:2017
static QString configDir()
QETApp::configDir Return the QET configuration folder, i.e. the path to the folder in which QET will ...
Definition qetapp.cpp:839
QAction * quitter_qet
Definition qetapp.h:179
QMenu * menu_systray
Definition qetapp.h:178
static bool m_company_element_dir_is_set
Definition qetapp.h:223
static QFont diagramTextsFont(qreal=-1.0)
QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9.
Definition qetapp.cpp:1160
bool every_element_reduced
Definition qetapp.h:195
void setLanguage(const QString &)
QETApp::setLanguage Change the language used by the application.
Definition qetapp.cpp:195
static RecentFiles * m_projects_recent_files
Definition qetapp.h:215
void openFiles(const QETArguments &)
QETApp::openFiles Open files passed as arguments.
Definition qetapp.cpp:1602
static QString m_user_custom_tbt_dir
Definition qetapp.h:229
void reduceEveryEditor()
QETApp::reduceEveryEditor Minimizes all application windows in the systray.
Definition qetapp.cpp:315
static TitleBlockTemplate * default_titleblock_template_
Definition qetapp.h:217
QTranslator qtTranslator
Definition qetapp.h:174
void invertMainWindowVisibility(QWidget *)
QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hid...
Definition qetapp.cpp:1516
static RecentFiles * m_elements_recent_files
Definition qetapp.h:216
QAction * new_element
Definition qetapp.h:189
static bool registerProject(QETProject *)
QETApp::registerProject.
Definition qetapp.cpp:2491
void restoreElementEditors()
QETApp::restoreElementEditors Restore all element editors in the systray.
Definition qetapp.cpp:372
void initConfiguration()
QETApp::initConfiguration Reads and takes into account the configuration of the application....
Definition qetapp.cpp:2040
QAction * reduce_templates
Definition qetapp.h:186
QSplashScreen * m_splash_screen
Definition qetapp.h:177
static QETApp * instance()
QETApp::instance.
Definition qetapp.cpp:182
QList< QWidget * > floatingToolbarsAndDocksForMainWindow(QMainWindow *) const
QETApp::floatingToolbarsAndDocksForMainWindow.
Definition qetapp.cpp:1878
void restoreDiagramEditors()
QETApp::restoreDiagramEditors Restore all schema editors in the systray.
Definition qetapp.cpp:351
void openTitleBlockTemplateFiles(const QStringList &)
QETApp::openTitleBlockTemplateFiles Open provided title block template files. If a title block templa...
Definition qetapp.cpp:1786
static QString realPath(const QString &)
QETApp::realPath Allows you to know the absolute path of the * .elmt file corresponding to a symbolic...
Definition qetapp.cpp:877
void checkBackupFiles()
QETApp::checkBackupFiles Check for backup files. If backup was found, open a dialog and ask user what...
Definition qetapp.cpp:2275
static TitleBlockTemplatesFilesCollection * companyTitleBlockTemplatesCollection()
QETApp::companyTitleBlockTemplatesCollection.
Definition qetapp.cpp:450
void setMainWindowVisible(QMainWindow *, bool)
QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors)
Definition qetapp.cpp:1488
void reduceTitleBlockTemplateEditors()
QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors.
Definition qetapp.cpp:381
void addWindowsListToMenu(QMenu *, const QList< T * > &)
Definition qetapp.cpp:2155
QSignalMapper signal_map
Definition qetapp.h:199
void useSystemPalette(bool)
QETApp::useSystemPalette Change the application palette.
Definition qetapp.cpp:1530
static bool m_common_element_dir_is_set
Definition qetapp.h:220
static QString companyElementsDirN()
QETApp::companyElementsDirN like QString QETApp::companyElementsDir but without "/" at the end.
Definition qetapp.cpp:682
static QString m_user_company_tbt_dir
Definition qetapp.h:228
bool every_element_visible
Definition qetapp.h:196
static bool m_custom_element_dir_is_set
Definition qetapp.h:226
QAction * restore_templates
Definition qetapp.h:187
static QString commonElementsDir()
QETApp::commonElementsDir.
Definition qetapp.cpp:533
static QStringList handledFiles(const QList< QUrl > &)
QETApp::handledFiles.
Definition qetapp.cpp:961
static int projectId(const QETProject *)
QETApp::projectId.
Definition qetapp.cpp:2556
QAction * restore_appli
Definition qetapp.h:181
static TitleBlockTemplatesFilesCollection * m_custom_tbt_collection
Definition qetapp.h:211
static QETProject * project(const uint &)
QETApp::project.
Definition qetapp.cpp:2539
~QETApp() override
QETApp::~QETApp.
Definition qetapp.cpp:153
QAction * restore_diagrams
Definition qetapp.h:183
void receiveMessage(int instanceId, QByteArray message)
QETApp::receiveMessage openFiles from message.
Definition qetapp.cpp:1418
bool every_editor_reduced
Definition qetapp.h:192
static TitleBlockTemplatesFilesCollection * m_common_tbt_collection
Definition qetapp.h:209
static TitleBlockTemplate * defaultTitleBlockTemplate()
QETApp::defaultTitleBlockTemplate.
Definition qetapp.cpp:1369
static int projectIdFromString(const QString &)
QETApp::projectIdFromString.
Definition qetapp.cpp:2174
void buildSystemTrayMenu()
QETApp::buildSystemTrayMenu builds the icon menu in the systray.
Definition qetapp.cpp:2218
static QString languagesPath()
QETApp::languagesPath.
Definition qetapp.cpp:1094
static QString companyElementsDir()
QETApp::companyElementsDir.
Definition qetapp.cpp:633
static void printLicense()
QETApp::printLicense Display license on standard output.
Definition qetapp.cpp:2465
static QList< QETTitleBlockTemplateEditor * > titleBlockTemplateEditors()
QETApp::titleBlockTemplateEditors.
Definition qetapp.cpp:1304
void setMainWindowsVisible(bool)
Definition qetapp.cpp:1452
static QETApp * m_qetapp
Definition qetapp.h:173
QHash< QMainWindow *, QByteArray > window_states
Definition qetapp.h:191
static QETDiagramEditor * diagramEditorForFile(const QString &)
QETApp::diagramEditorForFile.
Definition qetapp.cpp:987
static QString commonTitleBlockTemplatesDir()
QETApp::commonTitleBlockTemplatesDir.
Definition qetapp.cpp:728
void newDiagramEditor()
QETApp::newDiagramEditor launches a new schema editor.
Definition qetapp.cpp:400
void systray(QSystemTrayIcon::ActivationReason)
QETApp::systray Manages QSystemTrayIcon related events.
Definition qetapp.cpp:280
bool non_interactive_execution_
non_interactive_execution_ Whether the application will end without any user interaction
Definition qetapp.h:206
void setSplashScreenStep(const QString &=QString())
QETApp::setSplashScreenStep Changes the text of the splash screen and takes events into account....
Definition qetapp.cpp:1994
static QList< QETElementEditor * > elementEditors()
QETApp::elementEditors.
Definition qetapp.cpp:1295
static QETDiagramEditor * diagramEditorAncestorOf(const QWidget *child)
QETApp::diagramEditorAncestorOf.
Definition qetapp.cpp:1008
static uint next_project_id
Definition qetapp.h:214
void restoreEveryEditor()
QETApp::restoreEveryEditor Restores all application windows in the systray.
Definition qetapp.cpp:328
static QString lang_dir
lang_dir Directory containing localization files.
Definition qetapp.h:149
static QList< TitleBlockTemplatesCollection * > availableTitleBlockTemplatesCollections()
QETApp::availableTitleBlockTemplatesCollections.
Definition qetapp.cpp:491
static TitleBlockTemplatesFilesCollection * m_company_tbt_collection
Definition qetapp.h:210
static QString commonElementsDirN()
QETApp::commonElementsDirN like QString QETApp::commonElementsDir but without "/" at the end.
Definition qetapp.cpp:670
void openTitleBlockTemplate(const TitleBlockTemplateLocation &, bool=false)
QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.
Definition qetapp.cpp:1760
void parseArguments()
QETApp::parseArguments Parse the following arguments:
Definition qetapp.cpp:1919
static QTextOrientationSpinBoxWidget * createTextOrientationSpinBoxWidget()
QETApp::createTextOrientationSpinBoxWidget Instantiates a QTextOrientationSpinBoxWidget and configure...
Definition qetapp.cpp:1346
static QString customTitleBlockTemplatesDir()
QETApp::customTitleBlockTemplatesDir.
Definition qetapp.cpp:791
static QString customElementsDirN()
QETApp::customElementsDirN like QString QETApp::customElementsDir but without "/" at the end.
Definition qetapp.cpp:694
void initLanguage()
QETApp::initLanguage Determine and apply the language to use for the application.
Definition qetapp.cpp:2008
static QFont indiTextsItemFont(qreal=-1.0)
QETApp::indiTextsItemFont The default font to use for independent text item.
Definition qetapp.cpp:1243
static QList< QETDiagramEditor * > diagramEditors()
QETApp::diagramEditors.
Definition qetapp.cpp:1264
QAction * new_diagram
Definition qetapp.h:188
static ElementsCollectionCache * collectionCache()
QETApp::collectionCache.
Definition qetapp.cpp:419
void restoreTitleBlockTemplateEditors()
QETApp::restoreTitleBlockTemplateEditors Restore all known template editors.
Definition qetapp.cpp:390
QHash< QMainWindow *, QByteArray > window_geometries
Definition qetapp.h:190
QAction * reduce_elements
Definition qetapp.h:184
void quitQET()
QETApp::quitQET Request the closing of all windows; if the user accepts them, the application quits.
Definition qetapp.cpp:1554
void reduceElementEditors()
QETApp::reduceElementEditors Minimize all element editors in systray.
Definition qetapp.cpp:362
void openElementLocations(const QList< ElementsLocation > &)
QETApp::openElementLocations Open the elements whose location is passed in parameter....
Definition qetapp.cpp:1720
QList< T * > detectWindows() const
Definition qetapp.cpp:1436
static bool unregisterProject(QETProject *)
QETApp::unregisterProject Cancel the recording of the project project.
Definition qetapp.cpp:2518
void aboutQET()
QETApp::aboutQET Open the dialog about qet.
Definition qetapp.cpp:1860
static QString companyTitleBlockTemplatesDir()
QETApp::companyTitleBlockTemplatesDir.
Definition qetapp.cpp:758
bool every_diagram_visible
Definition qetapp.h:194
void reduceDiagramEditors()
QETApp::reduceDiagramEditors Minimize all schema editors in the systray.
Definition qetapp.cpp:341
static void printHelp()
QETApp::printHelp Display help and usage on standard output.
Definition qetapp.cpp:2425
static QFont dynamicTextsItemFont(qreal=-1.0)
QETApp::dynamicTextsFont the default font of dynamic element text item.
Definition qetapp.cpp:1219
static QFont diagramTextsItemFont(qreal=-1.0)
QETApp::diagramTextsItemFont the font for to use in independent text item.
Definition qetapp.cpp:1186
void initSplashScreen()
QETApp::initSplashScreen Initializes the splash screen if and only if the execution is interactive....
Definition qetapp.cpp:1975
bool closeEveryEditor()
QETApp::closeEveryEditor Close all editors.
Definition qetapp.cpp:1135
static TitleBlockTemplatesCollection * titleBlockTemplatesCollection(const QString &)
QETApp::titleBlockTemplatesCollection.
Definition qetapp.cpp:512
void checkRemainingWindows()
QETApp::checkRemainingWindows Check if there are any windows (hidden or not) and exit if there are no...
Definition qetapp.cpp:1571
QAction * reduce_appli
Definition qetapp.h:180
QAction * restore_elements
Definition qetapp.h:185
static RecentFiles * projectsRecentFiles()
QETApp::projectsRecentFiles.
Definition qetapp.cpp:1463
QTranslator qetTranslator
Definition qetapp.h:175
static QStringList handledFileExtensions()
QETApp::handledFileExtensions.
Definition qetapp.cpp:945
bool every_diagram_reduced
Definition qetapp.h:193
void switchLayout(Qt::LayoutDirection)
Definition qetapp.cpp:268
static QMap< uint, QETProject * > registeredProjects()
QETApp::registeredProjects.
Definition qetapp.cpp:2475
static QString langFromSetting()
QETApp::langFromSetting.
Definition qetapp.cpp:251
static QETProject * projectFromString(const QString &)
QETApp::projectFromString.
Definition qetapp.cpp:2207
static ElementsCollectionCache * collections_cache_
Definition qetapp.h:212
QSystemTrayIcon * m_qsti
Definition qetapp.h:176
static QETDiagramEditor * diagramEditor(QETProject *project)
QETApp::diagramEditor.
Definition qetapp.cpp:1274
QPalette initial_palette_
System color palette.
Definition qetapp.h:207
void initSystemTray()
QETApp::initSystemTray Build the icon in the systray and its menu.
Definition qetapp.cpp:2084
void fetchWindowStats(const QList< QETDiagramEditor * > &, const QList< QETElementEditor * > &, const QList< QETTitleBlockTemplateEditor * > &)
QETApp::fetchWindowStats Updates the booleans concerning the state of the windows.
Definition qetapp.cpp:2365
QETArguments qet_arguments_
Command-line arguments parser.
Definition qetapp.h:200
static void resetCollectionsPath()
QETApp::resetCollectionsPath Reset the path of the user and common element collection and also the us...
Definition qetapp.cpp:707
void openElementFiles(const QStringList &)
QETApp::openElementFiles Open the elements files passed in parameter. If an element is already open,...
Definition qetapp.cpp:1669
static QMap< uint, QETProject * > registered_projects_
Definition qetapp.h:213
static void overrideLangDir(const QString &)
QETApp::overrideLangDir Redefines the path of the folder containing the language files.
Definition qetapp.cpp:1081
static QString symbolicPath(const QString &)
QETApp::symbolicPath Build the symbolic path (of the type custom: // tools_pervers / sado_maso / cont...
Definition qetapp.cpp:915
static TitleBlockTemplatesFilesCollection * commonTitleBlockTemplatesCollection()
QETApp::commonTitleBlockTemplatesCollection.
Definition qetapp.cpp:429
static QString m_company_element_dir
Definition qetapp.h:222
QETApp()
QETApp::QETApp.
Definition qetapp.cpp:98
static void printVersion()
QETApp::printVersion Print version to standard output.
Definition qetapp.cpp:2455
static QString m_common_element_dir
Definition qetapp.h:219
Definition qetarguments.h:26
Definition qetdiagrameditor.h:55
Definition qetelementeditor.h:39
Definition qetproject.h:62
Definition qettemplateeditor.h:38
Definition qtextorientationspinboxwidget.h:27
Definition recentfiles.h:26
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition titleblocktemplate.h:37
Definition templatelocation.h:29
Definition templatescollection.h:35
Definition templatescollection.h:125