OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CSVWorld::CommandDelegate Class Reference

#include <util.hpp>

Inheritance diagram for CSVWorld::CommandDelegate:
Collaboration diagram for CSVWorld::CommandDelegate:

Public Member Functions

 CommandDelegate (CSMWorld::CommandDispatcher *commandDispatcher, CSMDoc::Document &document, QObject *parent)
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
virtual QWidgetcreateEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual QWidgetcreateEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index, CSMWorld::ColumnBase::Display display) const
 
void setEditLock (bool locked)
 
bool isEditLocked () const
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index, bool tryDisplay) const
 
virtual void settingChanged (const CSMPrefs::Setting *setting)
 

Protected Member Functions

QUndoStack & getUndoStack () const
 
CSMDoc::DocumentgetDocument () const
 
CSMWorld::ColumnBase::Display getDisplayTypeFromIndex (const QModelIndex &index) const
 
virtual void setModelDataImp (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 

Private Attributes

bool mEditLock
 
CSMWorld::CommandDispatchermCommandDispatcher
 
CSMDoc::DocumentmDocument
 

Constructor & Destructor Documentation

CSVWorld::CommandDelegate::CommandDelegate ( CSMWorld::CommandDispatcher commandDispatcher,
CSMDoc::Document document,
QObject parent 
)
Parameters
commandDispatcherIf CommandDelegate will be only be used on read-only cells, a 0-pointer can be passed here.

Member Function Documentation

QWidget * CSVWorld::CommandDelegate::createEditor ( QWidget parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual
QWidget * CSVWorld::CommandDelegate::createEditor ( QWidget parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index,
CSMWorld::ColumnBase::Display  display 
) const
virtual
Todo:
implement size limit. QPlainTextEdit does not support a size limit.

Reimplemented in CSVWorld::EnumDelegate, and CSVWorld::IdCompletionDelegate.

CSMWorld::ColumnBase::Display CSVWorld::CommandDelegate::getDisplayTypeFromIndex ( const QModelIndex &  index) const
protected
CSMDoc::Document & CSVWorld::CommandDelegate::getDocument ( ) const
protected
QUndoStack & CSVWorld::CommandDelegate::getUndoStack ( ) const
protected

Here is the caller graph for this function:

bool CSVWorld::CommandDelegate::isEditLocked ( ) const
Returns
Does column require update?
void CSVWorld::CommandDelegate::setEditLock ( bool  locked)
void CSVWorld::CommandDelegate::setEditorData ( QWidget editor,
const QModelIndex &  index 
) const
virtual
void CSVWorld::CommandDelegate::setEditorData ( QWidget editor,
const QModelIndex &  index,
bool  tryDisplay 
) const
virtual

Reimplemented in CSVWorld::EnumDelegate.

Here is the call graph for this function:

void CSVWorld::CommandDelegate::setModelData ( QWidget editor,
QAbstractItemModel model,
const QModelIndex &  index 
) const
virtual
void CSVWorld::CommandDelegate::setModelDataImp ( QWidget editor,
QAbstractItemModel model,
const QModelIndex &  index 
) const
protectedvirtual

Reimplemented in CSVWorld::EnumDelegate.

Here is the call graph for this function:

void CSVWorld::CommandDelegate::settingChanged ( const CSMPrefs::Setting setting)
virtual
Attention
This is not a slot. For ordering reasons this function needs to be called manually from the parent object's settingChanged function.

Reimplemented in CSVWorld::DataDisplayDelegate.

Here is the caller graph for this function:

Member Data Documentation

CSMWorld::CommandDispatcher* CSVWorld::CommandDelegate::mCommandDispatcher
private
CSMDoc::Document& CSVWorld::CommandDelegate::mDocument
private
bool CSVWorld::CommandDelegate::mEditLock
private

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