Add toolbar widget for edit size of handler in diagram editor.

Add a combo box in the tool bar of diagram editor
to quickly change the size of the graphics handler item.

The sarto commit :D

NOTE
only available for diagram editor, element editor will
come later.
This commit is contained in:
joshua
2022-01-03 21:01:25 +01:00
parent e087270b6d
commit ae9faa2192
11 changed files with 223 additions and 6 deletions

View File

@@ -43,6 +43,7 @@
#include "undocommand/rotatetextscommand.h"
#include "diagram.h"
#include "TerminalStrip/ui/terminalstripeditor.h"
#include "ui/diagrameditorhandlersizewidget.h"
#ifdef BUILD_WITHOUT_KF5
#else
@@ -65,6 +66,9 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) :
m_file_actions_group (this),
open_dialog_dir (QStandardPaths::writableLocation(QStandardPaths::DesktopLocation))
{
//Trivial property use to set the graphics handler size
setProperty("graphics_handler_size", 10);
activeSubWindowIndex = 0;
QSplitter *splitter_ = new QSplitter(this);
@@ -732,6 +736,8 @@ void QETDiagramEditor::setUpToolBar()
view_tool_bar -> addAction(m_mode_selection);
view_tool_bar -> addAction(m_mode_visualise);
view_tool_bar -> addSeparator();
view_tool_bar -> addWidget(new DiagramEditorHandlerSizeWidget(this));
view_tool_bar -> addSeparator();
view_tool_bar -> addAction(m_draw_grid);
view_tool_bar -> addAction (m_grey_background);
view_tool_bar -> addSeparator();