21{
22 Q_UNUSED ( option );
25
27 ->sourceModel() );
28
30
32
33 if ( Model == nullptr )
34 {
35 return nullptr;
36 }
37
38 if (
index.column() == 0 )
39 {
41 return nullptr;
42 }
43
44 if (
dynamic_cast<TableRelationshipNode *
> (
Item ) )
45 {
46 TableRelationshipNode * RelationshipItem =
dynamic_cast<TableRelationshipNode *
> (
Item );
48 widgets::editors::relation * Editor = new widgets::editors::relation ( RelationshipData );
49 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT (
CommitAndClose() ) );
50 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
51 return Editor;
52 }
53 else if (
dynamic_cast<TableAttributeNode *
> (
Item ) )
54 {
55 TableAttributeNode * AttributeItem =
dynamic_cast<TableAttributeNode *
> (
Item );
57
59 {
60 widgets::editors::multiattr * widget = new widgets::editors::multiattr(AttributeData);
61 connect ( widget, SIGNAL ( signal_edit_end() ),
this, SLOT (
CommitAndClose() ) );
62 connect ( widget, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
63 return widget;
64 }
65 else
66 {
67 switch ( AttributeData.
p_type )
68 {
69
71
73
75 {
76 widgets::editors::stringattr * Editor = new widgets::editors::stringattr ( AttributeData,
77 parent );
78 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT (
CommitAndClose() ) );
79 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
80 return Editor;
81 }
82
84
86
88
90
92
94
96
98
100
102 {
103 widgets::editors::numericattr * Editor = new widgets::editors::numericattr ( AttributeData,
104 parent );
105 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT (
CommitAndClose() ) );
106 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
107 return Editor;
108 }
109
111
113 {
114 widgets::editors::combo * Editor = new widgets::editors::combo ( AttributeData, parent );
115 connect ( Editor, SIGNAL ( signal_value_change() ),
this, SLOT (
CommitAndClose() ) );
116 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
117 return Editor;
118 }
119
121 {
122 widgets::editors::combo * Editor = new widgets::editors::combo ( AttributeData, parent );
123 connect ( Editor, SIGNAL ( signal_edit_end() ),
this, SLOT (
CommitAndClose() ) );
124 connect ( Editor, SIGNAL ( signal_force_close() ),
this, SLOT (
Close() ) );
125 return Editor;
126 }
127
128 default:
129 break;
130 }
131 }
132 }
133
134 return nullptr;
135}
void CreateObjectEditorSignal(tref Object) const
tref GetTableObject(int ObjectIndex) const
TableNode * getnode(const QModelIndex &index) const
inner::configobject::tref tref