OpenMW
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
CSVWorld::Table Class Reference

Table widget. More...

#include <table.hpp>

List of all members.

Public Slots

void tableSizeUpdate ()
void selectionSizeUpdate ()
void requestFocus (const std::string &id)
void recordFilterChanged (boost::shared_ptr< CSMFilter::Node > filter)

Signals

void editRequest (int row)
void selectionSizeChanged (int size)
void tableSizeChanged (int size, int deleted, int modified)
void createRequest ()

Public Member Functions

 Table (const CSMWorld::UniversalId &id, CSMWorld::Data &data, QUndoStack &undoStack, bool createAndDelete, bool sorting)
void setEditLock (bool locked)
CSMWorld::UniversalId getUniversalId (int row) const
void updateEditorSetting (const QString &settingName, const QString &settingValue)

Private Slots

void revertRecord ()
void deleteRecord ()
void editRecord ()
void moveUpRecord ()
void moveDownRecord ()

Private Member Functions

void contextMenuEvent (QContextMenuEvent *event)
std::vector< std::string > listRevertableSelectedIds () const
std::vector< std::string > listDeletableSelectedIds () const

Private Attributes

std::vector< CommandDelegate * > mDelegates
QUndoStack & mUndoStack
QAction * mEditAction
QAction * mCreateAction
QAction * mRevertAction
QAction * mDeleteAction
QAction * mMoveUpAction
QAction * mMoveDownAction
CSMWorld::IdTableProxyModelmProxyModel
CSMWorld::IdTablemModel
bool mEditLock
int mRecordStatusDisplay

Detailed Description

Table widget.


Constructor & Destructor Documentation

CSVWorld::Table::Table ( const CSMWorld::UniversalId id,
CSMWorld::Data data,
QUndoStack &  undoStack,
bool  createAndDelete,
bool  sorting 
)
Parameters:
createAndDeleteAllow creation and deletion of records.
sortingAllow changing order of rows in the view via column headers.
Note:
This signal could instead be connected to a slot that filters out changes not affecting the records status column (for permanence reasons)

Member Function Documentation

void CSVWorld::Table::contextMenuEvent ( QContextMenuEvent *  event) [private]
Todo:
add menu items for select all and clear selection
Todo:
Reverting temporarily disabled on tables that support reordering, because revert logic currently can not handle reordering.
Todo:
allow reordering of multiple rows
void CSVWorld::Table::createRequest ( ) [signal]
void CSVWorld::Table::deleteRecord ( ) [private, slot]
void CSVWorld::Table::editRecord ( ) [private, slot]
void CSVWorld::Table::editRequest ( int  row) [signal]
std::vector< std::string > CSVWorld::Table::listDeletableSelectedIds ( ) const [private]
std::vector< std::string > CSVWorld::Table::listRevertableSelectedIds ( ) const [private]
void CSVWorld::Table::moveDownRecord ( ) [private, slot]
void CSVWorld::Table::moveUpRecord ( ) [private, slot]
void CSVWorld::Table::recordFilterChanged ( boost::shared_ptr< CSMFilter::Node filter) [slot]
void CSVWorld::Table::requestFocus ( const std::string &  id) [slot]
void CSVWorld::Table::revertRecord ( ) [private, slot]
void CSVWorld::Table::selectionSizeChanged ( int  size) [signal]
void CSVWorld::Table::setEditLock ( bool  locked)
void CSVWorld::Table::tableSizeChanged ( int  size,
int  deleted,
int  modified 
) [signal]
Parameters:
sizeNumber of not deleted records
deletedNumber of deleted records
modifiedNumber of added and modified records
void CSVWorld::Table::updateEditorSetting ( const QString &  settingName,
const QString &  settingValue 
)

Member Data Documentation

QAction* CSVWorld::Table::mCreateAction [private]
std::vector<CommandDelegate *> CSVWorld::Table::mDelegates [private]
QAction* CSVWorld::Table::mDeleteAction [private]
QAction* CSVWorld::Table::mEditAction [private]
QAction* CSVWorld::Table::mMoveUpAction [private]
QAction* CSVWorld::Table::mRevertAction [private]
QUndoStack& CSVWorld::Table::mUndoStack [private]

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