MCPcopy Create free account
hub / github.com/davy7125/polyphone / TreeViewMenu

Method TreeViewMenu

sources/editor/tree/treeviewmenu.cpp:40–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38IdList TreeViewMenu::s_copy = IdList();
39
40TreeViewMenu::TreeViewMenu(QWidget * parent) : QMenu(parent),
41 _dialogList(new DialogList(parent))
42{
43 // Style
44 this->setStyleSheet(ContextManager::theme()->getMenuTheme());
45
46 // Associate
47 _associateAction = new QAction(tr("&Bind to..."), this);
48 connect(_associateAction, SIGNAL(triggered()), this, SLOT(associate()));
49 this->addAction(_associateAction);
50
51 // Replace
52 _replaceAction = new QAction(tr("&Replace by..."), this);
53 connect(_replaceAction, SIGNAL(triggered()), this, SLOT(replace()));
54 this->addAction(_replaceAction);
55 this->addSeparator();
56
57 connect(_dialogList, SIGNAL(elementSelected(EltID, bool)), this, SLOT(itemSelectedFromList(EltID, bool)));
58
59 /// ----------- ///
60
61 // Copy
62 _copyAction = new QAction(tr("&Copy"), this);
63 _copyAction->setShortcut(QString("Ctrl+C"));
64 connect(_copyAction, SIGNAL(triggered()), this, SLOT(copy()));
65 this->addAction(_copyAction);
66
67 // Paste
68 _pasteAction = new QAction(tr("&Paste"), this);
69 _pasteAction->setShortcut(QString("Ctrl+V"));
70 connect(_pasteAction, SIGNAL(triggered()), this, SLOT(paste()));
71 this->addAction(_pasteAction);
72
73 // Duplicate
74 _duplicateAction = new QAction(tr("D&uplicate"), this);
75 _duplicateAction->setShortcut(QString("Ctrl+D"));
76 connect(_duplicateAction, SIGNAL(triggered()), this, SLOT(duplicate()));
77 this->addAction(_duplicateAction);
78
79 // Delete
80 _removeAction = new QAction(tr("&Delete"), this);
81 _removeAction->setShortcut(QString("Del"));
82 connect(_removeAction, SIGNAL(triggered()), this, SLOT(remove()));
83 this->addAction(_removeAction);
84 this->addSeparator();
85
86 /// ----------- ///
87
88 // Mute
89 _muteAction = new QAction(tr("Mute"), this);
90 _muteAction->setCheckable(true);
91 connect(_muteAction, SIGNAL(triggered(bool)), this, SLOT(onMute(bool)));
92 this->addAction(_muteAction);
93
94 // Always play
95 _alwaysPlayAction = new QAction(tr("Always play"), this);
96 _alwaysPlayAction->setCheckable(true);
97 connect(_alwaysPlayAction, SIGNAL(triggered(bool)), this, SLOT(onAlwaysPlay(bool)));

Callers

nothing calls this directly

Calls 1

getMenuThemeMethod · 0.80

Tested by

no test coverage detected