59 changes: 39 additions & 20 deletions src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )

//create rubber band for map and ellipse items
case AddMap:
case AddShape:
case AddRectangle:
case AddTriangle:
case AddEllipse:
{
QTransform t;
mRubberBandItem = new QGraphicsRectItem( 0, 0, 0, 0 );
Expand Down Expand Up @@ -204,6 +206,35 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
}
}

void QgsComposerView::addShape(Tool currentTool)
{
QgsComposerShape::Shape shape = QgsComposerShape::Ellipse;

if ( currentTool == AddRectangle )
shape = QgsComposerShape::Rectangle;
else if ( currentTool == AddTriangle )
shape = QgsComposerShape::Triangle;

if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
{
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
return;
}
if ( composition() )
{
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
composerShape->setShapeType( shape );
composition()->addComposerShape( composerShape );
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
emit actionFinished();
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
}
}

void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
{
if ( !composition() )
Expand Down Expand Up @@ -257,24 +288,10 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
}
break;

case AddShape:
if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
{
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
return;
}
if ( composition() )
{
QgsComposerShape* composerShape = new QgsComposerShape( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height(), composition() );
composition()->addComposerShape( composerShape );
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
mRubberBandItem = 0;
emit actionFinished();
composition()->pushAddRemoveCommand( composerShape, tr( "Shape added" ) );
}
case AddRectangle:
case AddTriangle:
case AddEllipse:
addShape( mCurrentTool );
break;

case AddMap:
Expand Down Expand Up @@ -339,7 +356,9 @@ void QgsComposerView::mouseMoveEvent( QMouseEvent* e )
}

case AddMap:
case AddShape:
case AddRectangle:
case AddTriangle:
case AddEllipse:
//adjust rubber band item
{
double x = 0;
Expand Down
7 changes: 6 additions & 1 deletion src/gui/qgscomposerview.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView
AddLabel, // add label
AddScalebar, // add scalebar
AddPicture, // add raster/vector picture
AddShape, //add shape item (ellipse, rectangle, triangle)
AddRectangle,
AddEllipse,
AddTriangle,
AddTable, //add attribute table
MoveItemContent //move content of item (e.g. content of map)
};
Expand Down Expand Up @@ -120,6 +122,9 @@ class GUI_EXPORT QgsComposerView: public QGraphicsView

bool mPaintingEnabled;

/** Draw a shape on the canvas */
void addShape( Tool currentTool );

//void connectAddRemoveCommandSignals( QgsAddRemoveItemCommand* c );

