16#include <QtCore/QTimer>
19#include <QtCore/QSignalMapper>
21#include <QDragMoveEvent>
23#include <QDragEnterEvent>
76 QTimer::singleShot(0, closeparent ? parentWidget() :
this, &QWidget::close);
155 const char *res =
nullptr;
168 return (
const char *) res;
174 TObject *res =
nullptr;
176 switch (updatelevel) {
214 bool isremote =
false;
278 QString str = QString::number(isremote);
299 QString str = QString::number(ndiv);
311 res[3] = &updatelevel;
359 QString itemname =
"";
360 if ((par != obj) && par) {
361 QString* res = (QString*) par;
374 strncpy(buf, subfolder,
sizeof(buf));
383 return res !=
nullptr;
405 QAction* act =
new QAction(text, menu);
406 act->setCheckable(
true);
407 act->setChecked(checked);
408 act->setEnabled(enabled);
409 menu->addAction(act);
414 const QString& text,
int id,
int enabled,
int checked)
416 auto oldact = map->mapping(
id);
417 if (oldact) map->removeMappings(oldact);
419 QAction* act =
new QAction(text, menu);
421 act->setCheckable(
true);
422 act->setChecked(checked > 0);
425 act->setEnabled(enabled > 0);
427 QObject::connect(act, &QAction::triggered, [
id, map]() {
428#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
435 menu->addAction(act);
436 map->setMapping(act,
id);
442 QAction* act = (QAction*) map->mapping(
id);
443 if (!act)
return nullptr;
445 act->setCheckable(
true);
446 act->setChecked(checked > 0);
449 act->setEnabled(enabled > 0);
454 const QIcon& icon,
const QString& text,
int id,
int enabled,
int checked)
456 auto oldact = map->mapping(
id);
457 if (oldact) map->removeMappings(oldact);
459 QAction* act =
new QAction(icon, text, menu);
461 act->setCheckable(
true);
462 act->setChecked(checked > 0);
465 act->setEnabled(enabled > 0);
467 QObject::connect(act, &QAction::triggered, [
id, map]() {
468#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
475 menu->addAction(act);
476 map->setMapping(act,
id);
special base class for remote data servers like DABC, HTTP, hist server