Merge branch 'master' into qt6_cmake_joshua

This commit is contained in:
joshua
2026-07-31 21:15:21 +02:00
parent f16cf7dac8
commit e6d29cf345
297 changed files with 82691 additions and 27463 deletions
+26 -13
View File
@@ -24,7 +24,6 @@
#include "elementtextsmover.h"
#include "exportproperties.h"
#include "properties/xrefproperties.h"
#include "qetproject.h"
#include "qgimanager.h"
#include <QHash>
@@ -39,12 +38,11 @@ class DiagramPosition;
class DiagramTextItem;
class Element;
class ElementsLocation;
class QETProject;
class Terminal;
class DiagramImageItem;
class DiagramEventInterface;
class DiagramFolioList;
class QETProject;
struct GuideProperties;
/**
@brief The Diagram class
@@ -67,6 +65,13 @@ class Diagram : public QGraphicsScene
// ATTRIBUTES
public:
struct Guide {
enum Orientation { Horizontal, Vertical };
Orientation orientation;
qreal position;
QColor color;
};
/**
@brief The BorderOptions enum
Represents available options when rendering a particular diagram:
@@ -119,6 +124,8 @@ class Diagram : public QGraphicsScene
bool draw_grid_;
bool use_border_;
bool draw_guides_;
QList<Diagram::Guide> m_guides_list;
bool draw_terminals_;
bool draw_colored_conductors_;
@@ -142,10 +149,11 @@ class Diagram : public QGraphicsScene
void wheelEvent (QGraphicsSceneWheelEvent *event) override;
void keyPressEvent (QKeyEvent *event) override;
void keyReleaseEvent (QKeyEvent *) override;
void correctTextPos(Element* elmt);
void restoreText(Element* elmt);
public:
void correctTextPos(Element* elmt);
void restoreText(Element* elmt);
QUuid uuid();
void setEventInterface (DiagramEventInterface *event_interface);
void clearEventInterface();
@@ -206,6 +214,9 @@ class Diagram : public QGraphicsScene
ExportProperties applyProperties(const ExportProperties &);
void setDisplayGrid(bool);
bool displayGrid();
void setDisplayGuides(bool);
bool displayGuides();
void updateProjectGuides(const QList<GuideProperties> &guides);
void setUseBorder(bool);
bool useBorder();
void setBorderOptions(BorderOptions);
@@ -340,6 +351,16 @@ inline bool Diagram::displayGrid() {
return(draw_grid_);
}
inline void Diagram::setDisplayGuides(bool dg) {
if (draw_guides_ != dg) {
draw_guides_ = dg;
update();
}
}
inline bool Diagram::displayGuides() {
return(draw_guides_);
}
/**
@brief Diagram::setUseBorder
Set whether the diagram border (including rows/columns headers and the title
@@ -388,14 +409,6 @@ inline Diagram::BorderOptions Diagram::borderOptions() {
return(options);
}
/**
@brief Diagram::undoStack
@return the diagram undo stack
*/
inline QUndoStack &Diagram::undoStack() {
return *(project()->undoStack());
}
/**
@brief Diagram::qgiManager
@return the diagram graphics item manager