Skip to content

Commit

Permalink
Switch to listbox for edit types. Fix #6495
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Oct 11, 2012
1 parent 6a5dcac commit 539ff69
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 86 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsattributetypedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ QgsAttributeTypeDialog::QgsAttributeTypeDialog( QgsVectorLayer *vl )
{
setupUi( this );
tableWidget->insertRow( 0 );
connect( selectionComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( setStackPage( int ) ) );
connect( selectionListWidget, SIGNAL( currentRowChanged( int ) ), this, SLOT( setStackPage( int ) ) );
connect( removeSelectedButton, SIGNAL( clicked() ), this, SLOT( removeSelectedButtonPushed() ) );
connect( loadFromLayerButton, SIGNAL( clicked() ), this, SLOT( loadFromLayerButtonPushed() ) );
connect( loadFromCSVButton, SIGNAL( clicked() ), this, SLOT( loadFromCSVButtonPushed() ) );
Expand Down Expand Up @@ -454,7 +454,7 @@ void QgsAttributeTypeDialog::setIndex( int index, QgsVectorLayer::EditType editT

void QgsAttributeTypeDialog::setPage( int index )
{
selectionComboBox->setCurrentIndex( index );
selectionListWidget->setCurrentRow( index );
setStackPage( index );
}

Expand Down Expand Up @@ -509,7 +509,7 @@ void QgsAttributeTypeDialog::setStackPage( int index )
void QgsAttributeTypeDialog::accept()
{
//store data to output variables
switch ( selectionComboBox->currentIndex() )
switch ( selectionListWidget->currentRow() )
{
default:
case 0:
Expand Down
166 changes: 83 additions & 83 deletions src/ui/qgsattributetypeedit.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,89 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>471</width>
<height>428</height>
<width>615</width>
<height>398</height>
</rect>
</property>
<property name="windowTitle">
<string>Attribute Edit Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QComboBox" name="selectionComboBox">
<item>
<property name="text">
<string>Line edit</string>
</property>
</item>
<item>
<property name="text">
<string>Classification</string>
</property>
</item>
<item>
<property name="text">
<string>Range</string>
</property>
</item>
<item>
<property name="text">
<string>Unique values</string>
</property>
</item>
<item>
<property name="text">
<string>File name</string>
</property>
</item>
<item>
<property name="text">
<string>Value map</string>
</property>
</item>
<item>
<property name="text">
<string>Enumeration</string>
</property>
</item>
<item>
<property name="text">
<string>Immutable</string>
</property>
</item>
<item>
<property name="text">
<string>Hidden</string>
</property>
</item>
<item>
<property name="text">
<string>Checkbox</string>
</property>
</item>
<item>
<property name="text">
<string>Text edit</string>
</property>
</item>
<item>
<property name="text">
<string>Calendar</string>
</property>
</item>
<item>
<property name="text">
<string>Value relation</string>
</property>
</item>
<item>
<property name="text">
<string>UUID generator</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="1">
<widget class="QStackedWidget" name="stackedWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
Expand Down Expand Up @@ -746,7 +672,7 @@
</widget>
</widget>
</item>
<item>
<item row="2" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -756,6 +682,80 @@
</property>
</widget>
</item>
<item row="0" column="0" rowspan="3">
<widget class="QListWidget" name="selectionListWidget">
<item>
<property name="text">
<string>Line edit</string>
</property>
</item>
<item>
<property name="text">
<string>Classification</string>
</property>
</item>
<item>
<property name="text">
<string>Range</string>
</property>
</item>
<item>
<property name="text">
<string>Unique values</string>
</property>
</item>
<item>
<property name="text">
<string>File name</string>
</property>
</item>
<item>
<property name="text">
<string>Value map</string>
</property>
</item>
<item>
<property name="text">
<string>Enumeration</string>
</property>
</item>
<item>
<property name="text">
<string>Immutable</string>
</property>
</item>
<item>
<property name="text">
<string>Hidden</string>
</property>
</item>
<item>
<property name="text">
<string>Checkbox</string>
</property>
</item>
<item>
<property name="text">
<string>Text edit</string>
</property>
</item>
<item>
<property name="text">
<string>Calendar</string>
</property>
</item>
<item>
<property name="text">
<string>Value relation</string>
</property>
</item>
<item>
<property name="text">
<string>UUID generator</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<resources/>
Expand All @@ -767,8 +767,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>257</x>
<y>418</y>
<x>403</x>
<y>388</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
Expand All @@ -783,8 +783,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>325</x>
<y>418</y>
<x>471</x>
<y>388</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
Expand Down

0 comments on commit 539ff69

Please sign in to comment.