signals:
Expand Down
79 changes: 45 additions & 34 deletions src/ui/qgscomposerarrowwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>196</width>
<height>407</height>
<width>232</width>
<height>430</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -24,14 +24,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>178</width>
<height>363</height>
<width>214</width>
<height>383</height>
</rect>
</property>
<attribute name="label">
<string>Arrow</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QPushButton" name="mArrowColorButton">
<property name="text">
Expand All @@ -58,20 +61,27 @@
<property name="title">
<string>Arrow markers</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="mDefaultMarkerRadioButton">
<layout class="QFormLayout" name="formLayout">
<item row="3" column="0">
<widget class="QLabel" name="mStartMarkerLabel">
<property name="text">
<string>Default marker</string>
<string>Start marker</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="mNoMarkerRadioButton">
<property name="text">
<string>No marker</string>
</property>
</widget>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="mStartMarkerLineEdit"/>
</item>
<item>
<widget class="QToolButton" name="mStartMarkerToolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<widget class="QRadioButton" name="mSvgMarkerRadioButton">
Expand All @@ -80,37 +90,38 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mStartMarkerLabel">
<property name="text">
<string>Start marker</string>
</property>
</widget>
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="mEndMarkerLineEdit"/>
</item>
<item>
<widget class="QToolButton" name="mEndMarkerToolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLineEdit" name="mStartMarkerLineEdit"/>
</item>
<item row="4" column="1">
<widget class="QToolButton" name="mStartMarkerToolButton">
<widget class="QLabel" name="mEndMarkerLabel">
<property name="text">
<string>...</string>
<string>End marker</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mEndMarkerLabel">
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="mNoMarkerRadioButton">
<property name="text">
<string>End marker</string>
<string>No marker</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLineEdit" name="mEndMarkerLineEdit"/>
</item>
<item row="6" column="1">
<widget class="QToolButton" name="mEndMarkerToolButton">
<item row="0" column="0" colspan="2">
<widget class="QRadioButton" name="mDefaultMarkerRadioButton">
<property name="text">
<string>...</string>
<string>Default marker</string>
</property>
</widget>
</item>
Expand Down
165 changes: 46 additions & 119 deletions src/ui/qgscomposerbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,117 +20,21 @@
<property name="mouseTracking">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QSplitter" name="mSplitter">
<widget class="QFrame" name="mViewFrame">
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QFrame" name="mViewFrame">
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
<widget class="QTabWidget" name="mOptionsTabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>10</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QGridLayout">
<property name="margin">
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="0" colspan="2">
<widget class="QFrame" name="mCompositionOptionsFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mCompositionNameComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Composition</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Item</string>
</attribute>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QStackedWidget" name="mItemStackedWidget">
<widget class="QWidget" name="page"/>
<widget class="QWidget" name="page_2"/>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
</item>
<item row="1" column="0">
Expand All @@ -143,6 +47,9 @@
</layout>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>Toolbar</string>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
Expand Down Expand Up @@ -171,7 +78,6 @@
<addaction name="mActionAddNewLabel"/>
<addaction name="mActionAddNewLegend"/>
<addaction name="mActionAddNewScalebar"/>
<addaction name="mActionAddBasicShape"/>
<addaction name="mActionAddArrow"/>
<addaction name="mActionAddTable"/>
<addaction name="separator"/>
Expand Down Expand Up @@ -449,14 +355,6 @@
<string>Ctrl+Q</string>
</property>
</action>
<action name="mActionAddBasicShape">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Add Basic Shape</string>
</property>
</action>
<action name="mActionAddArrow">
<property name="checkable">
<bool>true</bool>
Expand Down Expand Up @@ -512,11 +410,40 @@
<string>Ctrl+Shift+Z</string>
</property>
</action>
<action name="mActionAddRectangle">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Add Rectangle</string>
</property>
<property name="toolTip">
<string>Add Rectangle</string>
</property>
</action>
<action name="mActionAddTriangle">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Add Triangle</string>
</property>
<property name="toolTip">
<string>Add Triangle</string>
</property>
</action>
<action name="mActionAddEllipse">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Add Ellipse</string>
</property>
<property name="toolTip">
<string>Add Ellipse</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>mCompositionNameComboBox</tabstop>
<tabstop>mOptionsTabWidget</tabstop>
</tabstops>
<resources>
<include location="../../images/images.qrc"/>
</resources>
Expand Down
80 changes: 40 additions & 40 deletions src/ui/qgscomposeritemwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mFrameColorButton">
<property name="text">
<string>Frame color...</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mBackgroundColorButton">
<property name="text">
<string>Background color...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<layout class="QFormLayout" name="formLayout">
<item row="3" column="0">
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Opacity</string>
Expand All @@ -41,17 +27,7 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="5" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Outline width</string>
Expand All @@ -64,34 +40,51 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
<item row="9" column="0">
<widget class="QLabel" name="mIdLabel">
<property name="text">
<string>Item ID</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QPushButton" name="mPositionButton">
<item row="0" column="0" colspan="2">
<widget class="QPushButton" name="mFrameColorButton">
<property name="text">
<string>Position and size...</string>
<string>Frame color...</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QCheckBox" name="mFrameCheckBox">
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mBackgroundColorButton">
<property name="text">
<string>Show frame</string>
<string>Background color...</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="mIdLabel">
<item row="3" column="1">
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
<item row="7" column="0" colspan="2">
<widget class="QPushButton" name="mPositionButton">
<property name="text">
<string>Item ID</string>
<string>Position and size...</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2">
<item row="9" column="1">
<widget class="QLineEdit" name="mItemIdLineEdit"/>
</item>
<item row="12" column="0" colspan="2">
<item row="11" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -104,6 +97,13 @@
</property>
</spacer>
</item>
<item row="8" column="0" colspan="2">
<widget class="QCheckBox" name="mFrameCheckBox">
<property name="text">
<string>Show frame</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
Expand Down
55 changes: 39 additions & 16 deletions src/ui/qgscomposerlabelwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>547</width>
<width>433</width>
<height>425</height>
</rect>
</property>
Expand All @@ -30,8 +30,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>529</width>
<height>376</height>
<width>415</width>
<height>378</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -65,19 +65,6 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mMarginTextLabel">
<property name="text">
<string>Margin (mm)</string>
</property>
<property name="buddy">
<cstring>mMarginDoubleSpinBox</cstring>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox"/>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="buttonGroup1">
<property name="title">
Expand Down Expand Up @@ -108,6 +95,19 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -138,9 +138,32 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="6" column="0">
<widget class="QDoubleSpinBox" name="mMarginDoubleSpinBox">
<property name="prefix">
<string>Margin </string>
</property>
<property name="suffix">
<string>mm</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
Expand Down
128 changes: 93 additions & 35 deletions src/ui/qgscomposerlegendwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>371</width>
<height>476</height>
<width>405</width>
<height>490</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -25,6 +25,9 @@
</property>
<item row="0" column="0">
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
Expand All @@ -33,43 +36,33 @@
<rect>
<x>0</x>
<y>0</y>
<width>367</width>
<height>472</height>
<width>405</width>
<height>490</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>349</width>
<height>398</height>
<y>-26</y>
<width>370</width>
<height>440</height>
</rect>
</property>
<attribute name="label">
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="mTitleLabel">
<property name="text">
<string>&amp;Title</string>
</property>
<property name="buddy">
<cstring>mTitleLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLineEdit" name="mTitleLineEdit"/>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QPushButton" name="mTitleFontButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
Expand All @@ -82,28 +75,28 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QPushButton" name="mGroupFontButton">
<property name="text">
<string>Group Font...</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QPushButton" name="mLayerFontButton">
<property name="text">
<string>Layer Font...</string>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QPushButton" name="mItemFontButton">
<property name="text">
<string>Item Font...</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QDoubleSpinBox" name="mSymbolWidthSpinBox">
<property name="prefix">
<string>Symbol width </string>
Expand All @@ -113,7 +106,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QDoubleSpinBox" name="mSymbolHeightSpinBox">
<property name="prefix">
<string>Symbol height </string>
Expand All @@ -123,7 +116,7 @@
</property>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QDoubleSpinBox" name="mLayerSpaceSpinBox">
<property name="prefix">
<string>Layer space </string>
Expand All @@ -133,7 +126,7 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QDoubleSpinBox" name="mSymbolSpaceSpinBox">
<property name="prefix">
<string>Symbol space </string>
Expand All @@ -143,7 +136,7 @@
</property>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QDoubleSpinBox" name="mIconLabelSpaceSpinBox">
<property name="prefix">
<string>Icon label space </string>
Expand All @@ -153,7 +146,7 @@
</property>
</widget>
</item>
<item row="11" column="0">
<item row="12" column="0">
<widget class="QDoubleSpinBox" name="mBoxSpaceSpinBox">
<property name="prefix">
<string>Box space </string>
Expand All @@ -163,7 +156,7 @@
</property>
</widget>
</item>
<item row="14" column="0">
<item row="15" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -176,25 +169,35 @@
</property>
</spacer>
</item>
<item row="13" column="0">
<item row="14" column="0">
<widget class="QComboBox" name="mMapComboBox"/>
</item>
<item row="12" column="0">
<item row="13" column="0">
<widget class="QLabel" name="mMapLabel">
<property name="text">
<string>Map</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mTitleLabel">
<property name="text">
<string>&amp;Title</string>
</property>
<property name="buddy">
<cstring>mTitleLineEdit</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>349</width>
<height>398</height>
<width>387</width>
<height>414</height>
</rect>
</property>
<attribute name="label">
Expand All @@ -217,7 +220,7 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="8">
<item row="1" column="0" colspan="9">
<widget class="QTreeView" name="mItemTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
Expand All @@ -241,44 +244,86 @@
</item>
<item row="2" column="0">
<widget class="QToolButton" name="mMoveDownToolButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QToolButton" name="mMoveUpToolButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QToolButton" name="mAddToolButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QToolButton" name="mRemoveToolButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QToolButton" name="mEditPushButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QToolButton" name="mUpdatePushButton">
<property name="text">
<string>Update</string>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="6">
Expand All @@ -288,6 +333,19 @@
</property>
</widget>
</item>
<item row="2" column="8">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="7">
<widget class="QToolButton" name="mAddGroupButton">
<property name="text">
Expand Down
775 changes: 388 additions & 387 deletions src/ui/qgscomposermapwidgetbase.ui

