QElectroTech
0.8-dev
|
#include <qettemplateeditor.h>
Public Slots | |
void | readSettings () |
QETTitleBlockTemplateEditor::readSettings Read settings. More... | |
void | writeSettings () |
QETTitleBlockTemplateEditor::writeSettings Write the settings. More... | |
void | selectedCellsChanged (const QList< TitleBlockCell * > &) |
void | duplicateCurrentLocation () |
bool | edit (const TitleBlockTemplateLocation &) |
bool | edit (QETProject *, const QString &) |
bool | edit (const QString &) |
bool | editCopyOf (const TitleBlockTemplate *) |
bool | edit (TitleBlockTemplate *) |
void | editLogos () |
void | newTemplate () |
void | open () |
void | openFromFile () |
bool | save () |
bool | saveAs () |
bool | saveAsFile () |
void | setReadOnly (bool) |
void | quit () |
void | savePreviewWidthToApplicationSettings (int, int) |
QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings Save the new preview width to application settings. More... | |
void | editTemplateInformation () |
Public Slots inherited from QETMainWindow | |
void | toggleFullScreen () |
void | updateFullScreenAction () |
void | checkToolbarsmenu () |
Public Member Functions | |
QETTitleBlockTemplateEditor (QWidget *=nullptr) | |
~QETTitleBlockTemplateEditor () override | |
TitleBlockTemplateLocation | location () const |
bool | isEditing (const QString &ilepath) |
void | setOpenForDuplication (bool) |
QETTitleBlockTemplateEditor::setOpenForDuplication. More... | |
bool | openForDuplication () const |
Public Member Functions inherited from QETMainWindow | |
QETMainWindow (QWidget *=nullptr, Qt::WindowFlags=Qt::Widget) | |
~QETMainWindow () override | |
Protected Member Functions | |
bool | canClose () |
void | firstActivation (QEvent *) override |
void | closeEvent (QCloseEvent *) override |
Protected Member Functions inherited from QETMainWindow | |
void | initCommonActions () |
void | initCommonMenus () |
void | insertMenu (QMenu *, QMenu *, bool=true) |
QAction * | actionForMenu (QMenu *) |
bool | event (QEvent *) override |
void | dragEnterEvent (QDragEnterEvent *e) override |
void | dropEvent (QDropEvent *e) override |
Private Slots | |
TitleBlockTemplateLocation | getTitleBlockTemplateLocationFromUser (const QString &=QString(), bool existing_only=true) |
void | pushCellUndoCommand (ModifyTitleBlockCellCommand *) |
void | pushGridUndoCommand (TitleBlockTemplateCommand *) |
void | pushUndoCommand (QUndoCommand *) |
void | updateEditorTitle () |
void | updateActions () |
bool | saveAs (const TitleBlockTemplateLocation &) |
bool | saveAs (const QString &) |
Private Member Functions | |
QETTitleBlockTemplateEditor (const QETTitleBlockTemplateEditor &) | |
void | initActions () |
void | initMenus () |
void | initToolbars () |
void | initWidgets () |
void | initLogoManager () |
QString | currentlyEditedTitle () const |
Private Attributes | |
QMenu * | file_menu_ |
menus TODO More... | |
QMenu * | edit_menu_ |
QMenu * | display_menu_ |
QAction * | new_ |
actions More... | |
QAction * | open_ |
QAction * | open_from_file_ |
QAction * | save_ |
QAction * | save_as_ |
QAction * | save_as_file_ |
QAction * | quit_ |
QAction * | undo_ |
QAction * | redo_ |
QAction * | cut_ |
QAction * | copy_ |
QAction * | paste_ |
QAction * | edit_logos_ |
QAction * | edit_info_ |
QAction * | add_row_ |
QAction * | add_col_ |
QAction * | merge_cells_ |
QAction * | split_cell_ |
QAction * | zoom_in_ |
QAction * | zoom_out_ |
QAction * | zoom_fit_ |
QAction * | zoom_reset_ |
TitleBlockTemplateLocation | location_ |
Location of the currently edited template. More... | |
QString | filepath_ |
Filepath of the currently edited template, if opened from a file. More... | |
bool | opened_from_file_ |
Whether to consider the location or the filepath. More... | |
bool | read_only_ |
whether the currently edited template is considered read only More... | |
bool | duplicate_ |
bool | first_activation_ |
Used to track the first activation of the editor main window. More... | |
TitleBlockTemplate * | tb_template_ |
Template Object edited. More... | |
QGraphicsScene * | template_edition_area_scene_ |
Template preview. More... | |
TitleBlockTemplateView * | template_edition_area_view_ |
QDockWidget * | template_cell_editor_dock_widget_ |
Individual cell widget edition. More... | |
TitleBlockTemplateCellWidget * | template_cell_editor_widget_ |
TitleBlockTemplateLogoManager * | logo_manager_ |
Logo manager widget. More... | |
QUndoStack * | undo_stack_ |
Undo interface. More... | |
QUndoView * | undo_view_ |
QDockWidget * | undo_dock_widget_ |
Additional Inherited Members | |
Protected Attributes inherited from QETMainWindow | |
QAction * | configure_action_ |
Launch the QElectroTech configuration dialog. More... | |
QAction * | fullscreen_action_ |
Toggle full screen. More... | |
QAction * | whatsthis_action_ |
Toggle "What's this" mode. More... | |
QAction * | about_qet_ |
Launch the "About QElectroTech" dialog. More... | |
QAction * | manual_online_ |
Launch browser on QElectroTech online manual. More... | |
QAction * | youtube_ |
Launch browser on QElectroTech Youtube channel. More... | |
QAction * | upgrade_ |
Launch browser on QElectroTech Windows Nightly builds. More... | |
QAction * | upgrade_M |
Launch browser on QElectroTech MAC_OS_X builds. More... | |
QAction * | donate_ |
Launch browser to donate link. More... | |
QAction * | about_qt_ |
launch the "About Qt" dialog More... | |
QMenu * | settings_menu_ |
Settings menu. More... | |
QMenu * | help_menu_ |
Help menu. More... | |
QMenu * | display_toolbars_ |
Show/hide toolbars/docks. More... | |
QHash< QMenu *, QAction * > | menu_actions_ |
Store actions retrieved when inserting menus. More... | |
bool | first_activation_ |
Used to detect whether the window is activated for the first time. More... | |
This class implements the main window of QElectroTech's titleblock template editor. This editor aims at allowing users to easily create their own title block templates.
QETTitleBlockTemplateEditor::QETTitleBlockTemplateEditor | ( | QWidget * | parent = nullptr | ) |
parent | parent QWidget of this window |
|
override |
Destructor
|
private |
|
protected |
|
overrideprotected |
Handle the closing of the main window
qce | The QCloseEvent event |
|
private |
|
slot |
Ask the user for a new template name in order to duplicate the currently edited template.
|
slot |
file_path | Path of the template file to edit. |
TODO the file opening failed, warn the user?
TODO the file editing failed, warn the user?
|
slot |
location | Location of the tile block template to be edited. |
TODO The TBT does not exist, manage error
|
slot |
Edit the given template.
project | Parent project of the template to edit. |
template_name | Name of the template to edit within its parent project. |
TODO The TBT does not exist, manage error
|
slot |
tbt | Title block template to be directly edited |
|
slot |
tbt | Title block template to be edited |
|
slot |
Launches the logo manager widget, which allows the user to manage the logos embedded within the edited template.
|
slot |
Edit extra information attached to the template.
|
overrideprotectedvirtual |
event | Object describing the received event. |
Reimplemented from QETMainWindow.
|
privateslot |
Ask the user for a title block template location
title | Title displayed by the dialog window |
existing_only | True for the user to be forced to choose an existing template, false if he may specify the template name |
|
private |
Initialize the various actions.
|
private |
Initialize the logo manager
|
private |
Initialize the various menus.
|
private |
Initalize toolbars.
|
private |
Initialize layouts and widgets
bool QETTitleBlockTemplateEditor::isEditing | ( | const QString & | filepath | ) |
filepath | path of a title block template on the filesystem |
TitleBlockTemplateLocation QETTitleBlockTemplateEditor::location | ( | ) | const |
|
slot |
Launch a new title block template editor.
|
slot |
Ask the user to choose a title block template from the known collections then open it for edition.
bool QETTitleBlockTemplateEditor::openForDuplication | ( | ) | const |
|
slot |
Ask the user to choose a file supposed to contain a title block template, then open it for edition.
|
privateslot |
Configure an undo Command before adding it to the undo stack.
command | to be added to the undo stack |
|
privateslot |
Add an undo Command to the undo stack.
command | QUndoCommand to be added to the undo stack |
|
privateslot |
Add an undo Command to the undo stack.
command | QUndoCommand to be added to the undo stack |
|
slot |
Close the current editor.
|
slot |
QETTitleBlockTemplateEditor::readSettings Read settings.
|
slot |
Save the currently edited title block template back to its parent project.
|
slot |
Ask the user where he wishes to save the currently edited template.
|
privateslot |
Save the template in the provided filepath.
filepath | location Location where the title block template should be saved. |
|
privateslot |
Save the template under the provided location.
location | Location where the title block template should be saved. |
|
slot |
Ask the user where on the filesystem he wishes to save the currently edited template.
|
slot |
QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings Save the new preview width to application settings.
former_preview_width | : former_preview_width Unused, former preview width |
new_preview_width | : new_preview_width New preview width |
|
slot |
Update various things when user changes the selected cells.
selected_cells | List of selected cells. |
void QETTitleBlockTemplateEditor::setOpenForDuplication | ( | bool | duplicate | ) |
QETTitleBlockTemplateEditor::setOpenForDuplication.
duplicate | : true for this editor to prompt the user for a new template name as soon as the window appears in order to duplicate the edited one. |
|
slot |
read_only | True to restrict this editor to visualization of the currently edited template, false to allow full edition. |
|
privateslot |
Ensure the user interface remains consistent by enabling or disabling adequate actions.
|
privateslot |
Set the title of this editor.
|
slot |
QETTitleBlockTemplateEditor::writeSettings Write the settings.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Whether to ask the user a new template name when the window appears in order to rename the edited template.
|
private |
|
private |
|
private |
|
private |
menus TODO
|
private |
Filepath of the currently edited template, if opened from a file.
|
private |
Used to track the first activation of the editor main window.
|
private |
Location of the currently edited template.
|
private |
Logo manager widget.
|
private |
|
private |
actions
|
private |
|
private |
|
private |
Whether to consider the location or the filepath.
|
private |
|
private |
|
private |
whether the currently edited template is considered read only
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Template Object edited.
|
private |
Individual cell widget edition.
|
private |
|
private |
Template preview.
|
private |
|
private |
|
private |
|
private |
Undo interface.
|
private |
|
private |
|
private |
|
private |
|
private |