16 #include <QtCore/QTimer>
19 #include <QtCore/QSignalMapper>
21 #include <QDragMoveEvent>
22 #include <QCloseEvent>
23 #include <QDragEnterEvent>
27 fWaitsForObjectCreation(false),
28 fCanDestroyWidget(true),
29 fResetWidgetShooted(false),
76 QTimer::singleShot(0, closeparent ? parentWidget() :
this, SLOT(close()));
173 return (
const char*) res;
181 switch (updatelevel) {
219 bool isremote =
false;
285 QString str = QString::number(isremote);
306 QString str = QString::number(ndiv);
318 res[3] = &updatelevel;
366 QString itemname =
"";
367 if ((par!=obj) && (par!=0)) {
368 QString* res = (QString*) par;
381 strncpy(buf, subfolder,
sizeof(buf));
411 const QString& text,
bool checked,
412 QObject* recv,
const char* member)
414 QAction* act =
new QAction(text, menu);
415 act->setCheckable(
true);
416 act->setChecked(checked);
417 recv->connect (act, SIGNAL(triggered()), recv, member);
418 menu->addAction(act);
423 const QString& text,
int id,
int enabled,
int checked)
425 QAction* act =
new QAction(text, menu);
427 act->setCheckable(
true);
428 act->setChecked(checked > 0);
431 act->setEnabled(enabled > 0);
432 map->connect (act, SIGNAL(triggered()), map, SLOT(map()));
433 menu->addAction(act);
434 map->setMapping(act,
id);
440 QAction* act = (QAction*) map->mapping(
id);
441 if (act==0)
return 0;
443 act->setCheckable(
true);
444 act->setChecked(checked > 0);
447 act->setEnabled(enabled > 0);
452 const QIcon& icon,
const QString& text,
int id,
int enabled,
int checked)
454 QAction* act =
new QAction(icon, text, menu);
456 act->setCheckable(
true);
457 act->setChecked(checked > 0);
460 act->setEnabled(enabled > 0);
461 map->connect (act, SIGNAL(triggered()), map, SLOT(map()));
462 menu->addAction(act);
463 map->setMapping(act,
id);