Tome
A generic data editor for games supporting arbitrary input and output formats.
Public Slots | Public Member Functions | Protected Member Functions | List of all members
MapItemWindow Class Reference

Window for editing the a single key-value pair of the map. More...

#include <mapitemwindow.h>

Inheritance diagram for MapItemWindow:

Public Slots

void accept () Q_DECL_OVERRIDE
 Validates all data and closes this window if successful.
 

Public Member Functions

 MapItemWindow (Tome::FacetsController &facetsController, Tome::ProjectController &projectController, Tome::RecordsController &recordsController, Tome::TypesController &typesController, QWidget *parent=0)
 Constructs a new window for editing the a single key-value pair of the map. More...
 
QVariant getKey () const
 Gets the current key of the key-value pair. More...
 
QVariant getValue () const
 Gets the current value of the key-value pair. More...
 
void setKey (const QVariant &key)
 Sets the current key of the key-value pair. More...
 
void setKeyType (const QString &keyType) const
 Sets the type of the keys of the map. More...
 
void setValue (const QVariant &value)
 Sets the current value of the key-value pair. More...
 
void setValueType (const QString &valueType) const
 Sets the type of the values of the map. More...
 

Protected Member Functions

virtual void showEvent (QShowEvent *event) Q_DECL_OVERRIDE
 Sets up this window, e.g. by setting the focus on the first widget. More...
 

Detailed Description

Window for editing the a single key-value pair of the map.

Constructor & Destructor Documentation

◆ MapItemWindow()

MapItemWindow::MapItemWindow ( Tome::FacetsController facetsController,
Tome::ProjectController projectController,
Tome::RecordsController recordsController,
Tome::TypesController typesController,
QWidget *  parent = 0 
)
explicit

Constructs a new window for editing the a single key-value pair of the map.

Parameters
facetsControllerController for validating type facets.
projectControllerController for creating, loading and saving projects.
recordsControllerController for adding, updating and removing records.
typesControllerController for adding, updating and removing custom types.
parentOptional owner widget.

Member Function Documentation

◆ getKey()

QVariant MapItemWindow::getKey ( ) const

Gets the current key of the key-value pair.

Returns
Current key of the key-value pair.

◆ getValue()

QVariant MapItemWindow::getValue ( ) const

Gets the current value of the key-value pair.

Returns
Current value of the key-value pair.

◆ setKey()

void MapItemWindow::setKey ( const QVariant &  key)

Sets the current key of the key-value pair.

Parameters
keyCurrent key of the key-value pair.

◆ setKeyType()

void MapItemWindow::setKeyType ( const QString &  keyType) const

Sets the type of the keys of the map.

Parameters
keyTypeType of the keys of the map.

◆ setValue()

void MapItemWindow::setValue ( const QVariant &  value)

Sets the current value of the key-value pair.

Parameters
valueCurrent value of the key-value pair.

◆ setValueType()

void MapItemWindow::setValueType ( const QString &  valueType) const

Sets the type of the values of the map.

Parameters
valueTypeType of the values of the map.

◆ showEvent()

void MapItemWindow::showEvent ( QShowEvent *  event)
protectedvirtual

Sets up this window, e.g. by setting the focus on the first widget.

Parameters
eventEvent for showing this window.

The documentation for this class was generated from the following files: