mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Merge branch 'terminal_strip'
* terminal_strip: Terminal strip item can saved / loaded to .qet file See previous commit... Move terminal strip drawer class in is own file Fix wrong use of QStringLiteral and QLatin1String Double click a TerminalStripItem open the editor Minor change about checkable QAction of QetDiagramEditor Minor : corrects a minor aesthetic defect when unbridge terminals Revamp code Add and move terminal strip item are now managed by undo command TerminalStripItem : Draw terminal bridge Terminal strip item can be added to diagram Minor : add QGIUtility namespace
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "ui/aboutqetdialog.h"
|
||||
#include "ui/configpage/generalconfigurationpage.h"
|
||||
#include "machine_info.h"
|
||||
#include "TerminalStrip/ui/terminalstripeditorwindow.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
@@ -159,6 +160,7 @@ QETApp::~QETApp()
|
||||
ElementFactory::dropInstance();
|
||||
ElementPictureFactory::dropInstance();
|
||||
MachineInfo::dropInstance();
|
||||
TerminalStripEditorWindow::dropInstance();
|
||||
}
|
||||
|
||||
|
||||
@@ -1129,7 +1131,28 @@ QFont QETApp::indiTextsItemFont(qreal size)
|
||||
*/
|
||||
QList<QETDiagramEditor *> QETApp::diagramEditors()
|
||||
{
|
||||
return(QETApp::instance() -> detectWindows<QETDiagramEditor>());
|
||||
return(QETApp::instance() -> detectWindows<QETDiagramEditor>());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief QETApp::diagramEditor
|
||||
* @param project
|
||||
* @return The diagram editor of @a project or nullptr.
|
||||
*/
|
||||
QETDiagramEditor *QETApp::diagramEditor(QETProject *project)
|
||||
{
|
||||
for (const auto &editor : QETApp::instance()->detectWindows<QETDiagramEditor>())
|
||||
{
|
||||
for (const auto &project_view : editor->openedProjects())
|
||||
{
|
||||
if (project_view->project() == project)
|
||||
{
|
||||
return editor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user