ItemViewDialog class reference
[Model/View module]
Declaration
#include <QtLua/ItemViewDialog>
namespace QtLua {
class ItemViewDialog;
};
This class is a member of the QtLua namespace.
This class is declared in QtLua/qtluaitemviewdialog.hh source file, line 53.
Description
This class provides a generic dialog to view and edit data in a model.
Some edit buttons can be made available depending on the value of the edit_actions attribute.
Some lua functions can be used to create and invoke these dialogs from lua script.
See also TableTreeModel class and TableGridModel class.
Members
Types
- enum EditAction
- typedef [...] EditActions
Functions
- ItemViewDialog(ItemViewDialog::EditActions edit, QAbstractItemModel *model, QAbstractItemView *view = [...], QWidget *parent = [...])
- float get_column_margin_factor() const
- ItemViewDialog::EditActions get_edit_actions() const
- QAbstractItemModel * get_model() const
- bool get_resize_on_expand() const
- QAbstractItemView * get_view() const
- void set_column_margin_factor(float cmf)
- void set_edit_actions(ItemViewDialog::EditActions edit)
- void set_resize_on_expand(bool roe)
Protected function
- virtual QSize sizeHint() const
Private functions
- void new_row(const QModelIndex &parent, int row) const
- void set_edit_actions_(int edit)
Private slots
- void add_child() const
- void add_column() const
- void add_row() const
- void current_item_changed(const QModelIndex &index) const
- void edit() const
- void edit_error(const QString &message)
- void insert_column() const
- void insert_column_after() const
- void insert_row() const
- void insert_row_after() const
- void remove_column() const
- void remove_row() const
- void tree_expanded() const
Private fields
- QPushButton *_ab
- QPushButton *_ac
- QPushButton *_ach
- QDialogButtonBox *_buttonBox
- float _column_margin_factor
- QPushButton *_eb
- ItemViewDialog::EditActions _edit
- QPushButton *_ib
- QPushButton *_iba
- QPushButton *_ic
- QPushButton *_ica
- QAbstractItemModel *_model
- QPushButton *_rb
- QPushButton *_rc
- bool _resize_on_expand
- QAbstractItemView *_view
Members detail
ItemViewDialog(ItemViewDialog::EditActions edit, QAbstractItemModel *model, QAbstractItemView *view = 0, QWidget *parent = 0)
This constructor is declared in QtLua/qtluaitemviewdialog.hh source file, line 98.
Create a table dialog.
Parameters list:
- table: lua table to expose
- type: dialog type
- model: mvc model to use, a default model is created if NULL.
- attr: model attributes, control display and edit options
This enum is declared in QtLua/qtluaitemviewdialog.hh source file, line 63.
Identifier | Value | Description |
---|---|---|
EditData | 0x00001 | |
EditDataOnNewRow | 0x00002 | |
EditAddChild | 0x00004 | |
EditInsertRow | 0x00010 | |
EditInsertRowAfter | 0x00020 | |
EditAddRow | 0x00040 | |
EditRemoveRow | 0x00080 | |
EditRowAll | 0x000f0 | |
EditInsertColumn | 0x00100 | |
EditInsertColumnAfter | 0x00200 | |
EditAddColumn | 0x00400 | |
EditRemoveColumn | 0x00800 | |
EditColumnAll | 0x00f00 |
See also ItemViewDialog::EditActions typedef.
typedef ItemViewDialog::EditAction EditActions
This typedef is declared in QtLua/qtluaitemviewdialog.hh source file, line 81.
QPushButton *_ab
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 148.
This member access is private.
QPushButton *_ac
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 149.
This member access is private.
QPushButton *_ach
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 147.
This member access is private.
QDialogButtonBox *_buttonBox
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 146.
This member access is private.
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 151.
This member access is private.
QPushButton *_eb
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 147.
This member access is private.
ItemViewDialog::EditActions _edit
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 143.
This member access is private.
QPushButton *_ib
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 148.
This member access is private.
QPushButton *_iba
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 148.
This member access is private.
QPushButton *_ic
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 149.
This member access is private.
QPushButton *_ica
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 149.
This member access is private.
QAbstractItemModel *_model
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 144.
This member access is private.
QPushButton *_rb
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 148.
This member access is private.
QPushButton *_rc
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 149.
This member access is private.
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 150.
This member access is private.
QAbstractItemView *_view
This variable is declared in QtLua/qtluaitemviewdialog.hh source file, line 145.
This member access is private.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 123.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 132.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 127.
This member access is private.
This member is a Qt slot.
void current_item_changed(const QModelIndex &index) const
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 121.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 119.
This member access is private.
This member is a Qt slot.
void edit_error(const QString &message)
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 120.
This member access is private.
This member is a Qt slot.
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 116.
Get additionnal column width factor
ItemViewDialog::EditActions get_edit_actions() const
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 101.
QAbstractItemModel * get_model() const
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 104.
Return pointer to model
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 111.
Get current resize on expand state
QAbstractItemView * get_view() const
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 106.
Return pointer to view
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 131.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 130.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 125.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 126.
This member access is private.
This member is a Qt slot.
void new_row(const QModelIndex &parent, int row) const
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 141.
This member access is private.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 133.
This member access is private.
This member is a Qt slot.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 128.
This member access is private.
This member is a Qt slot.
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 114.
Set additionnal column width factor
void set_edit_actions(ItemViewDialog::EditActions edit)
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 100.
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 140.
This member access is private.
This function is declared in QtLua/qtluaitemviewdialog.hh source file, line 109.
Set keys column resize to content on node expand
virtual QSize sizeHint() const
This virtual function is declared in QtLua/qtluaitemviewdialog.hh source file, line 136.
This member access is protected.
This Qt slot is declared in QtLua/qtluaitemviewdialog.hh source file, line 122.
This member access is private.
This member is a Qt slot.