MCPcopy Create free account
hub / github.com/chris2511/xca / clipboardFormatMenu

Method clipboardFormatMenu

widgets/XcaTreeView.cpp:628–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void XcaTreeView::clipboardFormatMenu(QMenu *menu)
629{
630 if (!ClipboardSettings || !ClipboardPki_type)
631 return;
632 int exp_type = Settings[ClipboardSettings];
633
634 QActionGroup *group = new QActionGroup(menu);
635 QMenu *clipboard = menu->addMenu(tr("Clipboard format"));
636 foreach(const pki_export *x, pki_export::select(ClipboardPki_type, 0)) {
637 if (!(x->flags & F_CLIPBOARD))
638 continue;
639 QAction *a = clipboard->addAction(x->desc);
640 a->setData(x->id);
641 a->setCheckable(true);
642 a->setChecked(exp_type == x->id);
643 group->addAction(a);
644 }
645
646 connect(group, SIGNAL(triggered(QAction*)),
647 this, SLOT(clipboardFormat(QAction*)));
648}
649
650void XcaTreeView::clipboardFormat(QAction *a)
651{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected