mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[FEATURE]: Possibility to rotate composer map
git-svn-id: http://svn.osgeo.org/qgis/trunk@11847 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
f2296bba3c
commit
b19baed341
@ -24,6 +24,26 @@ class QgsComposerMap : QObject, QgsComposerItem
|
||||
Rectangle // Display only rectangle
|
||||
};
|
||||
|
||||
enum GridStyle
|
||||
{
|
||||
Solid = 0, //solid lines
|
||||
Cross //only draw line crossings
|
||||
};
|
||||
|
||||
enum GridAnnotationPosition
|
||||
{
|
||||
InsideMapFrame = 0,
|
||||
OutsideMapFrame
|
||||
};
|
||||
|
||||
enum GridAnnotationDirection
|
||||
{
|
||||
Horizontal = 0,
|
||||
Vertical,
|
||||
HorizontalAndVertical,
|
||||
BoundaryDirection
|
||||
};
|
||||
|
||||
/** \brief Draw to paint device
|
||||
@param extent map extent
|
||||
@param size size in scene coordinates
|
||||
@ -71,6 +91,22 @@ class QgsComposerMap : QObject, QgsComposerItem
|
||||
PreviewMode previewMode();
|
||||
void setPreviewMode( PreviewMode m );
|
||||
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@note this function was added in version 1.2*/
|
||||
bool keepLayerSet() const;
|
||||
/**Setter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@note this function was added in version 1.2*/
|
||||
void setKeepLayerSet( bool enabled );
|
||||
|
||||
/**Getter for stored layer set that is used if mKeepLayerSet is true
|
||||
@note this function was added in version 1.2*/
|
||||
QStringList layerSet() const;
|
||||
/**Setter for stored layer set that is used if mKeepLayerSet is true
|
||||
@note this function was added in version 1.2*/
|
||||
void setLayerSet( const QStringList& layerSet );
|
||||
/**Stores the current layer set of the qgis mapcanvas in mLayerSet*/
|
||||
void storeCurrentLayerSet();
|
||||
|
||||
// Set cache outdated
|
||||
void setCacheUpdated( bool u = false );
|
||||
|
||||
@ -95,6 +131,55 @@ class QgsComposerMap : QObject, QgsComposerItem
|
||||
*/
|
||||
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
||||
|
||||
void setGridEnabled( bool enabled );
|
||||
bool gridEnabled() const;
|
||||
|
||||
void setGridStyle( GridStyle style );
|
||||
GridStyle gridStyle() const;
|
||||
|
||||
void setGridIntervalX( double interval );
|
||||
double gridIntervalX() const;
|
||||
|
||||
void setGridIntervalY( double interval );
|
||||
double gridIntervalY() const;
|
||||
|
||||
void setGridOffsetX( double offset );
|
||||
double gridOffsetX() const;
|
||||
|
||||
void setGridOffsetY( double offset );
|
||||
double gridOffsetY() const;
|
||||
|
||||
void setGridPen( const QPen& p );
|
||||
QPen gridPen() const;
|
||||
void setGridPenWidth( double w );
|
||||
void setGridPenColor( const QColor& c );
|
||||
|
||||
void setGridAnnotationFont( const QFont& f );
|
||||
QFont gridAnnotationFont() const;
|
||||
|
||||
void setShowGridAnnotation( bool show );
|
||||
bool showGridAnnotation() const;
|
||||
|
||||
void setGridAnnotationPosition( GridAnnotationPosition p );
|
||||
GridAnnotationPosition gridAnnotationPosition() const;
|
||||
|
||||
void setAnnotationFrameDistance( double d ) {mAnnotationFrameDistance = d;}
|
||||
double annotationFrameDistance() const {return mAnnotationFrameDistance;}
|
||||
|
||||
void setGridAnnotationDirection( GridAnnotationDirection d );
|
||||
GridAnnotationDirection gridAnnotationDirection() const;
|
||||
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle*/
|
||||
QRectF boundingRect() const;
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle*/
|
||||
void updateBoundingRect();
|
||||
|
||||
void setRotation(double r);
|
||||
double rotation() const;
|
||||
|
||||
void setCrossLength(double l);
|
||||
double crossLength();
|
||||
|
||||
public slots:
|
||||
|
||||
/**Called if map canvas has changed*/
|
||||
|
@ -25,11 +25,13 @@
|
||||
QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidget(), mComposerMap( composerMap )
|
||||
{
|
||||
setupUi( this );
|
||||
mGridDockWidget->setVisible( false );
|
||||
mGridWidget->setVisible( false );
|
||||
mGridWidget->setParent( 0 ); //in order to save space, separate the grid widget
|
||||
mGridWidget->setWindowFlags( Qt::CustomizeWindowHint | Qt::WindowTitleHint );
|
||||
|
||||
//add widget for general composer item properties
|
||||
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
|
||||
gridLayout_3->addWidget( itemPropertiesWidget, 7, 0, 1, 1 );
|
||||
gridLayout_3->addWidget( itemPropertiesWidget, 6, 0, 1, 1 );
|
||||
QDoubleValidator v( 0 );
|
||||
|
||||
mWidthLineEdit->setValidator( &v );
|
||||
@ -55,9 +57,8 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidg
|
||||
mAnnotationDirectionComboBox->insertItem( 0, tr( "Horizontal" ) );
|
||||
mAnnotationDirectionComboBox->insertItem( 1, tr( "Vertical" ) );
|
||||
mAnnotationDirectionComboBox->insertItem( 2, tr( "Horizontal and Vertical" ) );
|
||||
mAnnotationDirectionComboBox->insertItem( 2, tr( "Boundary direction" ) );
|
||||
|
||||
mAnnotationTypeComboBox->insertItem( 0, tr( "Coordinate" ) );
|
||||
mAnnotationTypeComboBox->insertItem( 1, tr( "Sector" ) );
|
||||
blockAllSignals( false );
|
||||
|
||||
if ( composerMap )
|
||||
@ -70,7 +71,7 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidg
|
||||
|
||||
QgsComposerMapWidget::~QgsComposerMapWidget()
|
||||
{
|
||||
|
||||
delete mGridWidget;
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mWidthLineEdit_editingFinished()
|
||||
@ -160,6 +161,18 @@ void QgsComposerMapWidget::on_mScaleLineEdit_editingFinished()
|
||||
mComposerMap->setNewScale( scaleDenominator );
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mRotationSpinBox_valueChanged( int value )
|
||||
{
|
||||
if ( !mComposerMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mComposerMap->setRotation( value );
|
||||
mComposerMap->cache();
|
||||
mComposerMap->update();
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mSetToMapCanvasExtentButton_clicked()
|
||||
{
|
||||
if ( mComposerMap )
|
||||
@ -274,6 +287,8 @@ void QgsComposerMapWidget::updateGuiElements()
|
||||
mYMinLineEdit->setText( QString::number( composerMapExtent.yMinimum(), 'f', 3 ) );
|
||||
mYMaxLineEdit->setText( QString::number( composerMapExtent.yMaximum(), 'f', 3 ) );
|
||||
|
||||
mRotationSpinBox->setValue( mComposerMap->rotation() );
|
||||
|
||||
//keep layer list check box
|
||||
if ( mComposerMap->keepLayerSet() )
|
||||
{
|
||||
@ -309,6 +324,8 @@ void QgsComposerMapWidget::updateGuiElements()
|
||||
mGridTypeComboBox->setCurrentIndex( mGridTypeComboBox->findText( tr( "Solid" ) ) );
|
||||
}
|
||||
|
||||
mCrossWidthSpinBox->setValue( mComposerMap->crossLength() );
|
||||
|
||||
QgsComposerMap::GridAnnotationPosition annotationPos = mComposerMap->gridAnnotationPosition();
|
||||
if ( annotationPos == QgsComposerMap::InsideMapFrame )
|
||||
{
|
||||
@ -339,19 +356,13 @@ void QgsComposerMapWidget::updateGuiElements()
|
||||
{
|
||||
mAnnotationDirectionComboBox->setCurrentIndex( mAnnotationDirectionComboBox->findText( tr( "Vertical" ) ) );
|
||||
}
|
||||
else
|
||||
else if ( dir == QgsComposerMap::HorizontalAndVertical )
|
||||
{
|
||||
mAnnotationDirectionComboBox->setCurrentIndex( mAnnotationDirectionComboBox->findText( tr( "Horizontal and Vertical" ) ) );
|
||||
}
|
||||
|
||||
QgsComposerMap::GridAnnotationType type = mComposerMap->gridAnnotationType();
|
||||
if ( type == QgsComposerMap::Sector )
|
||||
else //BoundaryDirection
|
||||
{
|
||||
mAnnotationTypeComboBox->setCurrentIndex( mAnnotationTypeComboBox->findText( tr( "Sector" ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mAnnotationTypeComboBox->setCurrentIndex( mAnnotationTypeComboBox->findText( tr( "Coordinate" ) ) );
|
||||
mAnnotationDirectionComboBox->setCurrentIndex( mAnnotationDirectionComboBox->findText( tr( "Boundary direction" ) ) );
|
||||
}
|
||||
|
||||
|
||||
@ -400,6 +411,7 @@ void QgsComposerMapWidget::blockAllSignals( bool b )
|
||||
mOffsetXSpinBox->blockSignals( b );
|
||||
mOffsetYSpinBox->blockSignals( b );
|
||||
mGridTypeComboBox->blockSignals( b );
|
||||
mCrossWidthSpinBox->blockSignals( b );
|
||||
mPreviewModeComboBox->blockSignals( b );
|
||||
mKeepLayerListCheckBox->blockSignals( b );
|
||||
mSetToMapCanvasExtentButton->blockSignals( b );
|
||||
@ -411,7 +423,6 @@ void QgsComposerMapWidget::blockAllSignals( bool b )
|
||||
mAnnotationPositionComboBox->blockSignals( b );
|
||||
mDistanceToMapFrameSpinBox->blockSignals( b );
|
||||
mAnnotationDirectionComboBox->blockSignals( b );
|
||||
mAnnotationTypeComboBox->blockSignals( b );
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mUpdatePreviewButton_clicked()
|
||||
@ -561,6 +572,17 @@ void QgsComposerMapWidget::on_mGridTypeComboBox_currentIndexChanged( const QStri
|
||||
mComposerMap->update();
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mCrossWidthSpinBox_valueChanged( double d )
|
||||
{
|
||||
if ( !mComposerMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mComposerMap->setCrossLength( d );
|
||||
mComposerMap->update();
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mAnnotationFontButton_clicked()
|
||||
{
|
||||
if ( !mComposerMap )
|
||||
@ -647,40 +669,26 @@ void QgsComposerMapWidget::on_mAnnotationDirectionComboBox_currentIndexChanged(
|
||||
{
|
||||
mComposerMap->setGridAnnotationDirection( QgsComposerMap::Vertical );
|
||||
}
|
||||
else
|
||||
else if ( text == tr( "Horizontal and Vertical" ) )
|
||||
{
|
||||
mComposerMap->setGridAnnotationDirection( QgsComposerMap::HorizontalAndVertical );
|
||||
}
|
||||
else //BoundaryDirection
|
||||
{
|
||||
mComposerMap->setGridAnnotationDirection( QgsComposerMap::BoundaryDirection );
|
||||
}
|
||||
mComposerMap->updateBoundingRect();
|
||||
mComposerMap->update();
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mAnnotationTypeComboBox_currentIndexChanged( const QString& text )
|
||||
{
|
||||
if ( !mComposerMap )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( text == tr( "Sector" ) )
|
||||
{
|
||||
mComposerMap->setGridAnnotationType( QgsComposerMap::Sector );
|
||||
}
|
||||
else
|
||||
{
|
||||
mComposerMap->setGridAnnotationType( QgsComposerMap::Coordinate );
|
||||
}
|
||||
mComposerMap->update();
|
||||
}
|
||||
|
||||
void QgsComposerMapWidget::on_mShowGridDialogCheckBox_stateChanged( int state )
|
||||
{
|
||||
if ( state == Qt::Checked )
|
||||
{
|
||||
mGridDockWidget->setVisible( true );
|
||||
mGridWidget->setVisible( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
mGridDockWidget->setVisible( false );
|
||||
mGridWidget->setVisible( false );
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
|
||||
void on_mHeightLineEdit_editingFinished();
|
||||
void on_mPreviewModeComboBox_activated( int i );
|
||||
void on_mScaleLineEdit_editingFinished();
|
||||
void on_mRotationSpinBox_valueChanged( int value );
|
||||
void on_mSetToMapCanvasExtentButton_clicked();
|
||||
void on_mUpdatePreviewButton_clicked();
|
||||
void on_mKeepLayerListCheckBox_stateChanged( int state );
|
||||
@ -56,12 +57,12 @@ class QgsComposerMapWidget: public QWidget, private Ui::QgsComposerMapWidgetBase
|
||||
void on_mLineWidthSpinBox_valueChanged( double d );
|
||||
void on_mLineColorButton_clicked();
|
||||
void on_mGridTypeComboBox_currentIndexChanged( const QString& text );
|
||||
void on_mCrossWidthSpinBox_valueChanged( double d );
|
||||
void on_mAnnotationFontButton_clicked();
|
||||
void on_mDistanceToMapFrameSpinBox_valueChanged( double d );
|
||||
void on_mAnnotationPositionComboBox_currentIndexChanged( const QString& text );
|
||||
void on_mDrawAnnotationCheckBox_stateChanged( int state );
|
||||
void on_mAnnotationDirectionComboBox_currentIndexChanged( const QString& text );
|
||||
void on_mAnnotationTypeComboBox_currentIndexChanged( const QString& text );
|
||||
void on_mShowGridDialogCheckBox_stateChanged( int state );
|
||||
|
||||
/**Updates width and height without notify the composer map (to avoid infinite recursion)*/
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define FONT_WORKAROUND_SCALE 10 //scale factor for upscaling fontsize and downscaling painter
|
||||
|
||||
QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue ): QGraphicsRectItem( 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), \
|
||||
mFrame( true ), mItemPositionLocked( false )
|
||||
mFrame( true ), mItemPositionLocked( false ), mLastValidViewScaleFactor( -1 )
|
||||
{
|
||||
setFlag( QGraphicsItem::ItemIsSelectable, true );
|
||||
setAcceptsHoverEvents( true );
|
||||
@ -53,7 +53,7 @@ QgsComposerItem::QgsComposerItem( QgsComposition* composition, bool manageZValue
|
||||
}
|
||||
|
||||
QgsComposerItem::QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition, bool manageZValue ): \
|
||||
QGraphicsRectItem( 0, 0, width, height, 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), mFrame( true ), mItemPositionLocked( false )
|
||||
QGraphicsRectItem( 0, 0, width, height, 0 ), mComposition( composition ), mBoundingResizeRectangle( 0 ), mFrame( true ), mItemPositionLocked( false ), mLastValidViewScaleFactor( -1 )
|
||||
{
|
||||
setFlag( QGraphicsItem::ItemIsSelectable, true );
|
||||
setAcceptsHoverEvents( true );
|
||||
@ -135,6 +135,8 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
|
||||
composerItemElem.setAttribute( "positionLock", "false" );
|
||||
}
|
||||
|
||||
composerItemElem.setAttribute( "lastValidViewScaleFactor", mLastValidViewScaleFactor );
|
||||
|
||||
|
||||
//frame color
|
||||
QDomElement frameColorElem = doc.createElement( "FrameColor" );
|
||||
@ -205,6 +207,8 @@ bool QgsComposerItem::_readXML( const QDomElement& itemElem, const QDomDocument&
|
||||
setSceneRect( QRectF( x, y, width, height ) );
|
||||
setZValue( itemElem.attribute( "zValue" ).toDouble() );
|
||||
|
||||
mLastValidViewScaleFactor = itemElem.attribute( "lastValidViewScaleFactor", "-1" ).toDouble();
|
||||
|
||||
//pen
|
||||
QDomNodeList frameColorList = itemElem.elementsByTagName( "FrameColor" );
|
||||
if ( frameColorList.size() > 0 )
|
||||
@ -736,17 +740,18 @@ QFont QgsComposerItem::scaledFontPixelSize( const QFont& font ) const
|
||||
|
||||
double QgsComposerItem::horizontalViewScaleFactor() const
|
||||
{
|
||||
double result = 1;
|
||||
double result = -1;
|
||||
if ( scene() )
|
||||
{
|
||||
QList<QGraphicsView*> viewList = scene()->views();
|
||||
if ( viewList.size() > 0 )
|
||||
if ( viewList.size() > 0 ) //if not, probably this function was called from non-gui code
|
||||
{
|
||||
result = viewList.at( 0 )->transform().m11();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1; //probably called from non-gui code
|
||||
QGraphicsView* currentView = viewList.at( 0 );
|
||||
if ( currentView->isVisible() )
|
||||
{
|
||||
result = currentView->transform().m11();
|
||||
mLastValidViewScaleFactor = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
@ -188,6 +188,9 @@ class CORE_EXPORT QgsComposerItem: public QGraphicsRectItem
|
||||
@note: this member was added in version 1.2*/
|
||||
bool mItemPositionLocked;
|
||||
|
||||
/**Backup to restore item appearance if no view scale factor is available*/
|
||||
mutable double mLastValidViewScaleFactor;
|
||||
|
||||
//event handlers
|
||||
virtual void mouseMoveEvent( QGraphicsSceneMouseEvent * event );
|
||||
virtual void mousePressEvent( QGraphicsSceneMouseEvent * event );
|
||||
@ -228,8 +231,8 @@ class CORE_EXPORT QgsComposerItem: public QGraphicsRectItem
|
||||
@note: this function was introduced in version 1.2*/
|
||||
double lockSymbolSize() const;
|
||||
|
||||
/**Returns the zoom factor of the graphics view. If no
|
||||
graphics view exists, the default 1 is returned
|
||||
/**Returns the zoom factor of the graphics view.
|
||||
@return the factor or -1 in case of error (e.g. graphic view does not exist)
|
||||
@note: this function was introduced in version 1.2*/
|
||||
double horizontalViewScaleFactor() const;
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -70,13 +70,8 @@ class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapB
|
||||
{
|
||||
Horizontal = 0,
|
||||
Vertical,
|
||||
HorizontalAndVertical
|
||||
};
|
||||
|
||||
enum GridAnnotationType
|
||||
{
|
||||
Coordinate = 0, //annotation at line, displays coordinates
|
||||
Sector //annotation at sector: 1, 2, 3 for horizontal lines and A, B, C for vertical ones
|
||||
HorizontalAndVertical,
|
||||
BoundaryDirection
|
||||
};
|
||||
|
||||
/** \brief Draw to paint device
|
||||
@ -204,14 +199,17 @@ class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapB
|
||||
void setGridAnnotationDirection( GridAnnotationDirection d ) {mGridAnnotationDirection = d;}
|
||||
GridAnnotationDirection gridAnnotationDirection() const {return mGridAnnotationDirection;}
|
||||
|
||||
void setGridAnnotationType( GridAnnotationType t ) {mGridAnnotationType = t;}
|
||||
GridAnnotationType gridAnnotationType() const {return mGridAnnotationType; }
|
||||
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle*/
|
||||
QRectF boundingRect() const;
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle*/
|
||||
void updateBoundingRect();
|
||||
|
||||
void setRotation( double r ) { mRotation = r; }
|
||||
double rotation() const { return mRotation; }
|
||||
|
||||
void setCrossLength( double l ) {mCrossLength = l;}
|
||||
double crossLength() {return mCrossLength;}
|
||||
|
||||
public slots:
|
||||
|
||||
/**Called if map canvas has changed*/
|
||||
@ -225,6 +223,15 @@ class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapB
|
||||
|
||||
private:
|
||||
|
||||
/**Enum for different frame borders*/
|
||||
enum Border
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Bottom,
|
||||
Top
|
||||
};
|
||||
|
||||
// Pointer to map renderer of the QGIS main map. Note that QgsComposerMap uses a different map renderer,
|
||||
//it just copies some properties from the main map renderer.
|
||||
QgsMapRenderer *mMapRenderer;
|
||||
@ -296,33 +303,60 @@ class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapB
|
||||
double mAnnotationFrameDistance;
|
||||
/**Annotation can be horizontal / vertical or different for axes*/
|
||||
GridAnnotationDirection mGridAnnotationDirection;
|
||||
/**Coordinate values (default) or sector (1A, 1B, ...)*/
|
||||
GridAnnotationType mGridAnnotationType;
|
||||
/**Current bounding rectangle. This is used to check if notification to the graphics scene is necessary*/
|
||||
QRectF mCurrentRectangle;
|
||||
|
||||
/**Rotation of the map. Clockwise in degrees, north direction is 0*/
|
||||
double mRotation;
|
||||
/**The length of the cross sides for mGridStyle Cross*/
|
||||
double mCrossLength;
|
||||
|
||||
/**Draws the map grid*/
|
||||
void drawGrid( QPainter* p );
|
||||
/**Annotations for composer grid*/
|
||||
void drawGridAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
|
||||
/**Draw coordinates for mGridAnnotationType Coordinate
|
||||
@param lines the coordinate lines in item coordinates*/
|
||||
void drawCoordinateAnnotations( QPainter* p, const QList< QPair< double, QLineF > >& hLines, const QList< QPair< double, QLineF > >& vLines );
|
||||
void drawCoordinateAnnotation( QPainter* p, const QPointF& pos, QString annotationString );
|
||||
/**Draws a single annotation
|
||||
@param p drawing painter
|
||||
@param pos item coordinates where to draw
|
||||
@param rotation text rotation
|
||||
@param the text to draw*/
|
||||
void drawAnnotation( QPainter* p, const QPointF& pos, int rotation, const QString& annotationText );
|
||||
/**Calculates the horizontal grid lines
|
||||
@lines list containing the map coordinates and the lines in item coordinates
|
||||
/**Returns the grid lines with associated coordinate value
|
||||
@return 0 in case of success*/
|
||||
int horizontalGridLines( QList< QPair< double, QLineF > >& lines ) const;
|
||||
/**Calculates the vertical grid lines
|
||||
@lines list containing the map coordinates and the lines in item coordinates
|
||||
int xGridLines( QList< QPair< double, QLineF > >& lines ) const;
|
||||
/**Returns the grid lines for the y-coordinates. Not vertical in case of rotation
|
||||
@return 0 in case of success*/
|
||||
int verticalGridLines( QList< QPair< double, QLineF > >& lines ) const;
|
||||
int yGridLines( QList< QPair< double, QLineF > >& lines ) const;
|
||||
/**Returns extent that considers mOffsetX / mOffsetY (during content move)*/
|
||||
QgsRectangle transformedExtent() const;
|
||||
double maxExtensionXDirection() const;
|
||||
double maxExtensionYDirection() const;
|
||||
/**Returns extent that considers rotation and shift with mOffsetX / mOffsetY*/
|
||||
QPolygonF transformedMapPolygon() const;
|
||||
double maxExtension() const;
|
||||
/**Returns the polygon of the map extent. If rotation == 0, the result is the same as mExtent
|
||||
@param poly out: the result polygon with the four corner points. The points are clockwise, starting at the top-left point
|
||||
@return true in case of success*/
|
||||
void mapPolygon( QPolygonF& poly ) const;
|
||||
/**Calculates the extent to request and the yShift of the top-left point in case of rotation.*/
|
||||
void requestedExtent( QgsRectangle& extent ) const;
|
||||
/**Returns the conversion factor map units -> mm*/
|
||||
double mapUnitsToMM() const;
|
||||
/**Scales a composer map shift (in MM) and rotates it by mRotation
|
||||
@param xShift in: shift in x direction (in item units), out: xShift in map units
|
||||
@param yShift in: shift in y direction (in item units), out: yShift in map units*/
|
||||
void transformShift( double& xShift, double& yShift ) const;
|
||||
/**Transforms map coordinates to item coordinates (considering rotation and move offset)*/
|
||||
QPointF mapToItemCoords( const QPointF& mapCoords ) const;
|
||||
/**Returns the item border of a point (in item coordinates)*/
|
||||
Border borderForLineCoord( const QPointF& p ) const;
|
||||
/**Rotates a point / vector
|
||||
@param angle rotation angle in degrees, counterclockwise
|
||||
@param x in/out: x coordinate before / after the rotation
|
||||
@param y in/out: y cooreinate before / after the rotation*/
|
||||
void rotate( double angle, double& x, double& y ) const;
|
||||
/**Returns a point on the line from startPoint to directionPoint that is a certain distance away from the starting point*/
|
||||
QPointF pointOnLineWithDistance( const QPointF& startPoint, const QPointF& directionPoint, double distance ) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,91 +1,92 @@
|
||||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QgsComposerItemWidgetBase</class>
|
||||
<widget class="QWidget" name="QgsComposerItemWidgetBase" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="QgsComposerItemWidgetBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>347</width>
|
||||
<height>207</height>
|
||||
<height>157</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="mComposerItemPropertiesGroupBox" >
|
||||
<property name="title" >
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="mComposerItemPropertiesGroupBox">
|
||||
<property name="title">
|
||||
<string>Composer item properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="mColorLabel" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mColorLabel">
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mFrameColorButton</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QPushButton" name="mFrameColorButton" >
|
||||
<property name="text" >
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QPushButton" name="mFrameColorButton">
|
||||
<property name="text">
|
||||
<string>Frame...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QPushButton" name="mBackgroundColorButton" >
|
||||
<property name="text" >
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="mBackgroundColorButton">
|
||||
<property name="text">
|
||||
<string>Background...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="mOpacityLabel" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="mOpacityLabel">
|
||||
<property name="text">
|
||||
<string>Opacity</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mOpacitySlider</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2" >
|
||||
<widget class="QSlider" name="mOpacitySlider" >
|
||||
<property name="maximum" >
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QSlider" name="mOpacitySlider">
|
||||
<property name="maximum">
|
||||
<number>255</number>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="mOutlineWidthLabel" >
|
||||
<property name="text" >
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="mOutlineWidthLabel">
|
||||
<property name="text">
|
||||
<string>Outline width</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mOutlineWidthSpinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2" >
|
||||
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox" />
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<widget class="QPushButton" name="mPositionButton" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="mPositionButton">
|
||||
<property name="text">
|
||||
<string>Position...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<widget class="QCheckBox" name="mFrameCheckBox" >
|
||||
<property name="text" >
|
||||
<item row="3" column="3">
|
||||
<widget class="QCheckBox" name="mFrameCheckBox">
|
||||
<property name="text">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -1,152 +1,167 @@
|
||||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QgsComposerMapWidgetBase</class>
|
||||
<widget class="QWidget" name="QgsComposerMapWidgetBase" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="QgsComposerMapWidgetBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>506</width>
|
||||
<height>708</height>
|
||||
<width>482</width>
|
||||
<height>641</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Map options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QGroupBox" name="mMapGroupBox" >
|
||||
<property name="title" >
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="mMapGroupBox">
|
||||
<property name="title">
|
||||
<string>Map</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="textLabel1" >
|
||||
<property name="text" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="textLabel1">
|
||||
<property name="text">
|
||||
<string>Width</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mWidthLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="mWidthLineEdit" />
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="mWidthLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Height</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="mHeightLineEdit" />
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="mHeightLineEdit"/>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Scale</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>1:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="mScaleLineEdit" >
|
||||
<property name="inputMask" >
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="mScaleLineEdit">
|
||||
<property name="inputMask">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="mRotationLabel">
|
||||
<property name="text">
|
||||
<string>Rotation:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="mRotationSpinBox">
|
||||
<property name="maximum">
|
||||
<number>359</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QGroupBox" name="mMapExtentGroupBox" >
|
||||
<property name="title" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="mMapExtentGroupBox">
|
||||
<property name="title">
|
||||
<string>Map extent</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_4" >
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="mXMinLineEdit" />
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mXMinLineEdit"/>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="mXMinLabel" >
|
||||
<property name="enabled" >
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mXMinLabel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>X min</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mXMinLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="mYMinLineEdit" />
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="mYMinLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="mYMinLabel" >
|
||||
<property name="text" >
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mYMinLabel">
|
||||
<property name="text">
|
||||
<string>Y min</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mYMinLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" >
|
||||
<widget class="QLineEdit" name="mXMaxLineEdit" />
|
||||
<item row="0" column="3">
|
||||
<widget class="QLineEdit" name="mXMaxLineEdit"/>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<widget class="QLineEdit" name="mYMaxLineEdit" />
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="mYMaxLineEdit"/>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="mXMaxLabel" >
|
||||
<property name="text" >
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="mXMaxLabel">
|
||||
<property name="text">
|
||||
<string>X max</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mXMaxLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QLabel" name="mYMaxLabel" >
|
||||
<property name="text" >
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="mYMaxLabel">
|
||||
<property name="text">
|
||||
<string>Y max</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mYMaxLineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
@ -154,13 +169,13 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>311</width>
|
||||
<height>20</height>
|
||||
@ -169,14 +184,14 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mSetToMapCanvasExtentButton" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||
<widget class="QPushButton" name="mSetToMapCanvasExtentButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Set to map canvas extent</string>
|
||||
</property>
|
||||
</widget>
|
||||
@ -186,25 +201,25 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" >
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="mPreviewModeLabel" >
|
||||
<property name="text" >
|
||||
<widget class="QLabel" name="mPreviewModeLabel">
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
<property name="wordWrap" >
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>mPreviewModeComboBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="mPreviewModeComboBox" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<widget class="QComboBox" name="mPreviewModeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -212,221 +227,197 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mUpdatePreviewButton" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="mUpdatePreviewButton">
|
||||
<property name="text">
|
||||
<string>Update preview</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QCheckBox" name="mKeepLayerListCheckBox" >
|
||||
<property name="text" >
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="mKeepLayerListCheckBox">
|
||||
<property name="text">
|
||||
<string>Keep layer list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QCheckBox" name="mShowGridDialogCheckBox" >
|
||||
<property name="text" >
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="mShowGridDialogCheckBox">
|
||||
<property name="text">
|
||||
<string>Show composer grid widget</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QDockWidget" name="mGridDockWidget" >
|
||||
<property name="floating" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="features" >
|
||||
<set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents" >
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<widget class="QCheckBox" name="mGridCheckBox" >
|
||||
<property name="text" >
|
||||
<string>Show grid</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="mGridTypeLabel" >
|
||||
<property name="text" >
|
||||
<string>Grid type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QComboBox" name="mGridTypeComboBox" />
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="mIntervalXLabel" >
|
||||
<property name="text" >
|
||||
<string>Interval X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QDoubleSpinBox" name="mIntervalXSpinBox" >
|
||||
<property name="maximum" >
|
||||
<double>99999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" >
|
||||
<widget class="QLabel" name="mIntervalYLabel" >
|
||||
<property name="text" >
|
||||
<string>Interval Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4" >
|
||||
<widget class="QDoubleSpinBox" name="mIntervalYSpinBox" >
|
||||
<property name="maximum" >
|
||||
<double>99999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="mOffsetXLabel" >
|
||||
<property name="text" >
|
||||
<string>Offset X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QDoubleSpinBox" name="mOffsetXSpinBox" >
|
||||
<property name="maximum" >
|
||||
<double>9999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3" >
|
||||
<widget class="QLabel" name="mOffsetYLabel" >
|
||||
<property name="text" >
|
||||
<string>Offset Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4" >
|
||||
<widget class="QDoubleSpinBox" name="mOffsetYSpinBox" >
|
||||
<property name="maximum" >
|
||||
<double>9999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="mLineWidthLabel" >
|
||||
<property name="text" >
|
||||
<string>Line width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox" />
|
||||
</item>
|
||||
<item row="4" column="3" >
|
||||
<widget class="QLabel" name="mLineColorLabel" >
|
||||
<property name="text" >
|
||||
<string>Line color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4" >
|
||||
<widget class="QgsColorButton" name="mLineColorButton" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="mDrawAnnotationCheckBox" >
|
||||
<property name="text" >
|
||||
<string>Draw annotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="mAnnotationPositionLabel" >
|
||||
<property name="text" >
|
||||
<string>Annotation position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" >
|
||||
<widget class="QComboBox" name="mAnnotationPositionComboBox" />
|
||||
</item>
|
||||
<item row="6" column="3" >
|
||||
<widget class="QLabel" name="mAnnotationDirectionLabel" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Annotation direction:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4" >
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBox" />
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="mDistanceToFrameLabel" >
|
||||
<property name="text" >
|
||||
<string>Distance to map frame:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" >
|
||||
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox" />
|
||||
</item>
|
||||
<item row="7" column="3" >
|
||||
<widget class="QLabel" name="mAnnotationTypeLabel" >
|
||||
<property name="text" >
|
||||
<string>Annotation type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4" >
|
||||
<widget class="QComboBox" name="mAnnotationTypeComboBox" />
|
||||
</item>
|
||||
<item row="8" column="0" >
|
||||
<widget class="QPushButton" name="mAnnotationFontButton" >
|
||||
<property name="text" >
|
||||
<string>Font...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<item row="5" column="0">
|
||||
<widget class="QWidget" name="mGridWidget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="mGridCheckBox">
|
||||
<property name="text">
|
||||
<string>Show grid</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mGridTypeLabel">
|
||||
<property name="text">
|
||||
<string>Grid type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mGridTypeComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="mCrossWidthLabel">
|
||||
<property name="text">
|
||||
<string>Cross width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QDoubleSpinBox" name="mCrossWidthSpinBox"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mIntervalXLabel">
|
||||
<property name="text">
|
||||
<string>Interval X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mIntervalXSpinBox">
|
||||
<property name="maximum">
|
||||
<double>999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="mIntervalYLabel">
|
||||
<property name="text">
|
||||
<string>Interval Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QDoubleSpinBox" name="mIntervalYSpinBox">
|
||||
<property name="maximum">
|
||||
<double>9999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="mOffsetXLabel">
|
||||
<property name="text">
|
||||
<string>Offset X:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mOffsetXSpinBox">
|
||||
<property name="maximum">
|
||||
<double>9999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QLabel" name="mOffsetYLabel">
|
||||
<property name="text">
|
||||
<string>Offset Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QDoubleSpinBox" name="mOffsetYSpinBox">
|
||||
<property name="maximum">
|
||||
<double>9999999.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="mLineWidthLabel">
|
||||
<property name="text">
|
||||
<string>Line width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QDoubleSpinBox" name="mLineWidthSpinBox"/>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="mLineColorLabel">
|
||||
<property name="text">
|
||||
<string>Line color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QgsColorButton" name="mLineColorButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="mDrawAnnotationCheckBox">
|
||||
<property name="text">
|
||||
<string>Draw annotation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QLabel" name="mAnnotationPositionLabel">
|
||||
<property name="text">
|
||||
<string>Annotation position:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QComboBox" name="mAnnotationPositionComboBox"/>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QLabel" name="mAnnotationDirectionLabel">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Annotation direction:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QComboBox" name="mAnnotationDirectionComboBox"/>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="mDistanceToFrameLabel">
|
||||
<property name="text">
|
||||
<string>Distance to map frame:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QDoubleSpinBox" name="mDistanceToMapFrameSpinBox"/>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QPushButton" name="mAnnotationFontButton">
|
||||
<property name="text">
|
||||
<string>Font...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>458</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11" />
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QgsColorButton</class>
|
||||
|
Loading…
x
Reference in New Issue
Block a user