#include <layer_view.h>

Public スロット | |
| void | updateLayers () |
| レイヤ情報更新signalを強制emitするためのslot | |
シグナル | |
| void | layersChanged (const QVector< MapLayer * > &layers) |
| レイヤ情報更新時に発火するシグナル。レイヤー情報をベクタで通知 | |
| void | removeLayerRequested (MapLayer *layer) |
| GUIからlayer削除Actionがトリガされたときに発火。この時点では layerはdeleteされていない。 | |
| void | newLayerRequested () |
| 「新規レイヤ」実行時に発火するシグナル。 | |
Public メソッド | |
| LayerView (QWidget *parent=0) | |
| コンストラクタ | |
| int | addMapLayer (MapLayer *layer) |
| 地図レイヤの追加 | |
| MapLayer * | layerOfName (const QString &name) |
| 名称を指定してlayerを返す。 | |
| int | visualIndexOfLayer (const MapLayer *l) |
| レイヤのvisualIndexを返す | |
| int | logicalIndexOfLayer (const MapLayer *l) |
| レイヤのlogicalIndexを返す | |
| void | removeLayer (MapLayer *layer) |
| レイヤをモデルから削除する。見つからなければなにもしない | |
| QVector< MapLayer * > | getLayers () const |
| レイヤのリストを取得 visualIndex順にソートされている。 | |
| void | moveSectionOfName (const QString &name, int toVisualIndex) |
Protected メソッド | |
| void | emit_layersChanged () |
| レイヤ情報更新シグナルを発火する。(コード共通化のために存在) | |
| void | contextMenuEvent (QContextMenuEvent *event) |
| 右クリックイベントのハンドラ | |
Private スロット | |
| void | on_dataChanged (const QModelIndex &i0, const QModelIndex &i1) |
| model_からの通知用slot: indexがi0 からi1の範囲のデータ変更 | |
| void | on_sectionMoved (int logicalIndex, int oldVisualIndex, int newVisualIndex) |
| view_からの通知用slot: 描画順の変更 | |
| void | on_viewPressed (const QModelIndex &index) |
| view_ のpressイベントのハンドラ。デバグに使用 | |
| void | saveSelected () |
| 選択されたレイヤーを保存 | |
| void | deleteSelected () |
| 選択されたレイヤーを削除 | |
Private 変数 | |
| MapLayerListModel * | model_ |
| レイヤ情報を管理するmodel。詳細はQtのModel/View/Delegateフレー ムワーク参照 | |
| MapLayerTableView * | view_ |
| レイヤー情報のview。 | |
| MapLayerDelegate * | delegate_ |
| レイヤー情報表示のためのdelegate | |
| QAction * | upAction_ |
| GUIのAction: 選択レイヤーを上に遷移 | |
| QAction * | downAction_ |
| GUIのAction: 選択レイヤーを下に遷移 | |
| QAction * | saveAction_ |
| GUIのAction: 選択レイヤーをセーブ | |
| QAction * | deleteAction_ |
| GUIのAction: 選択レイヤーを削除 | |
| QAction * | openAction_ |
| GUIのAction: 新規レイヤ | |
| LayerView::LayerView | ( | QWidget * | parent = 0 |
) |
コンストラクタ
| [in] | parent | 親widget |
| int LayerView::addMapLayer | ( | MapLayer * | layer | ) |
地図レイヤの追加
| [in] | layer | 追加するlayer |
| MapLayer * LayerView::layerOfName | ( | const QString & | name | ) |
名称を指定してlayerを返す。
| [in] | name | レイヤの名称(name フィールドに対応) |
| non-null | レイヤへのポインタ | |
| NULL | 見つからなかった場合 |
| int LayerView::visualIndexOfLayer | ( | const MapLayer * | l | ) |
レイヤのvisualIndexを返す
| [in] | l | レイヤ |
| int LayerView::logicalIndexOfLayer | ( | const MapLayer * | l | ) |
レイヤのlogicalIndexを返す
| [in] | l | レイヤ |
| void LayerView::removeLayer | ( | MapLayer * | layer | ) |
レイヤをモデルから削除する。見つからなければなにもしない
| [in] | layer | 削除するレイヤへのポインタ |
| QVector< MapLayer * > LayerView::getLayers | ( | ) | const |
レイヤのリストを取得 visualIndex順にソートされている。
| void LayerView::moveSectionOfName | ( | const QString & | name, | |
| int | toVisualIndex | |||
| ) |
| void LayerView::updateLayers | ( | ) | [slot] |
レイヤ情報更新signalを強制emitするためのslot
| void LayerView::layersChanged | ( | const QVector< MapLayer * > & | layers | ) | [signal] |
レイヤ情報更新時に発火するシグナル。レイヤー情報をベクタで通知
| [in] | layers | 通知されるレイヤー情報 |
| void LayerView::removeLayerRequested | ( | MapLayer * | layer | ) | [signal] |
GUIからlayer削除Actionがトリガされたときに発火。この時点では layerはdeleteされていない。
| [in] | layer |
| void LayerView::newLayerRequested | ( | ) | [signal] |
「新規レイヤ」実行時に発火するシグナル。
| void LayerView::emit_layersChanged | ( | ) | [protected] |
レイヤ情報更新シグナルを発火する。(コード共通化のために存在)
| void LayerView::contextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected] |
右クリックイベントのハンドラ
| [in] | event | ハンドルすべきイベント |
| void LayerView::on_dataChanged | ( | const QModelIndex & | i0, | |
| const QModelIndex & | i1 | |||
| ) | [private, slot] |
model_からの通知用slot: indexがi0 からi1の範囲のデータ変更
| [in] | i0 | 範囲のはじまり |
| [in] | i1 | 範囲の終わり |
| void LayerView::on_sectionMoved | ( | int | logicalIndex, | |
| int | oldVisualIndex, | |||
| int | newVisualIndex | |||
| ) | [private, slot] |
view_からの通知用slot: 描画順の変更
| [in] | logicalIndex | 移動対象となるItemのインデクス |
| [in] | oldVisualIndex | 移動前の場所 |
| [in] | newVisualIndex | 移動後の場所 |
| void LayerView::on_viewPressed | ( | const QModelIndex & | index | ) | [private, slot] |
view_ のpressイベントのハンドラ。デバグに使用
| void LayerView::saveSelected | ( | ) | [private, slot] |
選択されたレイヤーを保存
| void LayerView::deleteSelected | ( | ) | [private, slot] |
選択されたレイヤーを削除
MapLayerListModel* LayerView::model_ [private] |
レイヤ情報を管理するmodel。詳細はQtのModel/View/Delegateフレー ムワーク参照
MapLayerTableView* LayerView::view_ [private] |
レイヤー情報のview。
MapLayerDelegate* LayerView::delegate_ [private] |
レイヤー情報表示のためのdelegate
QAction* LayerView::upAction_ [private] |
GUIのAction: 選択レイヤーを上に遷移
QAction* LayerView::downAction_ [private] |
GUIのAction: 選択レイヤーを下に遷移
QAction* LayerView::saveAction_ [private] |
GUIのAction: 選択レイヤーをセーブ
QAction* LayerView::deleteAction_ [private] |
GUIのAction: 選択レイヤーを削除
QAction* LayerView::openAction_ [private] |
GUIのAction: 新規レイヤ
1.5.5