Changeset View
Changeset View
Standalone View
Standalone View
words/part/KWView.cpp
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Line(s) | 271 | { | |||
---|---|---|---|---|---|
289 | // -------------- Edit actions | 289 | // -------------- Edit actions | ||
290 | action = actionCollection()->addAction(KStandardAction::Cut, "edit_cut", 0, 0); | 290 | action = actionCollection()->addAction(KStandardAction::Cut, "edit_cut", 0, 0); | ||
291 | new KoCutController(canvasBase(), action); | 291 | new KoCutController(canvasBase(), action); | ||
292 | action = actionCollection()->addAction(KStandardAction::Copy, "edit_copy", 0, 0); | 292 | action = actionCollection()->addAction(KStandardAction::Copy, "edit_copy", 0, 0); | ||
293 | new KoCopyController(canvasBase(), action); | 293 | new KoCopyController(canvasBase(), action); | ||
294 | action = actionCollection()->addAction(KStandardAction::Paste, "edit_paste", 0, 0); | 294 | action = actionCollection()->addAction(KStandardAction::Paste, "edit_paste", 0, 0); | ||
295 | new KoPasteController(canvasBase(), action); | 295 | new KoPasteController(canvasBase(), action); | ||
296 | 296 | | |||
297 | action = new QAction(QIcon::fromTheme(QStringLiteral("shapes")), i18n("Add shapes"), this); | ||||
298 | connect(action, &QAction::triggered, this, []() { | ||||
299 | qDebug() << "clicked add shapes"; | ||||
300 | }); | ||||
301 | actionCollection()->addAction("edit_add-shape", action); | ||||
302 | | ||||
297 | action = new QAction(koIcon("edit-delete"), i18n("Delete"), this); | 303 | action = new QAction(koIcon("edit-delete"), i18n("Delete"), this); | ||
298 | action->setShortcut(QKeySequence("Del")); | 304 | action->setShortcut(QKeySequence("Del")); | ||
299 | connect(action, SIGNAL(triggered()), this, SLOT(editDeleteSelection())); | 305 | connect(action, SIGNAL(triggered()), this, SLOT(editDeleteSelection())); | ||
300 | connect(canvasBase()->toolProxy(), SIGNAL(selectionChanged(bool)), action, SLOT(setEnabled(bool))); | 306 | connect(canvasBase()->toolProxy(), SIGNAL(selectionChanged(bool)), action, SLOT(setEnabled(bool))); | ||
301 | actionCollection()->addAction("edit_delete", action); | 307 | actionCollection()->addAction("edit_delete", action); | ||
302 | 308 | | |||
303 | // -------------- View menu | 309 | // -------------- View menu | ||
304 | action = new QAction(i18n("Show Formatting Characters"), this); | 310 | action = new QAction(i18n("Show Formatting Characters"), this); | ||
▲ Show 20 Lines • Show All 830 Lines • Show Last 20 Lines |