|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef DYNAMICELEMENTTEXTMODEL_H
19 #define DYNAMICELEMENTTEXTMODEL_H
21 #include <QStandardItemModel>
22 #include <qstyleditemdelegate.h>
71 QUndoCommand *parent_undo =
nullptr)
const;
74 QUndoCommand *parent_undo =
nullptr)
const;
83 Qt::DropAction action,
86 const QModelIndex &parent)
const override;
88 Qt::DropAction action,
91 const QModelIndex &parent)
override;
92 QMimeData *
mimeData(
const QModelIndexList &indexes)
const override;
138 const QStyleOptionViewItem &option,
139 const QModelIndex &index)
const override;
141 QAbstractItemModel *model,
142 const QModelIndex &index)
const override;
145 bool eventFilter(QObject *
object, QEvent *event)
override;
151 #endif // DYNAMICELEMENTTEXTMODEL_H
bool eventFilter(QObject *object, QEvent *event) override
Definition: dynamicelementtextmodel.cpp:1850
QPointer< Element > m_element
Definition: dynamicelementtextmodel.h:120
virtual kind linkType() const
Definition: element.h:159
@ grpFrame
Definition: dynamicelementtextmodel.h:59
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: dynamicelementtextmodel.cpp:1570
QStringList availableInfo(DynamicElementTextItem *deti) const
DynamicTextItemDelegate::availableInfo.
Definition: dynamicelementtextmodel.cpp:1897
QModelIndex indexFromText(DynamicElementTextItem *text) const
DynamicElementTextModel::indexFromText.
Definition: dynamicelementtextmodel.cpp:478
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition: dynamicelementtextmodel.cpp:1740
void setConnection(DynamicElementTextItem *deti, bool set)
DynamicElementTextModel::setConnection Set up the connection for deti to keep up to date the data of ...
Definition: dynamicelementtextmodel.cpp:1342
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
void removeText(DynamicElementTextItem *deti)
DynamicElementTextModel::removeText.
Definition: dynamicelementtextmodel.cpp:386
QIcon textGroup
Definition: qeticons.cpp:217
@ infoText
Definition: dynamicelementtextmodel.h:43
@ userText
Definition: dynamicelementtextmodel.h:42
void updateDataFromText(DynamicElementTextItem *deti, DynamicElementTextModel::ValueType type)
Definition: dynamicelementtextmodel.cpp:1414
DynamicElementTextItem * textFromItem(QStandardItem *item) const
DynamicElementTextModel::textFromItem.
Definition: dynamicelementtextmodel.cpp:424
QString infoName
Definition: dynamicelementtextitem.h:48
void holdToBottomPageChanged(bool)
DiagramContext elementInformations() const
Definition: element.h:97
QPointF pos
Definition: elementtextitemgroup.h:39
ElementTextItemGroup * groupFromIndex(const QModelIndex &index) const
DynamicElementTextModel::groupFromIndex.
Definition: dynamicelementtextmodel.cpp:887
@ textFrom
Definition: dynamicelementtextmodel.h:41
@ grpAlignment
Definition: dynamicelementtextmodel.h:53
QList< QStandardItem * > itemsForText(DynamicElementTextItem *deti)
DynamicElementTextModel::itemsForText.
Definition: dynamicelementtextmodel.cpp:124
@ size
Definition: dynamicelementtextmodel.h:46
int verticalAdjustment
Definition: elementtextitemgroup.h:41
DynamicElementTextItem * textFromIndex(const QModelIndex &index) const
DynamicElementTextModel::textFromIndex.
Definition: dynamicelementtextmodel.cpp:404
qreal textWidth
Definition: dynamicelementtextitem.h:51
static QStringList elementInfoKeys()
QETApp::elementInfoKeys.
Definition: qetapp.cpp:366
The DynamicElementTextModel class A model to use with QtView. This model display and can edit the val...
Definition: dynamicelementtextmodel.h:36
QColor color
Definition: diagramtextitem.h:37
The CompositeTextEditDialog class CompositeTextEditDialog display a dialog use to write the complex t...
Definition: compositetexteditdialog.h:20
QIcon PartText
Definition: qeticons.cpp:134
void textAdded(DynamicElementTextItem *deti)
QHash< DynamicElementTextItem *, QList< QMetaObject::Connection > > m_hash_text_connect
Definition: dynamicelementtextmodel.h:124
@ grpVAdjust
Definition: dynamicelementtextmodel.h:56
void frameChanged(bool frame)
bool indexIsText(const QModelIndex &index) const
DynamicElementTextModel::indexIsText.
Definition: dynamicelementtextmodel.cpp:948
void compositeTextChanged(QString text)
DynamicTextItemDelegate(QObject *parent=Q_NULLPTR)
Definition: dynamicelementtextmodel.cpp:1566
void colorChanged(QColor color)
Qt::Alignment alignment
Definition: diagramtextitem.h:38
QHash< ElementTextItemGroup *, QList< QMetaObject::Connection > > m_hash_group_connect
Definition: dynamicelementtextmodel.h:126
QHash< DynamicElementTextItem *, QStandardItem * > m_texts_list
Definition: dynamicelementtextmodel.h:121
Qt::Alignment alignment
Definition: elementtextitemgroup.h:42
void textsGroupAboutToBeRemoved(ElementTextItemGroup *group)
QMimeData * mimeData(const QModelIndexList &indexes) const override
Definition: dynamicelementtextmodel.cpp:1159
void enableGroupRotationAndPos(ElementTextItemGroup *group)
DynamicElementTextModel::enableGroupRotation Enable/disable the item "group rotation" according the o...
Definition: dynamicelementtextmodel.cpp:1232
static QString elementTranslatedInfoKey(const QString &)
ElementsProperties::translatedInfo Return the translated information key given by info If info don't ...
Definition: qetapp.cpp:400
static QString replaceVariable(const QString &formula, const DiagramContext &dc)
AssignVariables::replaceVariable Replace the variables in formula in form %{my-var} to the correspond...
Definition: assignvariables.cpp:208
bool m_block_dataChanged
Definition: dynamicelementtextmodel.h:127
bool holdToBottomPage
Definition: elementtextitemgroup.h:44
void frameChanged(bool frame)
ValueType
Definition: dynamicelementtextmodel.h:40
QUuid uuid() const
Definition: dynamicelementtextitem.cpp:518
void textWidthChanged(qreal width)
@ grpRotation
Definition: dynamicelementtextmodel.h:55
QString text
Definition: dynamicelementtextitem.h:46
@ frame
Definition: dynamicelementtextmodel.h:50
qreal correctAngle(const qreal &)
Definition: qet.cpp:545
ElementTextItemGroup * groupFromItem(QStandardItem *item) const
DynamicElementTextModel::groupFromItem.
Definition: dynamicelementtextmodel.cpp:906
~DynamicElementTextModel() override
Definition: dynamicelementtextmodel.cpp:84
QList< DynamicElementTextItem * > texts() const
ElementTextItemGroup::texts.
Definition: elementtextitemgroup.cpp:330
void fontChanged(QFont font)
void textRemovedFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
void textFromChanged(DynamicElementTextItem::TextFrom text_from)
void addGroup(ElementTextItemGroup *group)
DynamicElementTextModel::AddGroup Add a text item group to this model.
Definition: dynamicelementtextmodel.cpp:691
@ grpHoldBottom
Definition: dynamicelementtextmodel.h:58
bool frame
Definition: dynamicelementtextitem.h:50
ConductorProperties properties
Definition: conductor.h:48
@ CompositeText
Definition: dynamicelementtextitem.h:58
@ color
Definition: dynamicelementtextmodel.h:48
Element * elementUseForInfo() const
DynamicElementTextItem::elementUseForInfo.
Definition: dynamicelementtextitem.cpp:258
void removeGroup(ElementTextItemGroup *group)
DynamicElementTextModel::removeGroup Remove the text item group from this model.
Definition: dynamicelementtextmodel.cpp:842
void updateXref()
DynamicElementTextItem::updateXref Create or delete the Xref according to the current properties of t...
Definition: dynamicelementtextitem.cpp:1251
@ textWidth
Definition: dynamicelementtextmodel.h:52
QVariant value(const QString &key) const
Definition: diagramcontext.cpp:100
QString m_function
Definition: conductorproperties.h:90
@ grpName
Definition: dynamicelementtextmodel.h:57
void alignmentChanged(Qt::Alignment)
TextFrom
Definition: dynamicelementtextitem.h:55
@ UserText
Definition: dynamicelementtextitem.h:56
@ AllReport
Definition: element.h:54
void setAnimated(bool animate=true, bool first_time=true)
QPropertyUndoCommand::setAnimated.
Definition: qpropertyundocommand.cpp:103
Element * parentElement() const
DynamicElementTextItem::ParentElement.
Definition: dynamicelementtextitem.cpp:227
void infoNameChanged(QString info)
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override
Definition: dynamicelementtextmodel.cpp:1001
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
DynamicElementTextModel::dropMimeData.
Definition: dynamicelementtextmodel.cpp:1062
void textsGroupAdded(ElementTextItemGroup *group)
The RemoveTextFromGroupCommand class.
Definition: addelementtextcommand.h:125
Definition: dynamicelementtextmodel.h:131
void textAddedToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
void removeTextFromGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group)
Definition: dynamicelementtextmodel.cpp:866
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition: elementtextitemgroup.h:36
TextFrom textFrom
Definition: dynamicelementtextitem.h:47
void textRemoved(DynamicElementTextItem *deti)
@ font
Definition: dynamicelementtextmodel.h:47
DynamicElementTextModel(Element *element, QObject *parent=nullptr)
Definition: dynamicelementtextmodel.cpp:60
QUndoCommand * undoForEditedGroup(ElementTextItemGroup *group, QUndoCommand *parent_undo=nullptr) const
DynamicElementTextModel::undoForEditedGroup.
Definition: dynamicelementtextmodel.cpp:625
@ compositeText
Definition: dynamicelementtextmodel.h:44
QPointer< Conductor > m_watched_conductor
Definition: dynamicelementtextitem.h:142
QModelIndex indexFromGroup(ElementTextItemGroup *group) const
DynamicElementTextModel::indexFromGroup.
Definition: dynamicelementtextmodel.cpp:933
void addTextToGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group)
DynamicElementTextModel::textAddedToGroup Add the text text to the group group.
Definition: dynamicelementtextmodel.cpp:859
@ rotation
Definition: dynamicelementtextmodel.h:51
@ txtAlignment
Definition: dynamicelementtextmodel.h:45
void addText(DynamicElementTextItem *deti)
DynamicElementTextModel::addText.
Definition: dynamicelementtextmodel.cpp:377
bool contains(const QString &) const
Definition: diagramcontext.cpp:70
void enableSourceText(DynamicElementTextItem *deti, DynamicElementTextItem::TextFrom tf)
DynamicElementTextModel::enableSourceText Enable the good field, according to the current source of t...
Definition: dynamicelementtextmodel.cpp:1199
void verticalAdjustmentChanged(int)
@ Horizontal
Horizontal segment.
Definition: qet.h:89
QFont font
Definition: diagramtextitem.h:40
ElementTextItemGroup * parentGroup() const
DynamicElementTextItem::parentGroup.
Definition: dynamicelementtextitem.cpp:236
@ pos
Definition: dynamicelementtextmodel.h:49
bool indexIsInGroup(const QModelIndex &index) const
DynamicElementTextModel::indexIsInGroup.
Definition: dynamicelementtextmodel.cpp:99
Qt::Alignment alignment() const
AlignmentTextDialog::alignment.
Definition: alignmenttextdialog.cpp:57
bool indexIsGroup(const QModelIndex &index) const
DynamicElementTextModel::indexIsGroup.
Definition: dynamicelementtextmodel.cpp:978
Definition: conductor.h:43
QString m_wire_color
Definition: conductorproperties.h:92
QString name
Definition: elementtextitemgroup.h:43
QString compositeText
Definition: dynamicelementtextitem.h:49
QStringList mimeTypes() const override
DynamicElementTextModel::mimeTypes.
Definition: dynamicelementtextmodel.cpp:1185
The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
Definition: qpropertyundocommand.h:34
QString plainText() const
CompositeTextEditDialog::plainText.
Definition: compositetexteditdialog.cpp:41
QHash< ElementTextItemGroup *, QStandardItem * > m_groups_list
Definition: dynamicelementtextmodel.h:122
QString m_tension_protocol
Definition: conductorproperties.h:91
bool frame
Definition: elementtextitemgroup.h:45
void updateDataFromGroup(ElementTextItemGroup *group, DynamicElementTextModel::ValueType type)
Definition: dynamicelementtextmodel.cpp:1507
void itemDataChanged(QStandardItem *qsi)
Definition: dynamicelementtextmodel.cpp:1269
QIcon tr
Definition: qeticons.cpp:206
The AddTextToGroupCommand class.
Definition: addelementtextcommand.h:105
@ ElementInfo
Definition: dynamicelementtextitem.h:57
QString m_wire_section
Definition: conductorproperties.h:93
@ grpPos
Definition: dynamicelementtextmodel.h:54
Definition: alignmenttextdialog.h:28
Definition: diagramcontext.h:56
void textChanged(QString text)
qreal rotation
Definition: elementtextitemgroup.h:40
QUndoCommand * undoForEditedText(DynamicElementTextItem *deti, QUndoCommand *parent_undo=nullptr) const
DynamicElementTextModel::undoForEditedText.
Definition: dynamicelementtextmodel.cpp:496
void rotationChanged(qreal)