hoa_editor::EditorScrollView Class Reference

#include <editor.h>

Inheritance diagram for hoa_editor::EditorScrollView:

Inheritance graph
[legend]
Collaboration diagram for hoa_editor::EditorScrollView:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EditorScrollView (QWidget *parent, const QString &name, int width, int height)
 Macro needed to use Qt's slots and signals.
std::vector< int32 > & GetCurrentLayer ()
 Gets currently edited layer.
void Resize (int width, int height)
 ~EditorScrollView ()

Protected Member Functions

Mouse Processing Functions
Functions to process mouse events on the map.

Note:
Reimplemented from QScrollView.
Parameters:
evt A pointer to the QMouseEvent generated by the mouse.


void contentsMouseMoveEvent (QMouseEvent *evt)
void contentsMousePressEvent (QMouseEvent *evt)
void contentsMouseReleaseEvent (QMouseEvent *evt)

Private Attributes

LAYER_TYPE _layer_edit
 Current layer being edited.
Grid_map
 Current working map.
int _move_source_index
 Stores source index of moved tiles.
int _tile_index
 Mouse is at this tile index on the map.
TILE_MODE_TYPE _tile_mode
 Current tile edit mode being used.

Friends

class Editor
 Needed for changing the editing mode and painting.

Detailed Description

Definition at line 248 of file editor.h.


Constructor & Destructor Documentation

EditorScrollView::EditorScrollView ( QWidget *  parent,
const QString &  name,
int  width,
int  height 
)

Macro needed to use Qt's slots and signals.

Definition at line 692 of file editor.cpp.

References _layer_edit, _map, _tile_mode, hoa_editor::LOWER_LAYER, and hoa_editor::PAINT_TILE.

EditorScrollView::~EditorScrollView (  ) 

Definition at line 711 of file editor.cpp.

References _map.


Member Function Documentation

void EditorScrollView::contentsMouseMoveEvent ( QMouseEvent *  evt  )  [protected]

Definition at line 798 of file editor.cpp.

References _map, _tile_index, _tile_mode, hoa_editor::DELETE_TILE, GetCurrentLayer(), hoa_editor::Grid::GetHeight(), hoa_editor::Grid::GetWidth(), hoa_editor::MOVE_TILE, hoa_editor::PAINT_TILE, hoa_editor::TILE_HEIGHT, hoa_editor::TILE_WIDTH, hoa_editor::Grid::tileset_names, and hoa_editor::Grid::tilesets.

Here is the call graph for this function:

void EditorScrollView::contentsMousePressEvent ( QMouseEvent *  evt  )  [protected]

Definition at line 731 of file editor.cpp.

References _map, _move_source_index, _tile_index, _tile_mode, hoa_editor::DELETE_TILE, GetCurrentLayer(), hoa_editor::Grid::GetHeight(), hoa_editor::Grid::GetWidth(), hoa_editor::MOVE_TILE, hoa_editor::PAINT_TILE, hoa_editor::Grid::SetChanged(), hoa_editor::TILE_HEIGHT, hoa_editor::TILE_WIDTH, hoa_editor::Grid::tileset_names, and hoa_editor::Grid::tilesets.

Here is the call graph for this function:

void EditorScrollView::contentsMouseReleaseEvent ( QMouseEvent *  evt  )  [protected]

Definition at line 865 of file editor.cpp.

References _map, _move_source_index, _tile_index, _tile_mode, GetCurrentLayer(), hoa_editor::Grid::GetWidth(), hoa_editor::INVALID_TILE, hoa_editor::MOVE_TILE, hoa_editor::TILE_HEIGHT, and hoa_editor::TILE_WIDTH.

Here is the call graph for this function:

std::vector< int32 > & EditorScrollView::GetCurrentLayer (  ) 

Gets currently edited layer.

Definition at line 724 of file editor.cpp.

References _layer_edit, _map, and hoa_editor::Grid::GetLayer().

Referenced by hoa_editor::Editor::_TileLayerClear(), hoa_editor::Editor::_TileLayerFill(), contentsMouseMoveEvent(), contentsMousePressEvent(), and contentsMouseReleaseEvent().

Here is the call graph for this function:

void EditorScrollView::Resize ( int  width,
int  height 
)

Resizes the map.

Parameters:
width Width of the map.
height Height of the map.

Definition at line 717 of file editor.cpp.

References _map, hoa_editor::Grid::SetHeight(), hoa_editor::Grid::SetWidth(), hoa_editor::TILE_HEIGHT, and hoa_editor::TILE_WIDTH.

Here is the call graph for this function:


Friends And Related Function Documentation

friend class Editor [friend]

Needed for changing the editing mode and painting.

Definition at line 266 of file editor.h.


Member Data Documentation

LAYER_TYPE hoa_editor::EditorScrollView::_layer_edit [private]

Current layer being edited.

Definition at line 295 of file editor.h.

Referenced by hoa_editor::Editor::_SetEditLayer(), EditorScrollView(), and GetCurrentLayer().

Grid* hoa_editor::EditorScrollView::_map [private]

Current working map.

Definition at line 291 of file editor.h.

Referenced by hoa_editor::Editor::_EraseOK(), hoa_editor::Editor::_FileMenuSetup(), hoa_editor::Editor::_FileNew(), hoa_editor::Editor::_FileOpen(), hoa_editor::Editor::_FileResize(), hoa_editor::Editor::_FileSave(), hoa_editor::Editor::_FileSaveAs(), hoa_editor::Editor::_MapSelectMusic(), hoa_editor::Editor::_TileLayerClear(), hoa_editor::Editor::_TileLayerFill(), hoa_editor::Editor::_ViewToggleGrid(), hoa_editor::Editor::_ViewToggleLL(), hoa_editor::Editor::_ViewToggleML(), hoa_editor::Editor::_ViewToggleUL(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), EditorScrollView(), GetCurrentLayer(), Resize(), and ~EditorScrollView().

int hoa_editor::EditorScrollView::_move_source_index [private]

Stores source index of moved tiles.

Definition at line 302 of file editor.h.

Referenced by contentsMousePressEvent(), and contentsMouseReleaseEvent().

int hoa_editor::EditorScrollView::_tile_index [private]

Mouse is at this tile index on the map.

Definition at line 297 of file editor.h.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and contentsMouseReleaseEvent().

TILE_MODE_TYPE hoa_editor::EditorScrollView::_tile_mode [private]

Current tile edit mode being used.

Definition at line 293 of file editor.h.

Referenced by hoa_editor::Editor::_SetEditMode(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), and EditorScrollView().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:13:51 2007 for Hero of Allacrost by  doxygen 1.5.1