NDEVR
API Documentation
DesignTableEditorWidget.h
1#pragma once
2#include "DLLInfo.h"
3#include <QBoxLayout>
4#include <QWidget>
5#include <functional>
6namespace NDEVR
7{
9 class Model;
15 class NDEVR_API DesignTableEditorWidget : public QWidget
16 {
17 Q_OBJECT
18 public:
25 DesignTableEditorWidget(DesignPropertyTable* table, const std::function<QWidget* (const Model&)>& callback, QWidget* parent = nullptr);
30 void setActive(const Model& model);
31 signals:
36 protected:
38 QWidget* m_current_editor = nullptr;
39 QWidget* m_new_editor = nullptr;
41 std::function<QWidget* (const Model&)> m_callback;
42 };
43}
A base class for tables wishing to show columns of DesignObject properties.
DesignPropertyTable * m_table
The property table listing design objects.
DesignTableEditorWidget(DesignPropertyTable *table, const std::function< QWidget *(const Model &)> &callback, QWidget *parent=nullptr)
Constructs a DesignTableEditorWidget with a property table and editor factory callback.
QWidget * m_current_editor
The currently displayed editor widget.
void requestHiddenSignal()
Emitted when the editor panel requests to be hidden.
QWidget * m_new_editor
A newly created editor widget pending display.
QCustomStackedWidget * m_editor_stack
The stacked widget managing editor transitions.
void setActive(const Model &model)
Activates the editor for the given model, creating it via the callback if needed.
std::function< QWidget *(const Model &)> m_callback
The factory function creating editor widgets.
A core class that represents a node on model hierarchy.
Definition Model.h:292
The main class for a layout where all widgets occupy the same same and only one widget is shown at a ...
The primary namespace for the NDEVR SDK.