24#include <QDialogButtonBox>
27#include "moc_qgs3dsymbolwidget.cpp"
40 QVBoxLayout *vLayout =
new QVBoxLayout();
44 mWidget = metadata->createSymbolWidget(
nullptr );
45 vLayout->addWidget( mWidget );
46 mWidget->setSymbol(
symbol,
nullptr );
49 mButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
50 connect( mButtonBox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
51 connect( mButtonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject );
52 connect( mButtonBox, &QDialogButtonBox::helpRequested,
this, [] {
55 vLayout->addStretch();
56 vLayout->addWidget( mButtonBox );
58 setWindowTitle( tr(
"3D Symbol" ) );
63 return mWidget ? mWidget->symbol() :
nullptr;
QgsAbstract3DSymbol * symbol() const
Returns a new instance of the symbol defined by the dialog.
QDialogButtonBox * buttonBox() const
Returns a reference to the dialog's button box.
Qgs3DSymbolDialog(const QgsAbstract3DSymbol *symbol, QWidget *parent=nullptr)
Constructor for Qgs3DSymbolDialog, initially showing the specified symbol.
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
static Qgs3DSymbolRegistry * symbol3DRegistry()
Returns registry of available 3D symbols.
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.