1 #ifndef CSV_WORLD_DIALOGUESUBVIEW_H
2 #define CSV_WORLD_DIALOGUESUBVIEW_H
8 #include <QAbstractItemDelegate>
11 #include "../doc/subview.hpp"
13 #include "../../model/world/columnbase.hpp"
14 #include "../../model/world/commanddispatcher.hpp"
15 #include "../../model/world/universalid.hpp"
17 class QDataWidgetMapper;
27 class NestedTableProxyModel;
42 class CommandDelegate;
43 class CreatorFactoryBase;
57 virtual void paint (QPainter* painter,
58 const QStyleOptionViewItem& option,
59 const QModelIndex& index)
const;
62 virtual QSize
sizeHint (
const QStyleOptionViewItem& option,
63 const QModelIndex& index)
const;
67 const QStyleOptionViewItem& option,
68 const QModelIndex& index)
const;
96 void setIndex(
const QModelIndex& index);
100 const QModelIndex& index,
119 std::vector<DialogueDelegateDispatcherProxy*>
mProxys;
140 const QModelIndex& index)
const;
146 virtual void paint (QPainter* painter,
147 const QStyleOptionViewItem& option,
148 const QModelIndex& index)
const;
151 virtual QSize
sizeHint (
const QStyleOptionViewItem& option,
152 const QModelIndex& index)
const;
205 int currentRow)
const;
SimpleDialogueSubView(const CSMWorld::UniversalId &id, CSMDoc::Document &document)
Definition: dialoguesubview.cpp:733
Definition: dialoguesubview.hpp:75
EditWidget * mEditWidget
Definition: dialoguesubview.hpp:224
DialogueDelegateDispatcherProxy(QWidget *editor, CSMWorld::ColumnBase::Display display)
Definition: dialoguesubview.cpp:120
static const struct @2 signals[]
Definition: dialoguesubview.hpp:46
QVBoxLayout * mMainLayout
Definition: dialoguesubview.hpp:225
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: dialoguesubview.cpp:217
Definition: idtable.hpp:15
std::vector< DialogueDelegateDispatcherProxy * > mProxys
Definition: dialoguesubview.hpp:119
CSMWorld::ColumnBase::Display mDisplay
Definition: dialoguesubview.hpp:85
CSMWorld::CommandDispatcher & mCommandDispatcher
Definition: dialoguesubview.hpp:114
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
does nothing
Definition: dialoguesubview.cpp:239
void updateCurrentId()
Definition: dialoguesubview.cpp:843
QAbstractItemModel * mTable
Definition: dialoguesubview.hpp:112
Display
Definition: columnbase.hpp:39
void settingChanged(const CSMPrefs::Setting *setting)
Definition: dialoguesubview.cpp:896
Type
Definition: universalid.hpp:40
QVBoxLayout & getMainLayout()
Definition: dialoguesubview.cpp:708
EditWidget & getEditWidget()
Definition: dialoguesubview.cpp:723
const QModelIndex & mIndex
Definition: dialoguesubview.hpp:80
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: dialoguesubview.cpp:53
void editorDataCommited(QWidget *editor, const QModelIndex &index, CSMWorld::ColumnBase::Display display)
Definition: dialoguesubview.cpp:175
~DialogueDelegateDispatcher()
Definition: dialoguesubview.cpp:314
CSMWorld::IdTable & getTable()
Definition: dialoguesubview.cpp:713
CSVWorld::CommandDelegate * makeDelegate(CSMWorld::ColumnBase::Display display)
Definition: dialoguesubview.cpp:159
const CSMWorld::IdTable * mTable
Definition: dialoguesubview.hpp:48
void switchToRow(int row)
Definition: dialoguesubview.cpp:941
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
does nothing
Definition: dialoguesubview.cpp:99
virtual void setEditLock(bool locked)
Definition: dialoguesubview.cpp:888
TableBottomBox * mBottom
Definition: dialoguesubview.hpp:265
DialogueSubView(const CSMWorld::UniversalId &id, CSMDoc::Document &document, const CreatorFactoryBase &creatorFactory, bool sorting=false)
Definition: dialoguesubview.cpp:870
virtual void setEditLock(bool locked)
Definition: dialoguesubview.cpp:768
CSMWorld::IdTable * mTable
Definition: dialoguesubview.hpp:226
void addButtonBar()
Definition: dialoguesubview.cpp:851
NotEditableSubDelegate mNotEditableDelegate
Definition: dialoguesubview.hpp:117
void viewRecord()
Definition: dialoguesubview.cpp:926
Definition: tablebottombox.hpp:23
CSMWorld::CommandDispatcher & getCommandDispatcher()
Definition: dialoguesubview.cpp:718
bool isLocked() const
Definition: dialoguesubview.cpp:728
std::map< int, CommandDelegate * > mDelegates
Definition: dialoguesubview.hpp:108
const CSMDoc::Document & mDocument
Definition: dialoguesubview.hpp:228
void setIndex(const QModelIndex &index)
Definition: dialoguesubview.cpp:135
RecordButtonBar * mButtons
Definition: dialoguesubview.hpp:266
void editorDataCommited()
Definition: dialoguesubview.cpp:127
void requestFocus(const std::string &id)
Definition: dialoguesubview.cpp:962
bool mLocked
Definition: dialoguesubview.hpp:227
QObject * mParent
Definition: dialoguesubview.hpp:110
Definition: commanddispatcher.hpp:20
refWrapper(const QModelIndex &index)
Definition: dialoguesubview.cpp:116
Base class for Creator factory.
Definition: creator.hpp:54
Definition: subview.hpp:23
Definition: setting.hpp:22
Definition: dialoguesubview.hpp:105
Definition: dialoguesubview.hpp:220
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
does nothing
Definition: dialoguesubview.cpp:94
DialogueDelegateDispatcher(QObject *parent, CSMWorld::IdTable *table, CSMWorld::CommandDispatcher &commandDispatcher, CSMDoc::Document &document, QAbstractItemModel *model=0)
Definition: dialoguesubview.cpp:149
Definition: document.hpp:57
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: dialoguesubview.cpp:104
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
does nothing
Definition: dialoguesubview.cpp:233
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: dialoguesubview.cpp:181
QWidget * mEditor
Definition: dialoguesubview.hpp:83
NotEditableSubDelegate(const CSMWorld::IdTable *table, QObject *parent=0)
Definition: dialoguesubview.cpp:48
CSMWorld::CommandDispatcher mCommandDispatcher
Definition: dialoguesubview.hpp:229
QWidget * makeEditor(CSMWorld::ColumnBase::Display display, const QModelIndex &index)
will return null if delegate is not present, parent of the widget is
Definition: dialoguesubview.cpp:245
Definition: dialoguesubview.hpp:261
std::auto_ptr< refWrapper > mIndexWrapper
Definition: dialoguesubview.hpp:87
CSMDoc::Document & mDocument
Definition: dialoguesubview.hpp:115
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
we need to care for deleting currently edited record
Definition: dialoguesubview.cpp:822
QWidget * getEditor() const
Definition: dialoguesubview.cpp:140
void dataChanged(const QModelIndex &index)
Definition: dialoguesubview.cpp:788
Definition: dialoguesubview.hpp:72
void showPreview()
Definition: dialoguesubview.cpp:913
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: dialoguesubview.cpp:89
Definition: universalid.hpp:12