QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
qgsmodeldesignerconfigdockwidget.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgsmodeldesignerconfigdockwidget.cpp
3 ------------------------------------------
4 begin : January 2026
5 copyright : (C) 2026 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
19
20#include "qgsgui.h"
23
24#include "moc_qgsmodeldesignerconfigdockwidget.cpp"
25
27 : QWidget( parent )
28{
29 setupUi( this );
30
31 mStackedWidget->setCurrentWidget( mNoComponentPage );
32 connect( mButtonBox->button( QDialogButtonBox::Apply ), &QPushButton::clicked, this, &QgsModelDesignerConfigDockWidget::apply );
33}
34
35void QgsModelDesignerConfigDockWidget::showComponentConfig( QgsProcessingModelComponent *component, QgsProcessingContext &context, const QgsProcessingParameterWidgetContext &widgetContext )
36{
37 delete mWidgetStack->takeMainPanel();
38
40 if ( widget )
41 {
42 mCurrentWidget = widget;
43 mCurrentWidget->setDockMode( true );
44 mStackedWidget->setCurrentWidget( mComponentConfigPage );
45 mWidgetStack->setMainPanel( mCurrentWidget );
46 }
47 else
48 {
49 mStackedWidget->setCurrentWidget( mNoComponentPage );
50 }
51}
52
53void QgsModelDesignerConfigDockWidget::apply()
54{
55 if ( mCurrentWidget )
56 {
57 mCurrentWidget->apply();
58 }
59}
static QgsProcessingGuiRegistry * processingGuiRegistry()
Returns the global processing gui registry, used for registering the GUI behavior of processing algor...
Definition qgsgui.cpp:169
QgsModelDesignerConfigDockWidget(QWidget *parent SIP_TRANSFERTHIS=nullptr)
Constructor for QgsModelDesignerConfigDockWidget.
void showComponentConfig(QgsProcessingModelComponent *component, QgsProcessingContext &context, const QgsProcessingParameterWidgetContext &widgetContext)
Shows the configuration widget for a component in the model.
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Contains information about the context in which a processing algorithm is executed.
QgsProcessingModelConfigWidget * createModelConfigWidgetForComponent(QgsProcessingModelComponent *component, QgsProcessingContext &context, const QgsProcessingParameterWidgetContext &widgetContext) const
Creates a new widget for configuring a Processing model component.
A panel widget that can be shown in the Processing model designer dialog for configuring part of the ...
Contains settings which reflect the context in which a Processing parameter widget is shown.