Skip to content

Commit

Permalink
Data defined symbol UI clean up
Browse files Browse the repository at this point in the history
	- Reduce margins
	- Remove cell selection
	- Adjust first column width
  • Loading branch information
NathanW2 committed Apr 1, 2013
1 parent 9d6428f commit a178b85
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/gui/symbology-ng/qgsdatadefinedsymboldialog.cpp
Expand Up @@ -17,6 +17,7 @@ QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QMap< QString, QPa
}

mTableWidget->setRowCount( properties.size() );

int i = 0;
QMap< QString, QPair< QString, QString > >::const_iterator it = properties.constBegin();
for ( ; it != properties.constEnd(); ++it )
Expand All @@ -25,6 +26,8 @@ QgsDataDefinedSymbolDialog::QgsDataDefinedSymbolDialog( const QMap< QString, QPa
QCheckBox* cb = new QCheckBox( this );
cb->setChecked( !it.value().second.isEmpty() );
mTableWidget->setCellWidget( i, 0, cb );
mTableWidget->setColumnWidth(0, cb->width() );


//property name
QTableWidgetItem* propertyItem = new QTableWidgetItem( it.value().first );
Expand Down
45 changes: 43 additions & 2 deletions src/ui/qgsdatadefinedsymboldialogbase.ui
Expand Up @@ -6,14 +6,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>406</width>
<height>282</height>
</rect>
</property>
<property name="windowTitle">
<string>Data defined properties</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="1" column="0">
<widget class="QDialogButtonBox" name="mButtonBox">
<property name="orientation">
Expand All @@ -26,6 +38,35 @@
</item>
<item row="0" column="0">
<widget class="QTableWidget" name="mTableWidget">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="gridStyle">
<enum>Qt::NoPen</enum>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<row>
<property name="text">
<string>New Row</string>
</property>
</row>
<column>
<property name="text">
<string/>
Expand Down

0 comments on commit a178b85

Please sign in to comment.