#include <map_layer.h>
Public メソッド | |
TextMapLayer (const QString &name, bool visible=true, qreal opacity=1.0, const QRectF &extent=QRectF(0.0, 0.0, 0.0, 0.0)) | |
コンストラクタ | |
virtual | ~TextMapLayer () |
デストラクタ。 | |
void | setText (int id, const QString &text, const QPointF &pos, const QFont &font=QFont(), const QPen &pen=QPen()) |
id 番のテキストをtextに,位置をposに,fontをfontに,ペンをpenに設定 | |
void | clearText (int id) |
id 番のテキストを削除 | |
QString | text (int id) const |
id 番のテキストを返す | |
QPointF | position (int id) const |
id 番のテキストの場所を返す | |
QFont | font (int id) const |
id 番のテキストのfontを返す | |
QPen | pen (int id) const |
id 番のテキストのfontを返す | |
QRectF | textBoundingRect (int id) const |
id 番のテキストの外接長方形を返す | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
自身を描画する。 | |
Protected メソッド | |
void | updateExtent () |
自身の地図上での存在範囲を更新する。text/style更新時に呼ばれる。 | |
Private 変数 | |
QMap< int, TextInfo > | texts_ |
描画用テキスト及び属性のMap | |
構成 | |
struct | TextInfo |
描画テキスト属性をまとめた構造体 [詳細] |
TextMapLayer::TextMapLayer | ( | const QString & | name, | |
bool | visible = true , |
|||
qreal | opacity = 1.0 , |
|||
const QRectF & | extent = QRectF(0.0, 0.0, 0.0, 0.0) | |||
) |
コンストラクタ
[in] | name | レイヤ名 |
[in] | visible | 可視/不可視のフラグ |
[in] | opacity | 不透明度 |
[in] | extent | 地図存在範囲 |
virtual TextMapLayer::~TextMapLayer | ( | ) | [inline, virtual] |
デストラクタ。
void TextMapLayer::setText | ( | int | id, | |
const QString & | text, | |||
const QPointF & | pos, | |||
const QFont & | font = QFont() , |
|||
const QPen & | pen = QPen() | |||
) |
id 番のテキストをtextに,位置をposに,fontをfontに,ペンをpenに設定
void TextMapLayer::clearText | ( | int | id | ) |
id 番のテキストを削除
QString TextMapLayer::text | ( | int | id | ) | const |
id 番のテキストを返す
QPointF TextMapLayer::position | ( | int | id | ) | const |
id 番のテキストの場所を返す
QFont TextMapLayer::font | ( | int | id | ) | const |
id 番のテキストのfontを返す
QPen TextMapLayer::pen | ( | int | id | ) | const |
id 番のテキストのfontを返す
QRectF TextMapLayer::textBoundingRect | ( | int | id | ) | const |
id 番のテキストの外接長方形を返す
void TextMapLayer::paint | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget | |||
) | [virtual] |
void TextMapLayer::updateExtent | ( | ) | [protected] |
自身の地図上での存在範囲を更新する。text/style更新時に呼ばれる。
QMap<int, TextInfo> TextMapLayer::texts_ [private] |
描画用テキスト及び属性のMap