Fix grid and guide startup behavior and update german translation

This commit is contained in:
Kellermorph
2026-06-16 17:41:03 +02:00
parent 918db632ed
commit 4e0c075575
39 changed files with 5479 additions and 420 deletions
+23 -1
View File
@@ -28,7 +28,7 @@
#include "properties/xrefproperties.h"
#include "titleblock/templatescollection.h"
#include "titleblockproperties.h"
#include "diagram.h"
#ifdef BUILD_WITHOUT_KF5
#else
# include <KAutoSaveFile>
@@ -52,6 +52,23 @@ class TerminalStrip;
class KAutoSaveFile;
#endif
#include <QColor>
struct GuideProperties {
int orientation; // 0 = Horizontal, 1 = Vertical
qreal position;
QColor color;
bool operator==(const GuideProperties &other) const {
return orientation == other.orientation &&
position == other.position &&
color == other.color;
}
bool operator!=(const GuideProperties &other) const {
return !(*this == other);
}
};
/**
This class represents a QET project. Typically saved as a .qet file, it
consists in an XML document grouping 0 to n diagrams and embedding an elements
@@ -115,6 +132,9 @@ class QETProject : public QObject
BorderProperties defaultBorderProperties() const;
void setDefaultBorderProperties(const BorderProperties &);
QList<GuideProperties> defaultGuides() const;
void setDefaultGuides(const QList<GuideProperties> &guides);
TitleBlockProperties defaultTitleBlockProperties() const;
void setDefaultTitleBlockProperties(const TitleBlockProperties &);
@@ -267,6 +287,8 @@ class QETProject : public QObject
QString read_only_file_path_;
/// Default dimensions and properties for new diagrams created within the project
BorderProperties default_border_properties_ = BorderProperties::defaultProperties();
/// Default guides for new diagrams created within the project
QList<GuideProperties> m_default_guides;
/// Default conductor properties for new diagrams created within the project
ConductorProperties default_conductor_properties_ = ConductorProperties::defaultProperties();
/// Default title block properties for new diagrams created within the project