Warning, file /graphics/glaxnimate/src/gui/item_models/property_model_single.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "property_model_base.hpp" 0010 0011 namespace glaxnimate::gui::item_models { 0012 0013 class PropertyModelSingle : public PropertyModelBase 0014 { 0015 Q_OBJECT 0016 0017 public: 0018 enum Columns 0019 { 0020 ColumnName, 0021 ColumnValue, 0022 0023 ColumnCount 0024 0025 }; 0026 0027 PropertyModelSingle(); 0028 0029 bool setData(const QModelIndex & index, const QVariant & value, int role) override; 0030 QVariant data(const QModelIndex & index, int role) const override; 0031 Qt::ItemFlags flags(const QModelIndex & index) const override; 0032 int columnCount(const QModelIndex & parent) const override; 0033 QVariant headerData(int section, Qt::Orientation orientation, int role) const override; 0034 0035 void clear_objects(); 0036 void set_object(model::Object* object); 0037 // void add_object(model::Object* object); 0038 // void add_object_without_properties(model::Object* object); 0039 0040 protected: 0041 void on_document_reset() override {} 0042 std::pair<model::VisualNode *, int> drop_position(const QModelIndex & parent, int row, int column) const override; 0043 0044 private: 0045 class Private; 0046 Private* dd() const; 0047 }; 0048 0049 } // namespace glaxnimate::gui::item_models