MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / createContextMenu

Method createContextMenu

launcher/ui/widgets/WideBar.cpp:139–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139QMenu * WideBar::createContextMenu(QWidget *parent, const QString & title)
140{
141 QMenu *contextMenu = new QMenu(title, parent);
142 for(auto & item: m_entries) {
143 switch(item->type) {
144 default:
145 case BarEntry::None:
146 break;
147 case BarEntry::Separator:
148 case BarEntry::Spacer:
149 contextMenu->addSeparator();
150 break;
151 case BarEntry::Action:
152 contextMenu->addAction(item->wideAction);
153 break;
154 }
155 }
156 return contextMenu;
157}
158
159#include "WideBar.moc"

Callers 6

ShowContextMenuMethod · 0.80
ShowContextMenuMethod · 0.80
showContextMenuMethod · 0.80
ShowContextMenuMethod · 0.80
ShowContextMenuMethod · 0.80
ShowContextMenuMethod · 0.80

Calls 2

addSeparatorMethod · 0.80
addActionMethod · 0.80

Tested by

no test coverage detected