Skip to content
Permalink
Browse files

[composer] Clean up label item widget

  • Loading branch information
nyalldawson committed Oct 6, 2014
1 parent 067c4dc commit a4de7409175c8d1dacb6b56538088b9ac321aa78
Showing with 71 additions and 108 deletions.
  1. +2 −2 src/app/composer/qgscomposerlabelwidget.cpp
  2. +69 −106 src/ui/qgscomposerlabelwidgetbase.ui
@@ -51,13 +51,13 @@ void QgsComposerLabelWidget::on_mHtmlCheckBox_stateChanged( int state )
{
mFontButton->setEnabled( false );
mFontColorButton->setEnabled( false );
mAlignementGroup->setEnabled( false );
mAppearanceGroup->setEnabled( false );
}
else
{
mFontButton->setEnabled( true );
mFontColorButton->setEnabled( true );
mAlignementGroup->setEnabled( true );
mAppearanceGroup->setEnabled( true );
}

mComposerLabel->beginCommand( tr( "Label text HTML state changed" ), QgsComposerMergeCommand::ComposerLabelSetText );
@@ -102,7 +102,25 @@
</property>
</widget>
</item>
<item row="3" column="0">
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mAppearanceGroup">
<property name="title">
<string>Appearance</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">composeritem</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mFontButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@@ -115,15 +133,15 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Font color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Font color</string>
</property>
</widget>
</item>
<item>
<widget class="QgsColorButtonV2" name="mFontColorButton">
<property name="minimumSize">
@@ -158,84 +176,57 @@
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mAlignementGroup">
<property name="title">
<string>Alignment</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">composeritem</string>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>3</number>
</property>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>4</width>
<height>20</height>
</size>
<item row="2" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
</spacer>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="mVerticalAlignementLabel">
<property name="text">
<string>Vertical</string>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QRadioButton" name="mTopRadioButton">
<widget class="QRadioButton" name="mLeftRadioButton">
<property name="text">
<string>Top</string>
<string>Left</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mMiddleRadioButton">
<widget class="QRadioButton" name="mCenterRadioButton">
<property name="text">
<string>Middle</string>
<string>Center</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mBottomRadioButton">
<widget class="QRadioButton" name="mRightRadioButton">
<property name="text">
<string>Bottom</string>
<string>Right</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
<string notr="true">buttonGroup_2</string>
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -249,40 +240,40 @@
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item row="6" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QRadioButton" name="mLeftRadioButton">
<widget class="QRadioButton" name="mTopRadioButton">
<property name="text">
<string>Left</string>
<string>Top</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mCenterRadioButton">
<widget class="QRadioButton" name="mMiddleRadioButton">
<property name="text">
<string>Center</string>
<string>Middle</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mRightRadioButton">
<widget class="QRadioButton" name="mBottomRadioButton">
<property name="text">
<string>Right</string>
<string>Bottom</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup_2</string>
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -296,45 +287,17 @@
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="mHorizontalAlignementLabel">
<property name="text">
<string>Horizontal</string>
<string>Horizontal alignment</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="mDisplayGroupBox">
<property name="title">
<string>Display</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="syncGroup" stdset="0">
<string notr="true">composeritem</string>
</property>
<property name="collapsed" stdset="0">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1">
<item row="0" column="0">
<widget class="QLabel" name="mMarginLabel">
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="mVerticalAlignementLabel">
<property name="text">
<string>Margin</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox">
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> mm</string>
<string>Vertical alignment</string>
</property>
</widget>
</item>
@@ -364,7 +327,7 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup_2"/>
<buttongroup name="buttonGroup"/>
<buttongroup name="buttonGroup_2"/>
</buttongroups>
</ui>

0 comments on commit a4de740

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