MCPcopy Create free account
hub / github.com/clementgallet/libTAS / horizontalMenu

Method horizontalMenu

src/program/ui/InputEditorView.cpp:614–636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614void InputEditorView::horizontalMenu(QPoint pos)
615{
616 /* Storing the index of the section where context menu was shown */
617 contextSection = horizontalHeader()->logicalIndexAt(pos);
618
619 if (contextSection < InputEditorModel::COLUMN_SPECIAL_SIZE)
620 return;
621 if (contextSection == inputEditorModel->columnCount() - 1)
622 return;
623
624 /* Only enable factor for analog values */
625 factorAction->setEnabled(inputEditorModel->isInputAnalog(contextSection));
626
627 /* Update the status of the lock action */
628 lockAction->setChecked(inputEditorModel->isLockedUniqueInput(contextSection));
629
630 /* Update the status of autohold and autofire */
631 autoholdAction->setChecked(inputEditorModel->isAutoholdInput(contextSection));
632 autofireAction->setChecked(inputEditorModel->isAutofireInput(contextSection));
633
634 /* Display the context menu */
635 horMenu->popup(horizontalHeader()->viewport()->mapToGlobal(pos));
636}
637
638void InputEditorView::renameLabel()
639{

Callers

nothing calls this directly

Calls 5

isInputAnalogMethod · 0.80
isLockedUniqueInputMethod · 0.80
isAutoholdInputMethod · 0.80
isAutofireInputMethod · 0.80
columnCountMethod · 0.45

Tested by

no test coverage detected