11#include "private/qobject_p.h"
12#include "private/qabstractitemmodel_p.h"
62 w->removeEventFilter(oldDelegate);
63 w->installEventFilter(newDelegate);
104 if (
m.widget.isNull())
107 if (!
m.currentIndex.isValid())
112 if (
m.property.isEmpty())
122 if (
m.widget.isNull())
126 if (
m.property.isEmpty())
141 return idx.
row() >= topLeft.
row() && idx.
row() <= bottomRight.
row()
183 w->focusPreviousChild();
321 SLOT(_q_modelDestroyed()));
373 d->delegate = delegate;
381 d->flipEventFilters(oldDelegate, delegate);
464 d->widgetMap.push_back({
widget, section,
d->indexAt(section), propertyName});
477 int idx =
d->findWidget(
widget);
481 d->widgetMap.erase(
d->widgetMap.begin() + idx);
495 int idx =
d->findWidget(
widget);
499 return d->widgetMap[idx].section;
514 int idx =
d->findWidget(
widget);
517 const auto &
m =
d->widgetMap[idx];
518 if (
m.property.isEmpty())
519 return m.widget->metaObject()->userProperty().name();
534 for (
auto &
e :
d->widgetMap) {
535 if (
e.section == section)
573 for (
auto &
e :
d->widgetMap) {
578 return d->model->submit();
657 if (index < 0 || index >=
d->itemCount())
660 ?
d->model->index(
index, 0,
d->rootIndex)
661 :
d->model->index(0,
index,
d->rootIndex);
670 return d->currentIdx();
697 ||
index.model() !=
d->model
698 ||
index.parent() !=
d->rootIndex)
713 decltype(
d->widgetMap)
copy;
714 d->widgetMap.swap(
copy);
717 it->widget->removeEventFilter(
d->delegate);
769 return d->orientation;
792 return d->submitPolicy;
797#include "moc_qdatawidgetmapper.cpp"
The QAbstractItemDelegate class is used to display and edit data items from a model.
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Sets the contents of the given editor to the data for the item at the given index.
EndEditHint
This enum describes the different hints that the delegate can give to the model and view components t...
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Sets the data for the item at the given index in the model to the contents of the given editor.
static QAbstractItemModel * staticEmptyModel()
virtual Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
virtual Q_INVOKABLE bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Sets the role data for the item at index to value.
virtual Q_INVOKABLE int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual Q_INVOKABLE QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index.
constexpr int row() const noexcept
Returns the row this model index refers to.
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
constexpr int column() const noexcept
Returns the column this model index refers to.
void installEventFilter(QObject *filterObj)
Installs an event filter filterObj on this object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void removeEventFilter(QObject *obj)
Removes an event filter object obj from this object.
void destroyed(QObject *=nullptr)
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointe...
int column() const
Returns the column this persistent model index refers to.
int row() const
Returns the row this persistent model index refers to.
The QStyledItemDelegate class provides display and editing facilities for data items from a model.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
GLfloat GLfloat GLfloat w
[0]
GLint GLint GLint GLint GLsizei GLsizei GLsizei GLboolean commit
GLdouble GLdouble GLdouble GLdouble q
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
QSqlQueryModel * model
[16]
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent