MCPcopy Create free account
hub / github.com/LMMS/lmms / setupActions

Method setupActions

src/gui/widgets/ProjectNotes.cpp:111–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111void ProjectNotes::setupActions()
112{
113 QToolBar * tb = addToolBar( tr( "Edit Actions" ) );
114 QAction * a;
115
116 a = new QAction( embed::getIconPixmap( "edit_undo" ), tr( "&Undo" ),
117 this );
118 a->setShortcut( tr( "%1+Z" ).arg(
119 #ifdef LMMS_BUILD_APPLE
120 "⌘") );
121 #else
122 "Ctrl") );
123 #endif
124 connect( a, SIGNAL( triggered() ), m_edit, SLOT( undo() ) );
125 tb->addAction( a );
126
127 a = new QAction( embed::getIconPixmap( "edit_redo" ), tr( "&Redo" ),
128 this );
129 a->setShortcut( tr( "%1+Y" ).arg(
130 #ifdef LMMS_BUILD_APPLE
131 "⌘") );
132 #else
133 "Ctrl") );
134 #endif
135 connect( a, SIGNAL( triggered() ), m_edit, SLOT( redo() ) );
136 tb->addAction( a );
137
138 a = new QAction( embed::getIconPixmap( "edit_copy" ), tr( "&Copy" ),
139 this );
140 a->setShortcut( tr( "%1+C" ).arg(
141 #ifdef LMMS_BUILD_APPLE
142 "⌘") );
143 #else
144 "Ctrl") );
145 #endif
146 connect( a, SIGNAL( triggered() ), m_edit, SLOT( copy() ) );
147 tb->addAction( a );
148
149 a = new QAction( embed::getIconPixmap( "edit_cut" ), tr( "Cu&t" ),
150 this );
151 a->setShortcut( tr( "%1+X" ).arg(
152 #ifdef LMMS_BUILD_APPLE
153 "⌘") );
154 #else
155 "Ctrl") );
156 #endif
157 connect( a, SIGNAL( triggered() ), m_edit, SLOT( cut() ) );
158 tb->addAction( a );
159
160 a = new QAction( embed::getIconPixmap( "edit_paste" ), tr( "&Paste" ),
161 this );
162 a->setShortcut( tr( "%1+V" ).arg(
163 #ifdef LMMS_BUILD_APPLE
164 "⌘") );
165 #else
166 "Ctrl") );
167 #endif
168 connect( a, SIGNAL( triggered() ), m_edit, SLOT( paste() ) );

Callers

nothing calls this directly

Calls 9

getIconPixmapFunction · 0.85
copyFunction · 0.85
addActionMethod · 0.80
addItemsMethod · 0.80
addItemMethod · 0.80
fillMethod · 0.80
setTextMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected