13 #ifndef MAGICSMOKE_SC_SCLIMENU_H
14 #define MAGICSMOKE_SC_SCLIMENU_H
18 #include <QSignalMapper>
29 auto mmenu=inst->menuEntries();
30 if(mmenu.isEmpty())
return nullptr;
32 QMenu*m=menu?menu:
new QMenu;
33 QSignalMapper*sm=
new QSignalMapper(m);
34 for(
auto entry:mmenu){
35 QAction*a=m->addAction(entry.second,sm,SLOT(map()));
36 sm->setMapping(a,entry.first);
38 QObject::connect(sm,SIGNAL(mapped(QString)),inst,SLOT(execServerCommand(QString)));
static MSessionClient * instance()
returns the current instance of the Session Client class returns nullptr if there is no instance ...
Definition: scli.cpp:101