15 #include <QtCore/QTimer>
18 #include <QtCore/QSignalMapper>
20 #include <QDragMoveEvent>
21 #include <QCloseEvent>
23 #include <QDragEnterEvent>
27 fWaitsForObjectCreation(false),
28 fCanDestroyWidget(true),
29 fResetWidgetShooted(false),
75 QTimer::singleShot(0, closeparent ? parentWidget() :
this, SLOT(close()));
172 return (
const char*) res;
180 switch (updatelevel) {
218 bool isremote =
false;
284 QString str = QString::number(isremote);
305 QString str = QString::number(ndiv);
317 res[3] = &updatelevel;
365 QString itemname =
"";
366 if ((par!=obj) && (par!=0)) {
367 QString* res = (QString*) par;
377 if (subfolder==0) strcpy(buf,
"");
else
378 strcpy(buf, subfolder);
408 const QString& text,
bool checked,
409 QObject* recv,
const char* member)
411 QAction* act =
new QAction(text, menu);
412 act->setCheckable(
true);
413 act->setChecked(checked);
414 recv->connect (act, SIGNAL(triggered()), recv, member);
415 menu->addAction(act);
420 const QString& text,
int id,
int enabled,
int checked)
422 QAction* act =
new QAction(text, menu);
424 act->setCheckable(
true);
425 act->setChecked(checked > 0);
428 act->setEnabled(enabled > 0);
429 map->connect (act, SIGNAL(triggered()), map, SLOT(map()));
430 menu->addAction(act);
431 map->setMapping(act,
id);
435 QAction*
SetIdAction(QSignalMapper* map,
int id,
int enabled,
int checked)
437 QAction* act = (QAction*) map->mapping(
id);
438 if (act==0)
return 0;
440 act->setCheckable(
true);
441 act->setChecked(checked > 0);
444 act->setEnabled(enabled > 0);
449 const QIcon& icon,
const QString& text,
int id,
int enabled,
int checked)
451 QAction* act =
new QAction(icon, text, menu);
453 act->setCheckable(
true);
454 act->setChecked(checked > 0);
457 act->setEnabled(enabled > 0);
458 map->connect (act, SIGNAL(triggered()), map, SLOT(map()));
459 menu->addAction(act);
460 map->setMapping(act,
id);