#include <level_editor.h>
Inheritance diagram for LevelEditor::
Public Slots | |
void | saveAndExit () |
bool | save () |
void | exitWithoutSave () |
void | undo () |
void | redo () |
void | fieldClicked (QPoint position) |
void | gemMoved (QPoint from, QPoint to) |
void | keeperMoved (QPoint from, QPoint to) |
void | rotateLeft () |
void | rotateRight () |
void | mirrorHorizontally () |
void | mirrorVertically () |
void | simplify () |
void | fillEdges () |
void | fillOutside () |
void | changeProperties () |
void | changeSize () |
void | adjustSize () |
void | createEmptyMap () |
void | createGoals () |
void | createGems () |
void | createSolvableMap () |
void | checkValidity () |
void | isSolvable () |
void | activeElementChanged () |
void | showKeyDialog () |
void | showToolbarDialog () |
void | updateToolbar () |
Signals | |
void | saveLevel (LevelEditor *level_editor) |
void | exited (LevelEditor *level_editor) |
Public Methods | |
LevelEditor (Level const &level, int collection_nr, int level_nr, Theme *theme, QWidget *parent=0, const char *name=0) | |
virtual | ~LevelEditor () |
void | setOriginalLevel (Level const &level, int collection_nr, int level_nr) |
Level const & | level () const |
Level const & | originalLevel () const |
int | collectionNr () const |
int | levelNr () const |
Private Types | |
enum | ActiveElement { EMPTY, WALL, GOAL, KEEPER, GEM } |
Private Methods | |
void | saveUnsavedChanges (bool cancel_possible) |
void | createAccels () |
void | createActions () |
void | showValidityMessage (Map::MapValidity validity) |
void | updateUndoRedoState () |
void | insertMap () |
void | updateOutside () |
Private Attributes | |
Level | m_level |
Level | m_original_level |
int | m_collection_nr |
int | m_level_nr |
Map | m_map |
MapWidget * | m_map_widget |
Theme | m_theme |
ActiveElement | m_active_element |
int | m_undo_pointer |
std::vector< CompressedMap > | m_maps |
KAction * | m_undo_action |
KAction * | m_redo_action |
KRadioAction * | m_empty_field_action |
KRadioAction * | m_wall_field_action |
KRadioAction * | m_keeper_field_action |
KRadioAction * | m_goal_field_action |
KRadioAction * | m_gem_field_action |
bool | m_was_saved |
bool | m_exited_signaled |
Static Private Attributes | |
int | s_pieces [65] |
|
Defines the active elements.
|
|
Creates the window.
|
|
Deletes the window an gives an opportunity to save a level if not already done.
|
|
Called, whne the active element changed.
|
|
Adjusts the size of the map.
|
|
Called, when the user wants to change the level name, author, etc.
|
|
Called when the user wants to change the size of the level.
|
|
Called when the user checks the validity of the map.
|
|
Returns the collection nr.
|
|
Creates the accelerators.
|
|
Creates the actions.
|
|
Creates a random empty map.
|
|
Creates random gems.
|
|
Creates random goals.
|
|
Creates a solvable map (or at least tries so).
|
|
Exits without save.
|
|
Called when the editor is exited.
|
|
Called when the user has clicked a field.
|
|
Rounds the edges.
|
|
Fills all outside fields with walls.
|
|
Called when the user has move a gem.
|
|
Inserts the new map in the map vector and updates the undo/redo stat.
|
|
Tries to solve the map.
|
|
Called when the user has move a keeper.
|
|
Returns the edited level.
|
|
Returns the level nr.
|
|
Called when the user mirrors the map horizontally.
|
|
Called when the user mirrors the map vertically.
|
|
Returns the original level.
|
|
Redoes the last change.
|
|
Called when the user rotates the map left.
|
|
Called when the user rotateLeft the map right.
|
|
Saves the level. Returns true, if the level was saved. |
|
Saves the level and exits.
|
|
Called when the level of the editor should be saved.
|
|
Ask the user to save a not saved level when exiting.
|
|
Sets a new original level and the collection and level number.
|
|
Called when the keys should be configured.
|
|
Called when the toolbar should be configured.
|
|
Displays a message depending on the validity.
|
|
Simpplifies the level.
|
|
Undoes the last change.
|
|
Updates the outside fields.
|
|
Called when the toolbar should be updated.
|
|
Updates the state of the undo and redo actions.
|
|
The active element.
|
|
The collection number.
|
|
The empty field element.
|
|
If true, the exited signal was send.
|
|
The gem fields element.
|
|
The goal element.
|
|
The keeper element.
|
|
The level.
|
|
The level number.
|
|
The map.
|
|
The map widget.
|
|
The maps vector.
|
|
The original level.
|
|
The redo action.
|
|
The theme to use.
|
|
The undo action.
|
|
The undo/redo pointer.
|
|
The wall element.
|
|
If true, the actual map was saved.
|
|
The pieces of the map from which to create the images.
|