|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
21 #include <QTranslator>
22 #include <QSystemTrayIcon>
35 #define QETAPP_COMMON_TBT_PROTOCOL "commontbt"
36 #define QETAPP_CUSTOM_TBT_PROTOCOL "customtbt"
105 static QString
realPath(
const QString &);
112 #ifdef QET_ALLOW_OVERRIDE_CED_OPTION
114 static void overrideCommonElementsDir(
const QString &);
120 static QString common_elements_dir;
123 #ifdef QET_ALLOW_OVERRIDE_CTBTD_OPTION
125 static void overrideCommonTitleBlockTemplatesDir(
const QString &);
132 static QString common_tbt_dir_;
135 #ifdef QET_ALLOW_OVERRIDE_CD_OPTION
137 static void overrideConfigDir(
const QString &);
144 static QString config_dir;
171 bool eventFiltrer(QObject *
object, QEvent *);
225 void systray(QSystemTrayIcon::ActivationReason);
267 const QList<QETDiagramEditor *> &,
268 const QList<QETElementEditor *> &,
269 const QList<QETTitleBlockTemplateEditor *> &
static QETDiagramEditor * diagramEditorAncestorOf(const QWidget *child)
QETApp::diagramEditorAncestorOf.
Definition: qetapp.cpp:961
void openTitleBlockTemplateFiles(const QStringList &)
QETApp::openTitleBlockTemplateFiles Open provided title block template files. If a title block templa...
Definition: qetapp.cpp:1703
void initSystemTray()
QETApp::initSystemTray Build the icon in the systray and its menu.
Definition: qetapp.cpp:1985
static QList< QETTitleBlockTemplateEditor * > titleBlockTemplateEditors()
QETApp::titleBlockTemplateEditors.
Definition: qetapp.cpp:1231
static QFont dynamicTextsItemFont(qreal=-1.0)
QETApp::dynamicTextsFont the default font of dynamic element text item.
Definition: qetapp.cpp:1169
void initLanguage()
QETApp::initLanguage Determine and apply the language to use for the application.
Definition: qetapp.cpp:1920
virtual bool printVersionRequested() const
Definition: qetarguments.cpp:376
QTranslator qetTranslator
Definition: qetapp.h:178
QAction * restore_appli
Definition: qetapp.h:184
void initStyle()
QETApp::initStyle Setup the gui style.
Definition: qetapp.cpp:1928
static void overrideLangDir(const QString &)
QETApp::overrideLangDir Redefines the path of the folder containing the language files.
Definition: qetapp.cpp:1034
void initSplashScreen()
QETApp::initSplashScreen Initializes the splash screen if and only if the execution is interactive....
Definition: qetapp.cpp:1888
static ElementsCollectionCache * collectionCache()
QETApp::collectionCache.
Definition: qetapp.cpp:358
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:2246
void initConfiguration()
QETApp::initConfiguration Reads and takes into account the configuration of the application....
Definition: qetapp.cpp:1950
QAction * restore_elements
Definition: qetapp.h:188
static QString customTitleBlockTemplatesDir()
QETApp::customTitleBlockTemplatesDir.
Definition: qetapp.cpp:758
static QMap< uint, QETProject * > registered_projects_
Definition: qetapp.h:215
static QString symbolicPath(const QString &)
QETApp::symbolicPath Build the symbolic path (of the type custom: // tools_pervers / sado_maso / cont...
Definition: qetapp.cpp:874
static QString diagramTranslatedInfoKey(const QString &key)
QETApp::diagramTranslatedInfoKey.
Definition: qetapp.cpp:502
void restoreEveryEditor()
QETApp::restoreEveryEditor Restores all application windows in the systray.
Definition: qetapp.cpp:276
QAction * reduce_diagrams
Definition: qetapp.h:185
static QList< QETElementEditor * > elementEditors()
QETApp::elementEditors.
Definition: qetapp.cpp:1223
virtual QList< QString > titleBlockTemplateFiles() const
Definition: qetarguments.cpp:149
QIcon Restore
Definition: qeticons.cpp:156
bool every_diagram_visible
Definition: qetapp.h:197
The AboutQETDialog class.
Definition: aboutqetdialog.h:33
virtual QString langDir() const
Definition: qetarguments.cpp:352
The PrintConfigPage class This configuration page enables users to set default printing options.
Definition: configpages.h:103
The QETApp class This class represents the QElectroTech application.
Definition: qetapp.h:55
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:842
Definition: qettemplateeditor.h:36
static TitleBlockTemplatesFilesCollection * m_common_tbt_collection
Definition: qetapp.h:212
QTranslator qtTranslator
Definition: qetapp.h:177
@ Custom
From user collection.
Definition: qet.h:154
void checkBackupFiles()
QETApp::checkBackupFiles Check for backup files. If backup was found, open a dialog and ask user what...
Definition: qetapp.cpp:2160
void restoreTitleBlockTemplateEditors()
QETApp::restoreTitleBlockTemplateEditors Restore all known template editors.
Definition: qetapp.cpp:332
static QString customElementsDir()
QETApp::customElementsDir.
Definition: qetapp.cpp:657
void newElementEditor()
QETApp::newElementEditor launches a new element editor.
Definition: qetapp.cpp:350
static QList< TitleBlockTemplatesCollection * > availableTitleBlockTemplatesCollections()
QETApp::availableTitleBlockTemplatesCollections.
Definition: qetapp.cpp:560
virtual bool langDirSpecified() const
Definition: qetarguments.cpp:344
QSystemTrayIcon * m_qsti
Definition: qetapp.h:179
static QTextOrientationSpinBoxWidget * createTextOrientationSpinBoxWidget()
QETApp::createTextOrientationSpinBoxWidget Instantiates a QTextOrientationSpinBoxWidget and configure...
Definition: qetapp.cpp:1272
static bool registerProject(QETProject *)
QETApp::registerProject.
Definition: qetapp.cpp:2368
Definition: recentfiles.h:26
static QString commonTitleBlockTemplatesDir()
QETApp::commonTitleBlockTemplatesDir.
Definition: qetapp.cpp:729
static QList< QETDiagramEditor * > diagramEditors()
QETApp::diagramEditors.
Definition: qetapp.cpp:1214
void setMainWindowsVisible(bool)
Definition: qetapp.cpp:1375
#define QUOTE(x)
Definition: qetapp.cpp:39
QAction * restore_diagrams
Definition: qetapp.h:186
QStringList splitWithSpaces(const QString &)
Definition: qet.cpp:469
Definition: elementscollectioncache.h:31
static QStringList elementInfoKeys()
QETApp::elementInfoKeys.
Definition: qetapp.cpp:366
void checkRemainingWindows()
QETApp::checkRemainingWindows Check if there are any windows (hidden or not) and exit if there are no...
Definition: qetapp.cpp:1489
bool every_template_visible
Definition: qetapp.h:201
void setMainWindowVisible(QMainWindow *, bool)
QETApp::setMainWindowVisible Show or hide a window (schema editors / element editors)
Definition: qetapp.cpp:1409
static TitleBlockTemplatesFilesCollection * commonTitleBlockTemplatesCollection()
QETApp::commonTitleBlockTemplatesCollection.
Definition: qetapp.cpp:521
void configureQET()
QETApp::configureQET Allows the user to configure QET by launching an appropriate dialog.
Definition: qetapp.cpp:1744
bool every_editor_reduced
Definition: qetapp.h:195
virtual bool printLicenseRequested() const
Definition: qetarguments.cpp:368
void openProjectFiles(const QStringList &)
QETApp::openProjectFiles Opens a list of files. Files are opened in the first visible schematic edito...
Definition: qetapp.cpp:1540
static QETDiagramEditor * diagramEditorForFile(const QString &)
QETApp::diagramEditorForFile.
Definition: qetapp.cpp:940
QAction * reduce_elements
Definition: qetapp.h:187
QIcon Hide
Definition: qeticons.cpp:113
static bool unregisterProject(QETProject *)
QETApp::unregisterProject Cancel the recording of the project project.
Definition: qetapp.cpp:2395
static void resetUserElementsDir()
QETApp::resetUserElementsDir Reset the path of the user common and custom elements dir....
Definition: qetapp.cpp:717
QIcon Element
Definition: qeticons.cpp:83
QSplashScreen * m_splash_screen
Definition: qetapp.h:180
void addPage(ConfigPage *)
Definition: configdialog.cpp:132
void initIcons()
Definition: qeticons.cpp:372
void systray(QSystemTrayIcon::ActivationReason)
QETApp::systray Manages QSystemTrayIcon related events.
Definition: qetapp.cpp:229
static QString languagesPath()
QETApp::languagesPath.
Definition: qetapp.cpp:1047
static void dropInstance()
dropInstance Drop the instance of factory
Definition: elementpicturefactory.h:73
void addWindowsListToMenu(QMenu *, const QList< T * > &)
Definition: qetapp.cpp:2055
@ TitleBlockTemplate
Definition: qet.h:105
QList< T * > detectWindows() const
Definition: qetapp.cpp:1360
void reduceEveryEditor()
QETApp::reduceEveryEditor Minimizes all application windows in the systray.
Definition: qetapp.cpp:264
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition: titleblocktemplate.h:36
Definition: templatescollection.h:124
Definition: qetarguments.h:26
static QFont indiTextsItemFont(qreal=-1.0)
QETApp::indiTextsItemFont The default font to use for independent text item.
Definition: qetapp.cpp:1193
static QString elementTranslatedInfoKey(const QString &)
ElementsProperties::translatedInfo Return the translated information key given by info If info don't ...
Definition: qetapp.cpp:400
static RecentFiles * elementsRecentFiles()
QETApp::elementsRecentFiles.
Definition: qetapp.cpp:1395
static QStringList conductorInfoKeys()
QETApp::conductorInfoKeys.
Definition: qetapp.cpp:446
static QString lang_dir
lang_dir Directory containing localization files.
Definition: qetapp.h:153
#define QETAPP_CUSTOM_TBT_PROTOCOL
Definition: qetapp.h:36
bool isNull() const
ElementsLocation::isNull.
Definition: elementslocation.cpp:387
Definition: configdialog.h:31
QAction * reduce_templates
Definition: qetapp.h:189
static QString m_user_custom_tbt_dir
Definition: qetapp.h:222
QMessageBox::StandardButton question(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons=QMessageBox::Ok, QMessageBox::StandardButton=QMessageBox::NoButton)
Definition: qetmessagebox.cpp:53
QIcon ProjectFile
Definition: qeticons.cpp:147
static QETProject * projectFromString(const QString &)
QETApp::projectFromString.
Definition: qetapp.cpp:2093
const QString displayedVersion
QElectroTech displayed version.
Definition: qet.h:34
virtual QList< QString > projectFiles() const
Definition: qetarguments.cpp:135
The ExportConfigPage class This configuration page enables users to set default export options.
Definition: configpages.h:79
The NewDiagramPage class This configuration page enables users to define the properties of new diagra...
Definition: configpages.h:39
static QString commonElementsDir()
QETApp::commonElementsDir.
Definition: qetapp.cpp:598
Definition: qtextorientationspinboxwidget.h:27
static RecentFiles * m_projects_recent_files
Definition: qetapp.h:217
bool non_interactive_execution_
non_interactive_execution_ Whether the application will end without any user interaction
Definition: qetapp.h:209
static QString conductorTranslatedInfoKey(const QString &key)
QETApp::conductorTranslatedInfoKey.
Definition: qetapp.cpp:465
QString license()
Definition: qet.cpp:373
static int projectIdFromString(const QString &)
QETApp::projectIdFromString.
Definition: qetapp.cpp:2074
bool every_diagram_reduced
Definition: qetapp.h:196
Definition: templatelocation.h:29
void setLocale(const QString &)
Definition: elementscollectioncache.cpp:119
static TitleBlockTemplatesFilesCollection * customTitleBlockTemplatesCollection()
QETApp::customTitleBlockTemplatesCollection.
Definition: qetapp.cpp:541
static QStringList diagramInfoKeys()
QETApp::diagramInfoKeys.
Definition: qetapp.cpp:480
QString filePath()
Definition: qetproject.cpp:250
QIcon de
Definition: qeticons.cpp:188
QList< QWidget * > floatingToolbarsAndDocksForMainWindow(QMainWindow *) const
QETApp::floatingToolbarsAndDocksForMainWindow.
Definition: qetapp.cpp:1793
static void dropInstance()
Definition: elementfactory.h:49
void setSplashScreenStep(const QString &=QString())
QETApp::setSplashScreenStep Changes the text of the splash screen and takes events into account....
Definition: qetapp.cpp:1906
static QStringList handledFileExtensions()
QETApp::handledFileExtensions.
Definition: qetapp.cpp:899
void openElementFiles(const QStringList &)
QETApp::openElementFiles Open the elements files passed in parameter. If an element is already open,...
Definition: qetapp.cpp:1586
static int projectId(const QETProject *)
QETApp::projectId.
Definition: qetapp.cpp:2433
QPalette initial_palette_
System color palette.
Definition: qetapp.h:210
static QMap< uint, QETProject * > registeredProjects()
QETApp::registeredProjects.
Definition: qetapp.cpp:2353
static QString customElementsDirN()
QETApp::customElementsDirN like QString QETApp::customElementsDir but without "/" at the end.
Definition: qetapp.cpp:705
#define QETAPP_COMMON_TBT_PROTOCOL
Definition: qetapp.h:35
QAction * quitter_qet
Definition: qetapp.h:182
~QETApp() override
QETApp::~QETApp.
Definition: qetapp.cpp:128
virtual bool printHelpRequested() const
Definition: qetarguments.cpp:360
QIcon QETLogo
Definition: qeticons.cpp:151
void reduceElementEditors()
QETApp::reduceElementEditors Minimize all element editors in systray.
Definition: qetapp.cpp:307
void openElementLocations(const QList< ElementsLocation > &)
QETApp::openElementLocations Open the elements whose location is passed in parameter....
Definition: qetapp.cpp:1637
static void printHelp()
QETApp::printHelp Display help and usage on standard output.
Definition: qetapp.cpp:2306
bool every_element_reduced
Definition: qetapp.h:198
static void printVersion()
QETApp::printVersion Print version to standard output.
Definition: qetapp.cpp:2335
bool every_element_visible
Definition: qetapp.h:199
QIcon WindowNew
Definition: qeticons.cpp:175
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition: elementslocation.h:46
void receiveMessage(int instanceId, QByteArray message)
QETApp::receiveMessage openFiles from message.
Definition: qetapp.cpp:1342
static QETApp * instance()
QETApp::instance.
Definition: qetapp.cpp:153
void openFiles(const QETArguments &)
QETApp::openFiles Open files passed as arguments.
Definition: qetapp.cpp:1519
static RecentFiles * projectsRecentFiles()
QETApp::projectsRecentFiles.
Definition: qetapp.cpp:1386
QHash< QMainWindow *, QByteArray > window_geometries
Definition: qetapp.h:193
bool closeEveryEditor()
QETApp::closeEveryEditor Close all editors.
Definition: qetapp.cpp:1087
static QString elementInfoToVar(const QString &info)
QETApp::elementInfoToVar.
Definition: qetapp.cpp:435
void openTitleBlockTemplate(const TitleBlockTemplateLocation &, bool=false)
QETApp::openTitleBlockTemplate Launch a new title block template editor to edit the given template.
Definition: qetapp.cpp:1677
Definition: qetproject.h:51
static QString commonElementsDirN()
QETApp::commonElementsDirN like QString QETApp::commonElementsDir but without "/" at the end.
Definition: qetapp.cpp:693
void reduceTitleBlockTemplateEditors()
QETApp::reduceTitleBlockTemplateEditors Reduce all known template editors.
Definition: qetapp.cpp:324
static QETApp * m_qetapp
Definition: qetapp.h:176
void aboutQET()
QETApp::aboutQET Open the dialog about qet.
Definition: qetapp.cpp:1775
void save()
Definition: recentfiles.cpp:93
void newDiagramEditor()
QETApp::newDiagramEditor launches a new schema editor.
Definition: qetapp.cpp:341
static QFont diagramTextsItemFont(qreal=-1.0)
QETApp::diagramTextsItemFont the font for to use in independent text item.
Definition: qetapp.cpp:1137
void switchLayout(Qt::LayoutDirection)
Definition: qetapp.cpp:217
Definition: qetdiagrameditor.h:51
static ElementsCollectionCache * collections_cache_
Definition: qetapp.h:214
void setLanguage(const QString &)
QETApp::setLanguage Change the language used by the application.
Definition: qetapp.cpp:166
static QETProject * project(const uint &)
QETApp::project.
Definition: qetapp.cpp:2416
void parseArguments()
QETApp::parseArguments Parse the following arguments:
Definition: qetapp.cpp:1833
static QStringList handledFiles(const QList< QUrl > &)
QETApp::handledFiles.
Definition: qetapp.cpp:914
QAction * reduce_appli
Definition: qetapp.h:183
QMenu * menu_systray
Definition: qetapp.h:181
Definition: generalconfigurationpage.h:29
QETApp()
QETApp::QETApp.
Definition: qetapp.cpp:73
static RecentFiles * m_elements_recent_files
Definition: qetapp.h:218
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:1111
void restoreDiagramEditors()
QETApp::restoreDiagramEditors Restore all schema editors in the systray.
Definition: qetapp.cpp:297
void quitQET()
QETApp::quitQET Request the closing of all windows; if the user accepts them, the application quits.
Definition: qetapp.cpp:1475
Definition: templatescollection.h:34
static TitleBlockTemplate * defaultTitleBlockTemplate()
QETApp::defaultTitleBlockTemplate.
Definition: qetapp.cpp:1294
static TitleBlockTemplate * default_titleblock_template_
Definition: qetapp.h:219
QETProject * project() const
ElementsLocation::project.
Definition: elementslocation.cpp:365
static uint next_project_id
Definition: qetapp.h:216
static void printLicense()
QETApp::printLicense Display license on standard output.
Definition: qetapp.cpp:2344
void useSystemPalette(bool)
QETApp::useSystemPalette Change the application palette.
Definition: qetapp.cpp:1451
void reduceDiagramEditors()
QETApp::reduceDiagramEditors Minimize all schema editors in the systray.
Definition: qetapp.cpp:288
#define TITLEBLOCKS_FILE_EXTENSION
Definition: templatescollection.h:20
QETArguments qet_arguments_
Comand-line arguments parser.
Definition: qetapp.h:203
void buildSystemTrayMenu()
QETApp::buildSystemTrayMenu builds the icon menu in the systray.
Definition: qetapp.cpp:2104
QSignalMapper signal_map
Definition: qetapp.h:202
@ Common
From common collection.
Definition: qet.h:153
QAction * new_diagram
Definition: qetapp.h:191
QHash< QMainWindow *, QByteArray > window_states
Definition: qetapp.h:194
QAction * new_element
Definition: qetapp.h:192
bool every_template_reduced
Definition: qetapp.h:200
void invertMainWindowVisibility(QWidget *)
QETApp::invertMainWindowVisibility Display a window (schema editors / element editors) if this is hid...
Definition: qetapp.cpp:1437
virtual QList< QString > files() const
Definition: qetarguments.cpp:128
void openBackupFiles(QList< KAutoSaveFile * > backup_files)
QETDiagramEditor::openBackupFiles.
Definition: qetdiagrameditor.cpp:1791
QIcon tr
Definition: qeticons.cpp:206
static QString langFromSetting()
QETApp::langFromSetting.
Definition: qetapp.cpp:205
void restoreElementEditors()
QETApp::restoreElementEditors Restore all element editors in the systray.
Definition: qetapp.cpp:316
virtual QList< QString > elementFiles() const
Definition: qetarguments.cpp:142
QIcon Cancel
Definition: qeticons.cpp:34
Definition: qetelementeditor.h:33
static TitleBlockTemplatesFilesCollection * m_custom_tbt_collection
Definition: qetapp.h:213
static QString m_user_custom_elements_dir
Definition: qetapp.h:221
QAction * restore_templates
Definition: qetapp.h:190
static QString m_user_common_elements_dir
Definition: qetapp.h:220
static QString configDir()
QETApp::configDir Return the QET configuration folder, i.e. the path to the folder in which QET will ...
Definition: qetapp.cpp:805
QIcon ApplicationExit
Definition: qeticons.cpp:27
static TitleBlockTemplatesCollection * titleBlockTemplatesCollection(const QString &)
QETApp::titleBlockTemplatesCollection.
Definition: qetapp.cpp:579