Changeset View
Changeset View
Standalone View
Standalone View
krita/ui/kis_image_manager.cc
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
53 | void KisImageManager::setView(QPointer<KisView>imageView) | 53 | void KisImageManager::setView(QPointer<KisView>imageView) | ||
54 | { | 54 | { | ||
55 | Q_UNUSED(imageView); | 55 | Q_UNUSED(imageView); | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | void KisImageManager::setup(KisActionManager *actionManager) | 58 | void KisImageManager::setup(KisActionManager *actionManager) | ||
59 | { | 59 | { | ||
60 | 60 | | |||
61 | KisAction *action = new KisAction(i18n("I&mport Layer..."), this); | 61 | KisAction *action = actionManager->createAction("import_layer_from_file"); | ||
62 | action->setActivationFlags(KisAction::ACTIVE_LAYER); | 62 | action->setActivationFlags(KisAction::ACTIVE_LAYER); | ||
63 | actionManager->addAction("import_layer_from_file", action); | | |||
64 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerFromFile())); | 63 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerFromFile())); | ||
65 | 64 | | |||
66 | action = new KisAction(KisIconUtils::loadIcon("configure"), i18n("Properties..."), this); | 65 | action = actionManager->createAction("image_properties"); | ||
67 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 66 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
68 | actionManager->addAction("image_properties", action); | | |||
69 | connect(action, SIGNAL(triggered()), this, SLOT(slotImageProperties())); | 67 | connect(action, SIGNAL(triggered()), this, SLOT(slotImageProperties())); | ||
70 | 68 | | |||
71 | action = new KisAction(KisIconUtils::loadIcon("document-new"), i18n("as Paint Layer..."), this); | 69 | action = actionManager->createAction("import_layer_as_paint_layer"); | ||
72 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 70 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
73 | actionManager->addAction("import_layer_as_paint_layer", action); | | |||
74 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerFromFile())); | 71 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerFromFile())); | ||
75 | 72 | | |||
76 | action = new KisAction(KisIconUtils::loadIcon("edit-copy"), i18n("as Transparency Mask..."), this); | 73 | action = actionManager->createAction("import_layer_as_transparency_mask"); | ||
77 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 74 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
78 | actionManager->addAction("import_layer_as_transparency_mask", action); | | |||
79 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsTransparencyMask())); | 75 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsTransparencyMask())); | ||
80 | 76 | | |||
81 | action = new KisAction(KisIconUtils::loadIcon("view-filter"), i18n("as Filter Mask..."), this); | 77 | action = actionManager->createAction("import_layer_as_filter_mask"); | ||
82 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 78 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
83 | actionManager->addAction("import_layer_as_filter_mask", action); | | |||
84 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsFilterMask())); | 79 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsFilterMask())); | ||
85 | 80 | | |||
86 | action = new KisAction(KisIconUtils::loadIcon("edit-paste"), i18n("as Selection Mask..."), this); | 81 | action = actionManager->createAction("import_layer_as_selection_mask"); | ||
87 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 82 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
88 | actionManager->addAction("import_layer_as_selection_mask", action); | | |||
89 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsSelectionMask())); | 83 | connect(action, SIGNAL(triggered()), this, SLOT(slotImportLayerAsSelectionMask())); | ||
90 | 84 | | |||
91 | action = new KisAction(KisIconUtils::loadIcon("format-stroke-color"), i18n("Image Background Color and Transparency..."), this); | 85 | action = actionManager->createAction("image_color"); | ||
92 | action->setActivationFlags(KisAction::ACTIVE_NODE); | 86 | action->setActivationFlags(KisAction::ACTIVE_NODE); | ||
93 | action->setToolTip(i18n("Change the background color of the image")); | | |||
94 | actionManager->addAction("image_color", action); | | |||
95 | connect(action, SIGNAL(triggered()), this, SLOT(slotImageColor())); | 87 | connect(action, SIGNAL(triggered()), this, SLOT(slotImageColor())); | ||
96 | 88 | | |||
97 | } | 89 | } | ||
98 | 90 | | |||
99 | void KisImageManager::slotImportLayerFromFile() | 91 | void KisImageManager::slotImportLayerFromFile() | ||
100 | { | 92 | { | ||
101 | importImage(QUrl(), "KisPaintLayer"); | 93 | importImage(QUrl(), "KisPaintLayer"); | ||
102 | } | 94 | } | ||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |