File indexing completed on 2025-02-02 04:11:26
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef SHAPEPARENTDIALOG_H 0008 #define SHAPEPARENTDIALOG_H 0009 0010 #include <QDialog> 0011 #include <memory> 0012 0013 #include "model/shapes/shape.hpp" 0014 #include "item_models/document_node_model.hpp" 0015 0016 namespace glaxnimate::gui { 0017 0018 class ShapeParentDialog : public QDialog 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 ShapeParentDialog(item_models::DocumentNodeModel* model, QWidget* parent = nullptr); 0024 ~ShapeParentDialog(); 0025 0026 model::ShapeListProperty* shape_parent() const; 0027 0028 model::ShapeListProperty* get_shape_parent(); 0029 0030 protected: 0031 void changeEvent(QEvent *e) override; 0032 0033 private Q_SLOTS: 0034 void select(const QModelIndex& index); 0035 void select_and_accept(const QModelIndex& index); 0036 0037 private: 0038 class Private; 0039 std::unique_ptr<Private> d; 0040 }; 0041 0042 } // namespace glaxnimate::gui 0043 0044 #endif // SHAPEPARENTDIALOG_H