16 #ifndef QGSLEGENDSETTINGS_H
17 #define QGSLEGENDSETTINGS_H
155 int dpi()
const {
return mDpi; }
177 void drawText(
QPainter* p,
const QRectF& rect,
const QString& text,
const QFont& font, Qt::AlignmentFlag halignment = Qt::AlignLeft, Qt::AlignmentFlag valignment = Qt::AlignTop,
int flags = Qt::TextWordWrap )
const;
180 QFont scaledFontPixelSize(
const QFont& font )
const;
183 double pixelFontSize(
double pointSize )
const;
186 double textWidthMillimeters(
const QFont& font,
const QString& text )
const;
189 double fontHeightCharacterMM(
const QFont& font,
const QChar& c )
const;
192 double fontAscentMillimeters(
const QFont& font )
const;
195 double fontDescentMillimeters(
const QFont& font )
const;
202 Qt::AlignmentFlag mTitleAlignment;
230 bool mEqualColumnWidth;
232 bool mRasterSymbolBorder;
233 QColor mRasterBorderColor;
234 double mRasterBorderWidth;
239 double mMmPerMapUnit;
242 bool mUseAdvancedEffects;
253 #endif // QGSLEGENDSETTINGS_H
void setTitleAlignment(Qt::AlignmentFlag alignment)
Sets the alignment of the legend title.
void setWrapChar(const QString &t)
void setEqualColumnWidth(bool s)
void setBoxSpace(double s)
void setMmPerMapUnit(double mmPerMapUnit)
double lineSpacing() const
QgsComposerLegendStyle & rstyle(QgsComposerLegendStyle::Style s)
Returns reference to modifiable style.
void setSymbolSize(QSizeF s)
double columnSpace() const
double mmPerMapUnit() const
QgsComposerLegendStyle style(QgsComposerLegendStyle::Style s) const
Returns style.
bool equalColumnWidth() const
void setStyle(QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle &style)
void setRasterBorderWidth(double width)
Sets the border width for the border drawn around raster symbol items.
QColor rasterBorderColor() const
Returns the border color for the border drawn around raster symbol items.
void setMapScale(double scale)
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
void setTitle(const QString &t)
void setDrawRasterBorder(bool enabled)
Sets whether a border will be drawn around raster symbol items.
void setFontColor(const QColor &c)
void setColumnSpace(double s)
Abstract base class for the legend item types.
void setLineSpacing(double s)
Qt::AlignmentFlag titleAlignment() const
Returns the alignment of the legend title.
Composer legend components style.
void setWmsLegendSize(QSizeF s)
void setUseAdvancedEffects(bool use)
bool useAdvancedEffects() const
bool drawRasterBorder() const
Returns whether a border will be drawn around raster symbol items.
double rasterBorderWidth() const
Returns the border width (in millimeters) for the border drawn around raster symbol items...
void setColumnCount(int c)
QSizeF symbolSize() const
QSizeF wmsLegendSize() const
void setSplitLayer(bool s)
void setRasterBorderColor(const QColor &color)
Sets the border color for the border drawn around raster symbol items.