24#include <QTreeWidgetItem>
26#include <QRadioButton>
31 , mExistingContainers( existingContainerList )
41 mParentCombo->addItem( QString() );
47 mParentCombo->addItem( container.first, i );
48 if ( container.second == currentTab )
50 mParentCombo->setCurrentIndex( i );
57 connect( buttonBox, &QDialogButtonBox::helpRequested,
this, &QgsAddAttributeFormContainerDialog::showHelp );
59 mColumnCountSpinBox->setValue(
QgsSettings().value( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );
61 setWindowTitle( tr(
"Add Container for %1" ).arg(
mLayer->
name() ) );
63 connect( mTypeCombo, qOverload<int>( &QComboBox::currentIndexChanged ),
this, &QgsAddAttributeFormContainerDialog::containerTypeChanged );
64 containerTypeChanged();
77 if ( !mParentCombo->currentData().isValid() )
86 return mColumnCountSpinBox->value();
96 if ( mColumnCountSpinBox->value() > 0 )
102 QgsSettings().
setValue( QStringLiteral(
"/qgis/attributeForm/defaultGroupColumnCount" ), mColumnCountSpinBox->value() );
105 QgsSettings().
setValue( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), mColumnCountSpinBox->value() );
115void QgsAddAttributeFormContainerDialog::showHelp()
117 QgsHelp::openHelp( QStringLiteral(
"working_with_vector/vector_properties.html#the-drag-and-drop-designer" ) );
120void QgsAddAttributeFormContainerDialog::containerTypeChanged()
126 mParentCombo->show();
127 mLabelParent->show();
128 mColumnsLabel->show();
129 mColumnCountSpinBox->show();
130 mColumnCountSpinBox->setValue(
QgsSettings().
value( QStringLiteral(
"/qgis/attributeForm/defaultGroupColumnCount" ), 1 ).toInt() );
133 mParentCombo->hide();
134 mLabelParent->hide();
135 mColumnsLabel->show();
136 mColumnCountSpinBox->show();
137 mColumnCountSpinBox->setValue(
QgsSettings().
value( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );
140 mParentCombo->show();
141 mLabelParent->show();
142 mColumnsLabel->hide();
143 mColumnCountSpinBox->hide();
AttributeEditorContainerType
Attribute editor container types.
@ Row
A row of editors (horizontal layout)
static void openHelp(const QString &key)
Opens help topic for the given help key using default system web browser.
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
Represents a vector layer which manages a vector based data sets.