QElectroTech
0.8-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. 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 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 QETProject * | projectFromString (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 QETApp * | m_qetapp = nullptr |
static TitleBlockTemplatesFilesCollection * | m_common_tbt_collection |
static TitleBlockTemplatesFilesCollection * | m_custom_tbt_collection |
static ElementsCollectionCache * | collections_cache_ = nullptr |
static QMap< uint, QETProject * > | registered_projects_ = QMap<uint, QETProject *>() |
static uint | next_project_id = 0 |
static RecentFiles * | m_projects_recent_files = nullptr |
static RecentFiles * | m_elements_recent_files = nullptr |
static TitleBlockTemplate * | default_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() |
The QETApp class This class represents the QElectroTech application.
QETApp::QETApp | ( | ) |
|
override |
|
private |
|
slot |
QETApp::aboutQET Open the dialog about qet.
|
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::conductorTranslatedInfoKey.
key |
|
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 |
QETApp::diagramEditorAncestorOf.
child |
|
static |
filepath | : A file path |
|
static |
|
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::diagramTranslatedInfoKey.
key |
|
static |
QETApp::dynamicTextsFont the default font of dynamic element text item.
size |
|
static |
|
static |
project | : a project |
|
static |
|
static |
info |
|
static |
|
static |
ElementsProperties::translatedInfo Return the translated information key given by info If info don't match, return an empty string.
info | the key to be translated |
|
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 |
|
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::resetUserElementsDir Reset the path of the user common and custom elements dir. Use this function when the user path (common and/or custom) 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 |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
non_interactive_execution_ Whether the application will end without any user interaction
|
private |
Comand-line arguments parser.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |