Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
PropertyDelegate.h
1/*
2Copyright (C) 2019,2021,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef AEONGAMES_PROPERTYDELEGATE_H
18#define AEONGAMES_PROPERTYDELEGATE_H
19#include <QStyledItemDelegate>
20
21namespace AeonGames
22{
24 class PropertyDelegate : public QStyledItemDelegate
25 {
26 Q_OBJECT
27
28 public:
33 PropertyDelegate ( QObject *parent = nullptr );
34
42 QWidget *createEditor ( QWidget *parent, const QStyleOptionViewItem &option,
43 const QModelIndex &index ) const override;
44
50 void setEditorData ( QWidget *editor, const QModelIndex &index ) const override;
57 void setModelData ( QWidget *editor, QAbstractItemModel *model,
58 const QModelIndex &index ) const override;
59
66 void updateEditorGeometry ( QWidget *editor,
67 const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
68 };
69}
70#endif
PropertyDelegate(QObject *parent=nullptr)
Construct the property delegate.
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Create an editor widget for the given model index.
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Set the editor widget data from the model.
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Write the editor widget data back to the model.
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Update the editor geometry to match the view item area.
<- This is here just for the literals
Definition AABB.hpp:31