クラス TextMapLayer

地図上にテキストを表示するレイヤ [詳細]

#include <map_layer.h>

TextMapLayerに対する継承グラフ

Inheritance graph
[凡例]
TextMapLayerのコラボレーション図

Collaboration graph
[凡例]

すべてのメンバ一覧

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, TextInfotexts_
 描画用テキスト及び属性の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]

自身を描画する。

参照:
QGraphicsItem::paint() 自身の持つテキストを描画する

MapLayerを実装しています。

void TextMapLayer::updateExtent (  )  [protected]

自身の地図上での存在範囲を更新する。text/style更新時に呼ばれる。


変数

QMap<int, TextInfo> TextMapLayer::texts_ [private]

描画用テキスト及び属性のMap


このクラスの説明は次のファイルから生成されました:

マップビューワコンポーネントに対してThu Jun 17 20:24:08 2010に生成されました。  doxygen 1.5.5