mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
starting to refresh the scalebar composer item
This commit is contained in:
parent
6dcb5f4f4d
commit
bce952c69d
@ -204,7 +204,7 @@ void QgsComposerScaleBarWidget::on_mLineWidthSpinBox_valueChanged( double d )
|
||||
|
||||
mComposerScaleBar->beginCommand( tr( "Scalebar line width" ), QgsComposerMergeCommand::ScaleBarLineWidth );
|
||||
disconnectUpdateSignal();
|
||||
QPen newPen( QColor( 0, 0, 0 ) );
|
||||
QPen newPen( mComposerScaleBar->pen().color() );
|
||||
newPen.setWidthF( d );
|
||||
mComposerScaleBar->setPen( newPen );
|
||||
mComposerScaleBar->update();
|
||||
@ -321,6 +321,30 @@ void QgsComposerScaleBarWidget::on_mColorPushButton_clicked()
|
||||
mComposerScaleBar->endCommand();
|
||||
}
|
||||
|
||||
void QgsComposerScaleBarWidget::on_mStrokeColorPushButton_clicked()
|
||||
{
|
||||
if ( !mComposerScaleBar )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QColor oldColor = mComposerScaleBar->pen().color();
|
||||
QColor newColor = QColorDialog::getColor( oldColor, 0 );
|
||||
|
||||
if ( !newColor.isValid() ) //user canceled the dialog
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mComposerScaleBar->beginCommand( tr( "Scalebar color changed" ) );
|
||||
disconnectUpdateSignal();
|
||||
QPen newPen( newColor );
|
||||
mComposerScaleBar->setPen( newBrush );
|
||||
mComposerScaleBar->update();
|
||||
connectUpdateSignal();
|
||||
mComposerScaleBar->endCommand();
|
||||
}
|
||||
|
||||
void QgsComposerScaleBarWidget::on_mUnitLabelLineEdit_textChanged( const QString& text )
|
||||
{
|
||||
if ( !mComposerScaleBar )
|
||||
|
@ -42,6 +42,7 @@ class QgsComposerScaleBarWidget: public QWidget, private Ui::QgsComposerScaleBar
|
||||
void on_mUnitLabelLineEdit_textChanged( const QString& text );
|
||||
void on_mMapUnitsPerBarUnitSpinBox_valueChanged( double d );
|
||||
void on_mColorPushButton_clicked();
|
||||
void on_mStrokeColorPushButton_clicked();
|
||||
void on_mFontButton_clicked();
|
||||
void on_mStyleComboBox_currentIndexChanged( const QString& text );
|
||||
void on_mLabelBarSpaceSpinBox_valueChanged( double d );
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>325</width>
|
||||
<height>537</height>
|
||||
<width>436</width>
|
||||
<height>499</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -19,22 +19,25 @@
|
||||
<property name="windowTitle">
|
||||
<string>Barscale Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item>
|
||||
<widget class="QToolBox" name="toolBox">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>315</width>
|
||||
<height>501</height>
|
||||
<y>-138</y>
|
||||
<width>415</width>
|
||||
<height>636</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@ -42,31 +45,8 @@
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mSegmentSizeLabel">
|
||||
<property name="text">
|
||||
<string>Segment size</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>mSegmentSizeSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mSegmentSizeSpinBox">
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9999999999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mUnitsLabel">
|
||||
<property name="text">
|
||||
@ -74,7 +54,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="mUnitsComboBox"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mUnitLabelLabel">
|
||||
<property name="text">
|
||||
<string>Unit label</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>mUnitLabelLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="mMapUnitsPerBarUnitLabel">
|
||||
<property name="text">
|
||||
<string>Map units per bar unit</string>
|
||||
@ -87,32 +86,62 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mMapUnitsPerBarUnitSpinBox">
|
||||
<property name="maximum">
|
||||
<double>9999999999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="mSegmentSizeLabel">
|
||||
<property name="text">
|
||||
<string>Segment size</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>mSegmentSizeSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QDoubleSpinBox" name="mSegmentSizeSpinBox">
|
||||
<property name="decimals">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>9999999999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="mSegmentLabel">
|
||||
<property name="text">
|
||||
<string>Segments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="mSegmentsLeftSpinBox">
|
||||
<property name="suffix">
|
||||
<string> Left segments</string>
|
||||
<string> left</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="mNumberOfSegmentsSpinBox">
|
||||
<property name="suffix">
|
||||
<string> Right segments</string>
|
||||
<string> right</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="mStyleLabel">
|
||||
<property name="text">
|
||||
<string>Style</string>
|
||||
@ -122,10 +151,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QComboBox" name="mStyleComboBox"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="mMapLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -144,7 +173,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QComboBox" name="mMapComboBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
@ -157,17 +186,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="mAlignmentLabel">
|
||||
<property name="text">
|
||||
<string>Alignment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="10" column="1">
|
||||
<widget class="QComboBox" name="mAlignmentComboBox"/>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<item row="14" column="0" colspan="2">
|
||||
<widget class="QSpinBox" name="mHeightSpinBox">
|
||||
<property name="suffix">
|
||||
<string> mm</string>
|
||||
@ -177,7 +206,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<item row="15" column="0" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox">
|
||||
<property name="prefix">
|
||||
<string>Label space </string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -202,17 +241,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox">
|
||||
<property name="prefix">
|
||||
<string>Label space </string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> mm</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
<item row="17" column="0" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mBoxSizeSpinBox">
|
||||
<property name="prefix">
|
||||
<string>Box space </string>
|
||||
@ -222,43 +251,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="mUnitLabelLabel">
|
||||
<property name="text">
|
||||
<string>Unit label</string>
|
||||
<item row="19" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>mUnitLabelLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mFontButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mFontColorButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font color...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="mFontButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="mColorPushButton">
|
||||
<property name="text">
|
||||
<string>Color...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" colspan="2">
|
||||
<item row="22" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -271,8 +294,26 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="mUnitsComboBox"/>
|
||||
<item row="20" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout3">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mColorPushButton">
|
||||
<property name="text">
|
||||
<string>Fill color...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mStrokeColorPushButton">
|
||||
<property name="text">
|
||||
<string>Stroke color...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
Loading…
x
Reference in New Issue
Block a user