Large diffs are not rendered by default.

201 changes: 101 additions & 100 deletions src/ui/qgscomposerpicturewidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>293</width>
<height>540</height>
<width>327</width>
<height>614</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -32,68 +32,19 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-129</y>
<width>266</width>
<height>632</height>
<y>0</y>
<width>327</width>
<height>585</height>
</rect>
</property>
<attribute name="label">
<string>Picture options</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QGroupBox" name="mSearchDirectoriesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Search directories</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0" colspan="3">
<widget class="QComboBox" name="mSearchDirectoriesComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>101</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="mAddDirectoryButton">
<property name="text">
<string>Add...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="mRemoveDirectoryButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>3</number>
</property>
<item>
<widget class="QGroupBox" name="mPreviewGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
Expand All @@ -102,7 +53,7 @@
</sizepolicy>
</property>
<property name="title">
<string>Preview</string>
<string>Preloaded images</string>
</property>
<layout class="QGridLayout">
<property name="leftMargin">
Expand Down Expand Up @@ -142,27 +93,18 @@
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Load</string>
</property>
<property name="buddy">
<cstring>mPictureLineEdit</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Load another</string>
</property>
<property name="buddy">
<cstring>mPictureLineEdit</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="mPictureLineEdit"/>
</item>
Expand All @@ -187,7 +129,22 @@
</item>
</layout>
</item>
<item row="2" column="0">
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Options</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="margin">
<number>3</number>
</property>
<item row="3" column="0">
<widget class="QLabel" name="textLabel3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
Expand All @@ -206,10 +163,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="mWidthLineEdit"/>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="textLabel4">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
Expand All @@ -228,12 +182,8 @@
</property>
</widget>
</item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="mHeightLineEdit"/>
</item>
</layout>
<item row="5" column="1">
<widget class="QLineEdit" name="mHeightLineEdit"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mRotationLabel">
Expand All @@ -254,22 +204,77 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QCheckBox" name="mRotationFromComposerMapCheckBox">
<property name="text">
<string>Sync with map</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="mRotationSpinBox">
<property name="maximum">
<double>360.000000000000000</double>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="mRotationFromComposerMapCheckBox">
<item row="8" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="mWidthLineEdit"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="mSearchDirectoriesGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Search directories</string>
</property>
<layout class="QGridLayout">
<item row="0" column="0" colspan="3">
<widget class="QComboBox" name="mSearchDirectoriesComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>101</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="mAddDirectoryButton">
<property name="text">
<string>Sync with map</string>
<string>Add...</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QComboBox" name="mComposerMapComboBox"/>
<item row="1" column="2">
<widget class="QPushButton" name="mRemoveDirectoryButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</widget>
Expand All @@ -288,11 +293,7 @@
<tabstop>mPreviewListWidget</tabstop>
<tabstop>mPictureLineEdit</tabstop>
<tabstop>mPictureBrowseButton</tabstop>
<tabstop>mWidthLineEdit</tabstop>
<tabstop>mHeightLineEdit</tabstop>
<tabstop>mRotationSpinBox</tabstop>
<tabstop>mRotationFromComposerMapCheckBox</tabstop>
<tabstop>mComposerMapComboBox</tabstop>
</tabstops>
<resources/>
<connections/>
Expand Down
152 changes: 78 additions & 74 deletions src/ui/qgscomposerscalebarwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>298</width>
<height>545</height>
<width>325</width>
<height>508</height>
</rect>
</property>
<attribute name="label">
<string>Scale bar</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="mSegmentSizeLabel">
<property name="text">
Expand All @@ -54,7 +54,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mSegmentSizeSpinBox">
<property name="decimals">
<number>4</number>
Expand All @@ -64,7 +64,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="1" column="0">
<widget class="QLabel" name="mMapUnitsPerBarUnitLabel">
<property name="text">
<string>Map units per bar unit</string>
Expand All @@ -77,28 +77,32 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="mMapUnitsPerBarUnitSpinBox">
<property name="maximum">
<double>9999999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QSpinBox" name="mNumberOfSegmentsSpinBox">
<property name="suffix">
<string> Right segments</string>
</property>
</widget>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QSpinBox" name="mSegmentsLeftSpinBox">
<property name="suffix">
<string> Left segments</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="mNumberOfSegmentsSpinBox">
<property name="suffix">
<string> Right segments</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QSpinBox" name="mSegmentsLeftSpinBox">
<property name="suffix">
<string> Left segments</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="3" column="0">
<widget class="QLabel" name="mStyleLabel">
<property name="text">
<string>Style</string>
Expand All @@ -108,10 +112,10 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="3" column="1">
<widget class="QComboBox" name="mStyleComboBox"/>
</item>
<item row="8" column="0">
<item row="4" column="0">
<widget class="QLabel" name="mMapLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
Expand All @@ -130,7 +134,7 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="4" column="1">
<widget class="QComboBox" name="mMapComboBox">
<property name="enabled">
<bool>true</bool>
Expand All @@ -143,7 +147,53 @@
</property>
</widget>
</item>
<item row="12" column="0">
<item row="5" column="0">
<widget class="QLabel" name="mAlignmentLabel">
<property name="text">
<string>Alignment</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="mAlignmentComboBox"/>
</item>
<item row="10" 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="10" column="1">
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
</item>
<item row="11" 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="12" column="0" colspan="2">
<widget class="QPushButton" name="mColorPushButton">
<property name="text">
<string>Color...</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QSpinBox" name="mHeightSpinBox">
<property name="suffix">
<string> mm</string>
Expand All @@ -153,7 +203,7 @@
</property>
</widget>
</item>
<item row="13" column="0">
<item row="7" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
Expand All @@ -178,7 +228,7 @@
</property>
</widget>
</item>
<item row="14" column="0">
<item row="8" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mLabelBarSpaceSpinBox">
<property name="prefix">
<string>Label space </string>
Expand All @@ -188,7 +238,7 @@
</property>
</widget>
</item>
<item row="15" column="0">
<item row="9" column="0" colspan="2">
<widget class="QDoubleSpinBox" name="mBoxSizeSpinBox">
<property name="prefix">
<string>Box space </string>
Expand All @@ -198,43 +248,7 @@
</property>
</widget>
</item>
<item row="16" 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="17" column="0">
<widget class="QLineEdit" name="mUnitLabelLineEdit"/>
</item>
<item row="18" column="0">
<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="19" column="0">
<widget class="QPushButton" name="mColorPushButton">
<property name="text">
<string>Color...</string>
</property>
</widget>
</item>
<item row="20" column="0">
<item row="13" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
Expand All @@ -247,16 +261,6 @@
</property>
</spacer>
</item>
<item row="11" column="0">
<widget class="QComboBox" name="mAlignmentComboBox"/>
</item>
<item row="10" column="0">
<widget class="QLabel" name="mAlignmentLabel">
<property name="text">
<string>Alignment</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
Expand Down
225 changes: 123 additions & 102 deletions src/ui/qgscomposertablewidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>269</width>
<height>346</height>
<width>262</width>
<height>490</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QToolBox" name="mToolBox">
<property name="currentIndex">
Expand All @@ -24,134 +27,116 @@
<rect>
<x>0</x>
<y>0</y>
<width>260</width>
<height>298</height>
<width>239</width>
<height>464</height>
</rect>
</property>
<attribute name="label">
<string>Table</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="mLayerLabel">
<property name="text">
<string>Layer</string>
</property>
<property name="buddy">
<cstring>mLayerComboBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mLayerComboBox"/>
</item>
</layout>
</item>
<item row="1" column="0">
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mLayerLabel">
<property name="text">
<string>Layer</string>
</property>
<property name="buddy">
<cstring>mLayerComboBox</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="mLayerComboBox"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QPushButton" name="mAttributesPushButton">
<property name="text">
<string>Attributes...</string>
</property>
</widget>
</item>
<item row="1" column="1">
<spacer name="horizontalSpacer">
<item row="3" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="mShowOnlyVisibleFeaturesCheckBox">
<item row="5" column="0">
<widget class="QLabel" name="mComposerMapLabel">
<property name="text">
<string>Show only visible features</string>
<string>Composer map</string>
</property>
<property name="buddy">
<cstring>mComposerMapComboBox</cstring>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="mComposerMapLabel">
<property name="text">
<string>Composer map</string>
</property>
<property name="buddy">
<cstring>mComposerMapComboBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
</layout>
<item row="5" column="1">
<widget class="QComboBox" name="mComposerMapComboBox"/>
</item>
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mMaxNumFeaturesLabel">
<property name="text">
<string>Maximum rows</string>
</property>
<property name="buddy">
<cstring>mMaximumColumnsSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="mMaximumColumnsSpinBox"/>
</item>
</layout>
</item>
<item row="5" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
<property name="buddy">
<cstring>mMarginSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mMarginSpinBox"/>
</item>
</layout>
</item>
<item row="6" column="0" colspan="2">
<item row="8" column="0">
<widget class="QLabel" name="mMaxNumFeaturesLabel">
<property name="text">
<string>Maximum rows</string>
</property>
<property name="buddy">
<cstring>mMaximumColumnsSpinBox</cstring>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="mMaximumColumnsSpinBox"/>
</item>
<item row="12" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="0" colspan="2">
<widget class="QCheckBox" name="mShowGridCheckBox">
<property name="text">
<string>Show grid</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="mGridStrokeWidthLabel">
<property name="text">
<string>Grid stroke width</string>
</property>
<property name="buddy">
<cstring>mGridStrokeWidthSpinBox</cstring>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mGridStrokeWidthSpinBox"/>
</item>
</layout>
<item row="14" column="0">
<widget class="QLabel" name="mGridStrokeWidthLabel">
<property name="text">
<string>Grid stroke width</string>
</property>
<property name="buddy">
<cstring>mGridStrokeWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QDoubleSpinBox" name="mGridStrokeWidthSpinBox"/>
</item>
<item row="8" column="0">
<item row="15" column="0">
<widget class="QLabel" name="mGridColorLabel">
<property name="text">
<string>Grid color</string>
Expand All @@ -161,7 +146,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="15" column="1">
<widget class="QgsColorButton" name="mGridColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
Expand All @@ -174,20 +159,56 @@
</property>
</widget>
</item>
<item row="9" column="0">
<item row="20" column="0" colspan="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="22" column="0" colspan="2">
<widget class="QPushButton" name="mHeaderFontPushButton">
<property name="text">
<string>Header Font...</string>
</property>
</widget>
</item>
<item row="9" column="1">
<item row="24" column="0" colspan="2">
<widget class="QPushButton" name="mContentFontPushButton">
<property name="text">
<string>Content Font...</string>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="mMarginLabel">
<property name="text">
<string>Margin</string>
</property>
<property name="buddy">
<cstring>mMarginSpinBox</cstring>
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QDoubleSpinBox" name="mMarginSpinBox"/>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="mShowOnlyVisibleFeaturesCheckBox">
<property name="text">
<string>Show only visible features</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
Expand Down
298 changes: 172 additions & 126 deletions src/ui/qgscompositionwidgetbase.ui

Large diffs are not rendered by default.