| 626 | } |
| 627 | |
| 628 | void 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 | |
| 650 | void XcaTreeView::clipboardFormat(QAction *a) |
| 651 | { |
nothing calls this directly
no outgoing calls
no test coverage detected