mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
TEST a Merge branch 'XMLProperties'
it gets built let's test it for bugs Conflicts: sources/ElementsCollection/fileelementcollectionitem.cpp sources/QetGraphicsItemModeler/qetgraphicshandleritem.h sources/borderproperties.cpp sources/conductorproperties.cpp sources/conductorproperties.h sources/diagram.cpp sources/diagram.h sources/diagramprintdialog.cpp sources/diagramprintdialog.h sources/editor/graphicspart/customelementgraphicpart.cpp sources/editor/graphicspart/partarc.cpp sources/editor/graphicspart/partdynamictextfield.cpp sources/editor/graphicspart/partdynamictextfield.h sources/editor/graphicspart/partellipse.cpp sources/editor/graphicspart/partline.cpp sources/editor/graphicspart/partpolygon.cpp sources/editor/graphicspart/partrectangle.cpp sources/editor/graphicspart/partterminal.cpp sources/editor/graphicspart/partterminal.h sources/editor/graphicspart/parttext.cpp sources/properties/propertiesinterface.cpp sources/properties/propertiesinterface.h sources/properties/terminaldata.cpp sources/properties/terminaldata.h sources/properties/xrefproperties.cpp sources/properties/xrefproperties.h sources/qetgraphicsitem/conductor.cpp sources/qetgraphicsitem/conductor.h sources/qetgraphicsitem/conductortextitem.h sources/qetgraphicsitem/dynamicelementtextitem.h sources/qetgraphicsitem/element.cpp sources/qetgraphicsitem/element.h sources/qetgraphicsitem/elementtextitemgroup.h sources/qetgraphicsitem/slaveelement.cpp sources/qetgraphicsitem/slaveelement.h sources/qetgraphicsitem/terminal.cpp sources/qetgraphicsitem/terminal.h sources/qetproject.cpp sources/titleblockproperties.cpp
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "qetapp.h"
|
||||
#include "richtext/richtexteditor_p.h"
|
||||
#include "diagram.h"
|
||||
#include "dynamicelementtextitem.h"
|
||||
|
||||
|
||||
/**
|
||||
@brief DiagramTextItem::DiagramTextItem
|
||||
@@ -218,12 +220,24 @@ QRectF DiagramTextItem::frameRect() const
|
||||
|
||||
void DiagramTextItem::setHtml(const QString &text)
|
||||
{
|
||||
DynamicElementTextItem* abc = dynamic_cast<DynamicElementTextItem*>(this);
|
||||
if (abc) {
|
||||
if (abc->searchedElement) {
|
||||
int stop = 1;
|
||||
}
|
||||
}
|
||||
QGraphicsTextItem::setHtml(text);
|
||||
m_is_html = true;
|
||||
}
|
||||
|
||||
void DiagramTextItem::setPlainText(const QString &text)
|
||||
{
|
||||
DynamicElementTextItem* abc = dynamic_cast<DynamicElementTextItem*>(this);
|
||||
if (abc) {
|
||||
if (abc->searchedElement) {
|
||||
int stop = 1;
|
||||
}
|
||||
}
|
||||
QGraphicsTextItem::setPlainText(text);
|
||||
m_is_html = false;
|
||||
}
|
||||
@@ -243,6 +257,16 @@ bool DiagramTextItem::isHtml() const
|
||||
*/
|
||||
void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
|
||||
DynamicElementTextItem* abc = dynamic_cast<DynamicElementTextItem*>(this);
|
||||
if (abc) {
|
||||
if (abc->searchedElement) {
|
||||
int stop = 1;
|
||||
QString text = toPlainText();
|
||||
qDebug() << text;
|
||||
}
|
||||
}
|
||||
|
||||
painter -> setRenderHint(QPainter::Antialiasing, false);
|
||||
QGraphicsTextItem::paint(painter, option, widget);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user