mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-08 04:34:12 +02:00
Fix grid and guide startup behavior and update german translation
This commit is contained in:
+23
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user