Skip to content
Permalink
Browse files

[composer] Add a manual 'refresh' button to attribute tables, to refr…

…esh table if data has changed outside of QGIS
  • Loading branch information
nyalldawson committed Apr 22, 2014
1 parent a386e89 commit 6fa26cffd449e755ae4662c4c2857f28ccdd1e07
@@ -94,6 +94,16 @@ void QgsComposerTableWidget::refreshMapComboBox()
}
}

void QgsComposerTableWidget::on_mRefreshPushButton_clicked()
{
if ( !mComposerTable )
{
return;
}

mComposerTable->refreshAttributes();
}

void QgsComposerTableWidget::on_mAttributesPushButton_clicked()
{
if ( !mComposerTable )
@@ -40,6 +40,7 @@ class QgsComposerTableWidget: public QWidget, private Ui::QgsComposerTableWidget
void refreshMapComboBox();

private slots:
void on_mRefreshPushButton_clicked();
void on_mAttributesPushButton_clicked();
void on_mComposerMapComboBox_activated( int index );
void on_mMaximumColumnsSpinBox_valueChanged( int i );
@@ -63,7 +63,10 @@
<bool>false</bool>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="1" column="0">
<widget class="QLabel" name="mLayerLabel">
<property name="text">
<string>Layer</string>
@@ -73,14 +76,38 @@
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<item row="1" column="1">
<widget class="QgsMapLayerComboBox" name="mLayerComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QPushButton" name="mRefreshPushButton">
<property name="text">
<string>Refresh table data</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QPushButton" name="mAttributesPushButton">
<property name="text">
<string>Attributes...</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="QCheckBox" name="mShowOnlyVisibleFeaturesCheckBox">
<property name="text">
<string>Show only visible features</string>
</property>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QLabel" name="mComposerMapLabel">
<property name="text">
<string>Composer map</string>
@@ -93,17 +120,17 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="12" column="0">
<item row="13" column="0">
<widget class="QCheckBox" name="mFeatureFilterCheckBox">
<property name="text">
<string>Filter with</string>
</property>
</widget>
</item>
<item row="12" column="1">
<item row="13" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="mFeatureFilterEdit"/>
@@ -121,7 +148,7 @@
</item>
</layout>
</item>
<item row="14" column="0">
<item row="15" column="0">
<widget class="QLabel" name="mMaxNumFeaturesLabel">
<property name="text">
<string>Maximum rows</string>
@@ -134,10 +161,10 @@
</property>
</widget>
</item>
<item row="14" column="1">
<item row="15" column="1">
<widget class="QSpinBox" name="mMaximumColumnsSpinBox"/>
</item>
<item row="16" column="0">
<item row="17" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
@@ -150,26 +177,9 @@
</property>
</widget>
</item>
<item row="16" column="1">
<item row="17" column="1">
<widget class="QDoubleSpinBox" name="mMarginSpinBox"/>
</item>
<item row="0" column="1">
<widget class="QgsMapLayerComboBox" name="mLayerComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QPushButton" name="mAttributesPushButton">
<property name="text">
<string>Attributes...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

0 comments on commit 6fa26cf

Please sign in to comment.
You can’t perform that action at this time.