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