21#include "moc_qgsaddtaborgroup.cpp"
25#include <QTreeWidgetItem>
27#include <QRadioButton>
32 , mExistingContainers( existingContainerList )
42 mParentCombo->addItem( QString() );
48 mParentCombo->addItem( container.first, i );
49 if ( container.second == currentTab )
51 mParentCombo->setCurrentIndex( i );
58 connect( buttonBox, &QDialogButtonBox::helpRequested,
this, &QgsAddAttributeFormContainerDialog::showHelp );
60 mColumnCountSpinBox->setValue(
QgsSettings().value( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );
62 setWindowTitle( tr(
"Add Container for %1" ).arg(
mLayer->
name() ) );
64 connect( mTypeCombo, qOverload<int>( &QComboBox::currentIndexChanged ),
this, &QgsAddAttributeFormContainerDialog::containerTypeChanged );
65 containerTypeChanged();
78 if ( !mParentCombo->currentData().isValid() )
87 return mColumnCountSpinBox->value();
97 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.