ui/qt/toolkit.cpp

changeset 1109
1dd32226aa9f
parent 1075
be89ffebd4f3
equal deleted inserted replaced
1108:2c8ab8c17da7 1109:1dd32226aa9f
144 } 144 }
145 145
146 146
147 /* --------------------- Implemtation UiAction --------------------- */ 147 /* --------------------- Implemtation UiAction --------------------- */
148 148
149 UiAction::UiAction(UiObject *obj, QString &label, ui_callback f, void *userdata) : QAction(label, NULL) { 149 UiQAction::UiQAction(UiObject *obj, QString &label, ui_callback f, void *userdata) : QAction(label, NULL) {
150 this->obj = obj; 150 this->obj = obj;
151 this->callback = f; 151 this->callback = f;
152 this->userdata = userdata; 152 this->userdata = userdata;
153 } 153 }
154 154
155 UiAction::~UiAction() { 155 UiQAction::~UiQAction() {
156 // TODO: unbind var 156 // TODO: unbind var
157 } 157 }
158 158
159 void UiAction::trigger() { 159 void UiQAction::trigger() {
160 if(!callback) { 160 if(!callback) {
161 return; 161 return;
162 } 162 }
163 163
164 UiEvent e; 164 UiEvent e;
176 176
177 // TODO: notify var observers 177 // TODO: notify var observers
178 } 178 }
179 179
180 // ui_enablefunc for UiAction 180 // ui_enablefunc for UiAction
181 void ui_action_enable(UiAction *action, int enable) { 181 void ui_action_enable(UiQAction *action, int enable) {
182 action->setEnabled((bool)enable); 182 action->setEnabled((bool)enable);
183 } 183 }
184 184

mercurial