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 )
103 QgsSettings().
setValue( QStringLiteral(
"/qgis/attributeForm/defaultGroupColumnCount" ), mColumnCountSpinBox->value() );
106 QgsSettings().
setValue( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), mColumnCountSpinBox->value() );
116void QgsAddAttributeFormContainerDialog::showHelp()
118 QgsHelp::openHelp( QStringLiteral(
"working_with_vector/vector_properties.html#the-drag-and-drop-designer" ) );
121void QgsAddAttributeFormContainerDialog::containerTypeChanged()
127 mParentCombo->show();
128 mLabelParent->show();
129 mColumnsLabel->show();
130 mColumnCountSpinBox->show();
131 mColumnCountSpinBox->setValue(
QgsSettings().
value( QStringLiteral(
"/qgis/attributeForm/defaultGroupColumnCount" ), 1 ).toInt() );
134 mParentCombo->hide();
135 mLabelParent->hide();
136 mColumnsLabel->show();
137 mColumnCountSpinBox->show();
138 mColumnCountSpinBox->setValue(
QgsSettings().
value( QStringLiteral(
"/qgis/attributeForm/defaultTabColumnCount" ), 1 ).toInt() );
141 mParentCombo->show();
142 mLabelParent->show();
143 mColumnsLabel->hide();
144 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.