+
/**
@brief myMessageOutput
for debugging
@@ -204,6 +207,32 @@ int main(int argc, char **argv)
delete my_ma;
}
+ if(! QET::FileFormatStable){
+ QMessageBox::StandardButton btn = QMessageBox::critical(
+ nullptr,
+ QCoreApplication::translate(
+ "main",
+ "Unstable file format!"),
+ QCoreApplication::translate(
+ "main",
+ "ATTENTION: This application version is UNSTABLE!
"
+
+ "Everything you do with this application can break your "
+ "workspace, libraries or projects! Saved files will not be "
+ "readable with stable releases of QElectroTech. It's highly "
+ "recommended to create a backup before proceeding. If you are "
+ "unsure, please download an official stable release instead.
"
+
+// "For details, please take a look at QElectroTech's "
+// "versioning concept.
"
+
+ "Are you really sure to continue with the risk of breaking your "
+ "files?!
","this text is not finished yet, expect changes!")
+ .arg("doc_release_workflow"),
+ QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+ if (!(btn == QMessageBox::Yes))
+ return 1;
+ }
return app.exec();
}
diff --git a/sources/qet.h b/sources/qet.h
index 190fc86a2..d3a2b0f5c 100644
--- a/sources/qet.h
+++ b/sources/qet.h
@@ -28,10 +28,19 @@ class QActionGroup;
anywhere else within the QElectroTech application.
*/
namespace QET {
+ /// Read the release workflow documentation
+ /// before making changes here!!!
+
/// QElectroTech version (as string, used to mark projects and elements XML documents)
const QString version = "0.80";
/// QElectroTech displayed version
const QString displayedVersion = "0.80-DEV";
+ /**
+ @brief FileFormatStable
+ - On all non-release branches: false
+ - On release branches: true
+ */
+ const bool FileFormatStable = false;
QString license();
//Describe the current state of a graphic item
diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp
index 3d88e9541..d8011c349 100644
--- a/sources/qetdiagrameditor.cpp
+++ b/sources/qetdiagrameditor.cpp
@@ -2306,110 +2306,64 @@ void QETDiagramEditor::generateTerminalBlock()
}
#endif
-
- if ( !success ) {
- #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
- QMessageBox::warning(nullptr,
- tr("Error launching qet_tb_generator plugin"),
- QObject::tr("To install the plugin qet_tb_generator"
- "
"
- "Visit :"
- "
"
- "qet-tb-generator"
- "
"
- "Requires python 3.5 or above."
- "
"
- """"
- " First install on Windows"
- """"
- "
"
- "1. Install, if required, python 3.5 or above"
- "
"
- " Visit :"
- "
"
- "python.org"
- "
"
- "2. pip install qet_tb_generator"
- "
"
- """"
- " Update on Windows"
- """"
- "
"
- "python -m pip install --upgrade qet_tb_generator"
- "
"
- ">>user could launch in a terminal this script in this directory"
- "
"
- " C:\\users\\XXXX\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts "
- "
"
- ));
- }
-}
+#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
+ QString message=QObject::tr(
+ "To install the plugin qet_tb_generator"
+ "
Visit :"
+ "
"
+ "qet-tb-generator"
+ "
Requires python 3.5 or above."
+ "
First install on Windows"
+ "
1. Install, if required, python 3.5 or above"
+ "
Visit :"
+ "
"
+ "python.org"
+ "
2. pip install qet_tb_generator"
+ "
Update on Windows"
+ "
python -m pip install --upgrade qet_tb_generator"
+ "
"
+ ">>user could launch in a terminal this script in this directory"
+ "
"
+ " C:\\users\\XXXX\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts "
+ "
");
#elif defined(Q_OS_MAC)
- QMessageBox::warning(nullptr,
- QObject::tr("Error launching qet_tb_generator plugin"),
- QObject::tr("To install the plugin qet_tb_generator"
- "
"
- "Visit :"
- "
"
- "qet-tb-generator"
- "
"
- """"
- " First install on macOSX"
- """"
- "
"
- "1. Install, if required, python 3.8 bundle only, because program use hardcoded PATH for localise qet-tb-generator plugin "
- "
"
- " Visit :"
- "
"
- "howto"
- "
"
- "2. pip3 install qet_tb_generator"
- "
"
- """"
- " Update on macOSX"
- """"
- "
"
- " pip3 install --upgrade qet_tb_generator"
- "
"
- ));
- }
-}
-
+ QString message=QObject::tr(
+ "To install the plugin qet_tb_generator"
+ "
Visit :"
+ "
"
+ "qet-tb-generator"
+ "
First install on macOSX"
+ "
1. Install, if required, python 3.8 bundle only, "
+ "because program use hardcoded PATH for localise qet-tb-generator plugin "
+ "
Visit :"
+ "
"
+ "howto"
+ "
2. pip3 install qet_tb_generator"
+ "
Update on macOSX"
+ "
pip3 install --upgrade qet_tb_generator"
+ "
");
#else
+ QString message=QObject::tr(
+ "To install the plugin qet_tb_generator"
+ "
Visit :"
+ "
"
+ "qet-tb-generator"
+ "
"
+ "
Requires python 3.5 or above."
+ "
"
+ "
First install on Linux"""
+ "
1. check you have pip3 installed: pip3 --version"
+ "
If not install with: sudo apt-get install python3-pip"
+ "
2. Install the program: sudo pip3 install qet_tb_generator"
+ "
3. Run the program: qet_tb_generator"
+ "
"
+ "
"" Update on Linux"""
+ "
sudo pip3 install --upgrade qet_tb_generator"
+ "
");
+#endif
+ if ( !success ) {
QMessageBox::warning(nullptr,
- QObject::tr("Error launching qet_tb_generator plugin"),
- QObject::tr("To install the plugin qet_tb_generator"
- "
"
- "Visit : "
- "
"
- "qet-tb-generator"
- "
"
- "
"
- "Requires python 3.5 or above."
- "
"
- "
"
- """"
- " First install on Linux"
- """"
- "
"
- "1. check you have pip3 installed: pip3 --version"
- "
"
- "If not install with: sudo apt-get install python3-pip"
- "
"
- "2. Install the program: sudo pip3 install qet_tb_generator"
- "
"
- "3. Run the program: qet_tb_generator"
- "
"
- "
"
- """"
- " Update on Linux"
- """"
- "
"
- "sudo pip3 install --upgrade qet_tb_generator"
- "
"
- ));
+ QObject::tr("Error launching qet_tb_generator plugin"),
+ message);
}
}
-
-#endif
-
diff --git a/sources/qetgraphicsitem/conductortextitem.cpp b/sources/qetgraphicsitem/conductortextitem.cpp
index 6212888cb..339d6cc8a 100644
--- a/sources/qetgraphicsitem/conductortextitem.cpp
+++ b/sources/qetgraphicsitem/conductortextitem.cpp
@@ -243,9 +243,10 @@ void ConductorTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) {
change m_mouse_hover to false(used in paint() function )
@param e QGraphicsSceneHoverEvent
*/
-void ConductorTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) {
+void ConductorTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e)
+{
Q_UNUSED(e);
- //qDebug() << "Leave mouse over";
+ qDebug() << "Leave mouse over";
m_mouse_hover = false;
update();
}
@@ -254,7 +255,7 @@ void ConductorTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) {
Do nothing default function .
@param e QGraphicsSceneHoverEvent
*/
-void ConductorTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent *e) {
- Q_UNUSED(e);
- QGraphicsTextItem::hoverMoveEvent(e);
+void ConductorTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent *e)
+{
+ QGraphicsTextItem::hoverMoveEvent(e);
}
diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp
index 7d77fc2dd..896e87d7f 100644
--- a/sources/qetgraphicsitem/qetshapeitem.cpp
+++ b/sources/qetgraphicsitem/qetshapeitem.cpp
@@ -295,9 +295,10 @@ QPainterPath QetShapeItem::shape() const
@param option
@param widget
*/
-void QetShapeItem::paint(QPainter *painter,
- const QStyleOptionGraphicsItem *option,
- QWidget *widget)
+void QetShapeItem::paint(
+ QPainter *painter,
+ const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
{
Q_UNUSED(option)
Q_UNUSED(widget)
@@ -425,17 +426,17 @@ bool QetShapeItem::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
{
if(event->type() == QEvent::GraphicsSceneMousePress) //Click
{
- handlerMousePressEvent(qghi, static_cast(event));
+ handlerMousePressEvent();
return true;
}
else if(event->type() == QEvent::GraphicsSceneMouseMove) //Move
{
- handlerMouseMoveEvent(qghi, static_cast(event));
+ handlerMouseMoveEvent(static_cast(event));
return true;
}
else if (event->type() == QEvent::GraphicsSceneMouseRelease) //Release
{
- handlerMouseReleaseEvent(qghi, static_cast(event));
+ handlerMouseReleaseEvent();
return true;
}
}
@@ -703,11 +704,8 @@ void QetShapeItem::removePoint()
@param qghi
@param event
*/
-void QetShapeItem::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
+void QetShapeItem::handlerMousePressEvent()
{
- Q_UNUSED(qghi)
- Q_UNUSED(event)
-
m_old_P1 = m_P1;
m_old_P2 = m_P2;
m_old_polygon = m_polygon;
@@ -720,13 +718,10 @@ void QetShapeItem::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphic
/**
@brief QetShapeItem::handlerMouseMoveEvent
- @param qghi
@param event
*/
-void QetShapeItem::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
+void QetShapeItem::handlerMouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_UNUSED(qghi)
-
QPointF new_pos = event->scenePos();
if (event->modifiers() != Qt::ControlModifier)
new_pos = Diagram::snapToGrid(event->scenePos());
@@ -787,11 +782,8 @@ void QetShapeItem::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphics
@param qghi
@param event
*/
-void QetShapeItem::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event)
+void QetShapeItem::handlerMouseReleaseEvent()
{
- Q_UNUSED(qghi);
- Q_UNUSED(event);
-
m_modifie_radius_equaly = false;
if (diagram())
diff --git a/sources/qetgraphicsitem/qetshapeitem.h b/sources/qetgraphicsitem/qetshapeitem.h
index 157c8a73a..699c37737 100644
--- a/sources/qetgraphicsitem/qetshapeitem.h
+++ b/sources/qetgraphicsitem/qetshapeitem.h
@@ -121,9 +121,9 @@ class QetShapeItem : public QetGraphicsItem
void insertPoint();
void removePoint();
- void handlerMousePressEvent (QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event);
- void handlerMouseMoveEvent (QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event);
- void handlerMouseReleaseEvent (QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event);
+ void handlerMousePressEvent();
+ void handlerMouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void handlerMouseReleaseEvent();
///ATTRIBUTES
private:
diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp
index 5b93c858d..5323af7a9 100644
--- a/sources/titleblocktemplate.cpp
+++ b/sources/titleblocktemplate.cpp
@@ -1858,9 +1858,7 @@ void TitleBlockTemplate::renderTextCellDxf(QString &file_path,
vAlign,
x2,
ratio,
- color,
- cell.alignment & Qt::AlignLeft,
- 0);
+ color);
}
/**