mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
fixed a button issues in widgets
This commit is contained in:
parent
aeec55e008
commit
b1c4a83db5
@ -1167,7 +1167,6 @@ QgsPointPatternFillSymbolLayerWidget::QgsPointPatternFillSymbolLayerWidget( cons
|
||||
QgsSymbolLayerV2Widget( parent, vl ), mLayer( 0 )
|
||||
{
|
||||
setupUi( this );
|
||||
updateMarkerIcon();
|
||||
}
|
||||
|
||||
|
||||
@ -1183,7 +1182,6 @@ void QgsPointPatternFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* lay
|
||||
mVerticalDistanceSpinBox->setValue( mLayer->distanceY() );
|
||||
mHorizontalDisplacementSpinBox->setValue( mLayer->displacementX() );
|
||||
mVerticalDisplacementSpinBox->setValue( mLayer->displacementY() );
|
||||
updateMarkerIcon();
|
||||
}
|
||||
|
||||
QgsSymbolLayerV2* QgsPointPatternFillSymbolLayerWidget::symbolLayer()
|
||||
@ -1191,15 +1189,6 @@ QgsSymbolLayerV2* QgsPointPatternFillSymbolLayerWidget::symbolLayer()
|
||||
return mLayer;
|
||||
}
|
||||
|
||||
void QgsPointPatternFillSymbolLayerWidget::updateMarkerIcon()
|
||||
{
|
||||
if ( mLayer )
|
||||
{
|
||||
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( mLayer->subSymbol(), mChangeMarkerButton->iconSize() );
|
||||
mChangeMarkerButton->setIcon( icon );
|
||||
}
|
||||
}
|
||||
|
||||
void QgsPointPatternFillSymbolLayerWidget::on_mHorizontalDistanceSpinBox_valueChanged( double d )
|
||||
{
|
||||
if ( mLayer )
|
||||
@ -1236,23 +1225,6 @@ void QgsPointPatternFillSymbolLayerWidget::on_mVerticalDisplacementSpinBox_value
|
||||
}
|
||||
}
|
||||
|
||||
void QgsPointPatternFillSymbolLayerWidget::on_mChangeMarkerButton_clicked()
|
||||
{
|
||||
if ( !mLayer )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), mVectorLayer, this );
|
||||
if ( dlg.exec() == QDialog::Rejected )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
updateMarkerIcon();
|
||||
emit changed();
|
||||
}
|
||||
|
||||
/////////////
|
||||
|
||||
QgsFontMarkerSymbolLayerV2Widget::QgsFontMarkerSymbolLayerV2Widget( const QgsVectorLayer* vl, QWidget* parent )
|
||||
@ -1362,8 +1334,6 @@ QgsCentroidFillSymbolLayerV2Widget::QgsCentroidFillSymbolLayerV2Widget( const Qg
|
||||
mLayer = NULL;
|
||||
|
||||
setupUi( this );
|
||||
|
||||
connect( btnChangeMarker, SIGNAL( clicked() ), this, SLOT( setMarker() ) );
|
||||
}
|
||||
|
||||
void QgsCentroidFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
|
||||
@ -1373,9 +1343,6 @@ void QgsCentroidFillSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer
|
||||
|
||||
// layer type is correct, we can do the cast
|
||||
mLayer = static_cast<QgsCentroidFillSymbolLayerV2*>( layer );
|
||||
|
||||
// set values
|
||||
updateMarker();
|
||||
}
|
||||
|
||||
QgsSymbolLayerV2* QgsCentroidFillSymbolLayerV2Widget::symbolLayer()
|
||||
@ -1383,18 +1350,3 @@ QgsSymbolLayerV2* QgsCentroidFillSymbolLayerV2Widget::symbolLayer()
|
||||
return mLayer;
|
||||
}
|
||||
|
||||
void QgsCentroidFillSymbolLayerV2Widget::setMarker()
|
||||
{
|
||||
QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), mVectorLayer, this );
|
||||
if ( dlg.exec() == 0 )
|
||||
return;
|
||||
updateMarker();
|
||||
|
||||
emit changed();
|
||||
}
|
||||
|
||||
void QgsCentroidFillSymbolLayerV2Widget::updateMarker()
|
||||
{
|
||||
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( mLayer->subSymbol(), btnChangeMarker->iconSize() );
|
||||
btnChangeMarker->setIcon( icon );
|
||||
}
|
||||
|
@ -328,14 +328,12 @@ class GUI_EXPORT QgsPointPatternFillSymbolLayerWidget: public QgsSymbolLayerV2Wi
|
||||
|
||||
protected:
|
||||
QgsPointPatternFillSymbolLayer* mLayer;
|
||||
void updateMarkerIcon();
|
||||
|
||||
private slots:
|
||||
void on_mHorizontalDistanceSpinBox_valueChanged( double d );
|
||||
void on_mVerticalDistanceSpinBox_valueChanged( double d );
|
||||
void on_mHorizontalDisplacementSpinBox_valueChanged( double d );
|
||||
void on_mVerticalDisplacementSpinBox_valueChanged( double d );
|
||||
void on_mChangeMarkerButton_clicked();
|
||||
};
|
||||
|
||||
/////////
|
||||
@ -391,12 +389,7 @@ class GUI_EXPORT QgsCentroidFillSymbolLayerV2Widget : public QgsSymbolLayerV2Wid
|
||||
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
|
||||
virtual QgsSymbolLayerV2* symbolLayer();
|
||||
|
||||
public slots:
|
||||
void setMarker();
|
||||
|
||||
protected:
|
||||
void updateMarker();
|
||||
|
||||
QgsCentroidFillSymbolLayerV2* mLayer;
|
||||
};
|
||||
|
||||
|
@ -82,6 +82,9 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
|
||||
connect( btnAddToStyle, SIGNAL( clicked() ), this, SLOT( addSymbolToStyle() ) );
|
||||
btnAddToStyle->setIcon( QIcon( QgsApplication::defaultThemePath() + "symbologyAdd.png" ) );
|
||||
|
||||
// Set symbol color in btnColor
|
||||
updateSymbolColor();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>366</width>
|
||||
<width>368</width>
|
||||
<height>242</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -16,26 +16,6 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Marker</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnChangeMarker">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Change</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
@ -69,9 +49,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>btnChangeMarker</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>243</width>
|
||||
<width>283</width>
|
||||
<height>152</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -14,31 +14,7 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mMarkerLabel">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Marker</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="mChangeMarkerButton">
|
||||
<property name="text">
|
||||
<string>Change</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mHorizontalDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Horizontal distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mHorizontalDistanceSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
@ -48,48 +24,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mVerticalDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Vertical distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mVerticalDistanceSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999999.990000009536743</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mHorizontalDisplacementLabel">
|
||||
<property name="text">
|
||||
<string>Horizontal displacement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mHorizontalDisplacementSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9999999.990000000223517</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="mVerticalDisplacementLabel">
|
||||
<property name="text">
|
||||
<string>Vertical displacement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mVerticalDisplacementSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
@ -99,6 +34,54 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mVerticalDistanceSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999999.990000009536743</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mHorizontalDisplacementLabel">
|
||||
<property name="text">
|
||||
<string>Horizontal displacement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mHorizontalDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Horizontal distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mVerticalDistanceLabel">
|
||||
<property name="text">
|
||||
<string>Vertical distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mHorizontalDisplacementSpinBox">
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9999999.990000000223517</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mVerticalDisplacementLabel">
|
||||
<property name="text">
|
||||
<string>Vertical displacement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user