18#ifndef DYNAMICELEMENTTEXTMODEL_H
19#define DYNAMICELEMENTTEXTMODEL_H
21#include "../qetgraphicsitem/dynamicelementtextitem.h"
24#include <QStandardItemModel>
25#include <qstyleditemdelegate.h>
74 QUndoCommand *parent_undo =
nullptr)
const;
77 QUndoCommand *parent_undo =
nullptr)
const;
86 const QMimeData *data,
87 Qt::DropAction action,
90 const QModelIndex &parent)
const override;
92 const QMimeData *data,
93 Qt::DropAction action,
96 const QModelIndex &parent)
override;
97 QMimeData *
mimeData(
const QModelIndexList &indexes)
const override;
146 const QStyleOptionViewItem &option,
147 const QModelIndex &index)
const override;
150 QAbstractItemModel *model,
151 const QModelIndex &index)
const override;
154 bool eventFilter(QObject *
object, QEvent *event)
override;
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
TextFrom
Definition dynamicelementtextitem.h:57
The DynamicElementTextModel class A model to use with QtView. This model display and can edit the val...
Definition dynamicelementtextmodel.h:38
QHash< DynamicElementTextItem *, QList< QMetaObject::Connection > > m_hash_text_connect
Definition dynamicelementtextmodel.h:131
void enableGroupRotationAndPos(ElementTextItemGroup *group)
DynamicElementTextModel::enableGroupRotation Enable/disable the item "group rotation" according the o...
Definition dynamicelementtextmodel.cpp:1260
DynamicElementTextItem * textFromIndex(const QModelIndex &index) const
DynamicElementTextModel::textFromIndex.
Definition dynamicelementtextmodel.cpp:422
bool indexIsInGroup(const QModelIndex &index) const
DynamicElementTextModel::indexIsInGroup.
Definition dynamicelementtextmodel.cpp:103
bool indexIsText(const QModelIndex &index) const
DynamicElementTextModel::indexIsText.
Definition dynamicelementtextmodel.cpp:976
~DynamicElementTextModel() override
Definition dynamicelementtextmodel.cpp:88
QUndoCommand * undoForEditedGroup(ElementTextItemGroup *group, QUndoCommand *parent_undo=nullptr) const
DynamicElementTextModel::undoForEditedGroup.
Definition dynamicelementtextmodel.cpp:653
ValueType
Definition dynamicelementtextmodel.h:42
@ pos
Definition dynamicelementtextmodel.h:51
@ keepVisualRotation
Definition dynamicelementtextmodel.h:54
@ textWidth
Definition dynamicelementtextmodel.h:55
@ grpVAdjust
Definition dynamicelementtextmodel.h:59
@ size
Definition dynamicelementtextmodel.h:48
@ grpAlignment
Definition dynamicelementtextmodel.h:56
@ textFrom
Definition dynamicelementtextmodel.h:43
@ color
Definition dynamicelementtextmodel.h:50
@ infoText
Definition dynamicelementtextmodel.h:45
@ txtAlignment
Definition dynamicelementtextmodel.h:47
@ compositeText
Definition dynamicelementtextmodel.h:46
@ grpFrame
Definition dynamicelementtextmodel.h:62
@ font
Definition dynamicelementtextmodel.h:49
@ grpName
Definition dynamicelementtextmodel.h:60
@ grpPos
Definition dynamicelementtextmodel.h:57
@ grpRotation
Definition dynamicelementtextmodel.h:58
@ userText
Definition dynamicelementtextmodel.h:44
@ rotation
Definition dynamicelementtextmodel.h:53
@ grpHoldBottom
Definition dynamicelementtextmodel.h:61
@ frame
Definition dynamicelementtextmodel.h:52
QList< QStandardItem * > itemsForText(DynamicElementTextItem *deti)
DynamicElementTextModel::itemsForText.
Definition dynamicelementtextmodel.cpp:128
bool indexIsGroup(const QModelIndex &index) const
DynamicElementTextModel::indexIsGroup.
Definition dynamicelementtextmodel.cpp:1006
QMimeData * mimeData(const QModelIndexList &indexes) const override
Definition dynamicelementtextmodel.cpp:1187
void updateDataFromGroup(ElementTextItemGroup *group, DynamicElementTextModel::ValueType type)
Definition dynamicelementtextmodel.cpp:1535
QStringList mimeTypes() const override
DynamicElementTextModel::mimeTypes.
Definition dynamicelementtextmodel.cpp:1213
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:1370
void updateDataFromText(DynamicElementTextItem *deti, DynamicElementTextModel::ValueType type)
Definition dynamicelementtextmodel.cpp:1442
QModelIndex indexFromText(DynamicElementTextItem *text) const
DynamicElementTextModel::indexFromText.
Definition dynamicelementtextmodel.cpp:496
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override
Definition dynamicelementtextmodel.cpp:1029
void addGroup(ElementTextItemGroup *group)
DynamicElementTextModel::AddGroup Add a text item group to this model.
Definition dynamicelementtextmodel.cpp:719
void removeText(DynamicElementTextItem *deti)
DynamicElementTextModel::removeText.
Definition dynamicelementtextmodel.cpp:404
void itemDataChanged(QStandardItem *qsi)
Definition dynamicelementtextmodel.cpp:1297
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
DynamicElementTextModel::dropMimeData.
Definition dynamicelementtextmodel.cpp:1090
void addTextToGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group)
DynamicElementTextModel::textAddedToGroup Add the text text to the group group.
Definition dynamicelementtextmodel.cpp:887
QHash< DynamicElementTextItem *, QStandardItem * > m_texts_list
Definition dynamicelementtextmodel.h:128
ElementTextItemGroup * groupFromItem(QStandardItem *item) const
DynamicElementTextModel::groupFromItem.
Definition dynamicelementtextmodel.cpp:934
QPointer< Element > m_element
Definition dynamicelementtextmodel.h:127
void removeTextFromGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group)
Definition dynamicelementtextmodel.cpp:894
void addText(DynamicElementTextItem *deti)
DynamicElementTextModel::addText.
Definition dynamicelementtextmodel.cpp:395
QHash< ElementTextItemGroup *, QList< QMetaObject::Connection > > m_hash_group_connect
Definition dynamicelementtextmodel.h:133
DynamicElementTextItem * textFromItem(QStandardItem *item) const
DynamicElementTextModel::textFromItem.
Definition dynamicelementtextmodel.cpp:442
QHash< ElementTextItemGroup *, QStandardItem * > m_groups_list
Definition dynamicelementtextmodel.h:129
void removeGroup(ElementTextItemGroup *group)
DynamicElementTextModel::removeGroup Remove the text item group from this model.
Definition dynamicelementtextmodel.cpp:870
ElementTextItemGroup * groupFromIndex(const QModelIndex &index) const
DynamicElementTextModel::groupFromIndex.
Definition dynamicelementtextmodel.cpp:915
QModelIndex indexFromGroup(ElementTextItemGroup *group) const
DynamicElementTextModel::indexFromGroup.
Definition dynamicelementtextmodel.cpp:961
QUndoCommand * undoForEditedText(DynamicElementTextItem *deti, QUndoCommand *parent_undo=nullptr) const
DynamicElementTextModel::undoForEditedText.
Definition dynamicelementtextmodel.cpp:514
void enableSourceText(DynamicElementTextItem *deti, DynamicElementTextItem::TextFrom tf)
DynamicElementTextModel::enableSourceText Enable the good field, according to the current source of t...
Definition dynamicelementtextmodel.cpp:1227
bool m_block_dataChanged
Definition dynamicelementtextmodel.h:134
Definition dynamicelementtextmodel.h:138
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition dynamicelementtextmodel.cpp:1598
bool eventFilter(QObject *object, QEvent *event) override
Definition dynamicelementtextmodel.cpp:1878
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition dynamicelementtextmodel.cpp:1768
QStringList availableInfo(DynamicElementTextItem *deti) const
DynamicTextItemDelegate::availableInfo.
Definition dynamicelementtextmodel.cpp:1925
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition elementtextitemgroup.h:36