16 #ifndef QGSLEGENDSETTINGS_H 17 #define QGSLEGENDSETTINGS_H 41 void setTitle(
const QString& t ) { mTitle = t; }
42 QString
title()
const {
return mTitle; }
100 int dpi()
const {
return mDpi; }
107 QStringList splitStringForWrapping( QString stringToSplt )
const;
111 void drawText( QPainter* p,
double x,
double y,
const QString& text,
const QFont& font )
const;
122 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;
125 QFont scaledFontPixelSize(
const QFont& font )
const;
128 double pixelFontSize(
double pointSize )
const;
131 double textWidthMillimeters(
const QFont& font,
const QString& text )
const;
134 double fontHeightCharacterMM(
const QFont& font,
const QChar& c )
const;
137 double fontAscentMillimeters(
const QFont& font )
const;
140 double fontDescentMillimeters(
const QFont& font )
const;
147 Qt::AlignmentFlag mTitleAlignment;
160 QSizeF mWmsLegendSize;
175 bool mEqualColumnWidth;
177 QMap<QgsComposerLegendStyle::Style, QgsComposerLegendStyle> mStyleMap;
180 double mMmPerMapUnit;
183 bool mUseAdvancedEffects;
194 #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.
void setMapScale(double scale)
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
void setTitle(const QString &t)
void setFontColor(const QColor &c)
void setColumnSpace(double s)
Abstract base class for the legend item types.
void setStyle(QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style)
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
void setColumnCount(int c)
QSizeF symbolSize() const
QSizeF wmsLegendSize() const
int equalColumnWidth() const
void setSplitLayer(bool s)