Changeset View
Changeset View
Standalone View
Standalone View
mainWindow/kpMainWindow_Image.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | |||||
111 | 111 | | |||
112 | // private | 112 | // private | ||
113 | void kpMainWindow::setupImageMenuActions () | 113 | void kpMainWindow::setupImageMenuActions () | ||
114 | { | 114 | { | ||
115 | KActionCollection *ac = actionCollection (); | 115 | KActionCollection *ac = actionCollection (); | ||
116 | 116 | | |||
117 | d->actionResizeScale = ac->addAction ("image_resize_scale"); | 117 | d->actionResizeScale = ac->addAction ("image_resize_scale"); | ||
118 | d->actionResizeScale->setText (i18n ("R&esize / Scale...")); | 118 | d->actionResizeScale->setText (i18n ("R&esize / Scale...")); | ||
119 | connect (d->actionResizeScale, SIGNAL (triggered(bool)), SLOT (slotResizeScale())); | 119 | connect (d->actionResizeScale, &QAction::triggered, this, &kpMainWindow::slotResizeScale); | ||
120 | | ||||
120 | ac->setDefaultShortcut (d->actionResizeScale, Qt::CTRL + Qt::Key_E); | 121 | ac->setDefaultShortcut (d->actionResizeScale, Qt::CTRL + Qt::Key_E); | ||
121 | 122 | | |||
122 | d->actionCrop = ac->addAction ("image_crop"); | 123 | d->actionCrop = ac->addAction ("image_crop"); | ||
123 | d->actionCrop->setText (i18n ("Se&t as Image (Crop)")); | 124 | d->actionCrop->setText (i18n ("Se&t as Image (Crop)")); | ||
124 | connect (d->actionCrop, SIGNAL (triggered(bool)), SLOT (slotCrop())); | 125 | connect (d->actionCrop, &QAction::triggered, this, &kpMainWindow::slotCrop); | ||
125 | ac->setDefaultShortcut (d->actionCrop, Qt::CTRL + Qt::Key_T); | 126 | ac->setDefaultShortcut (d->actionCrop, Qt::CTRL + Qt::Key_T); | ||
126 | 127 | | |||
127 | d->actionAutoCrop = ac->addAction ("image_auto_crop"); | 128 | d->actionAutoCrop = ac->addAction ("image_auto_crop"); | ||
128 | d->actionAutoCrop->setText (autoCropText ()); | 129 | d->actionAutoCrop->setText (autoCropText ()); | ||
129 | connect (d->actionAutoCrop, SIGNAL (triggered(bool)), SLOT (slotAutoCrop())); | 130 | connect (d->actionAutoCrop, &QAction::triggered, this, &kpMainWindow::slotAutoCrop); | ||
130 | ac->setDefaultShortcut (d->actionAutoCrop, Qt::CTRL + Qt::Key_U); | 131 | ac->setDefaultShortcut (d->actionAutoCrop, Qt::CTRL + Qt::Key_U); | ||
131 | 132 | | |||
132 | d->actionFlip = ac->addAction ("image_flip"); | 133 | d->actionFlip = ac->addAction ("image_flip"); | ||
133 | d->actionFlip->setText (i18n ("&Flip (upside down)")); | 134 | d->actionFlip->setText (i18n ("&Flip (upside down)")); | ||
134 | connect (d->actionFlip, SIGNAL (triggered(bool)), SLOT (slotFlip())); | 135 | connect (d->actionFlip, &QAction::triggered, this, &kpMainWindow::slotFlip); | ||
135 | ac->setDefaultShortcut (d->actionFlip, Qt::CTRL + Qt::Key_F); | 136 | ac->setDefaultShortcut (d->actionFlip, Qt::CTRL + Qt::Key_F); | ||
136 | 137 | | |||
137 | d->actionMirror = ac->addAction ("image_mirror"); | 138 | d->actionMirror = ac->addAction ("image_mirror"); | ||
138 | d->actionMirror->setText (i18n ("Mirror (horizontally)")); | 139 | d->actionMirror->setText (i18n ("Mirror (horizontally)")); | ||
139 | connect (d->actionMirror, SIGNAL (triggered(bool)), SLOT (slotMirror())); | 140 | connect (d->actionMirror, &QAction::triggered, this, &kpMainWindow::slotMirror); | ||
140 | //ac->setDefaultShortcut (d->actionMirror, Qt::CTRL + Qt::Key_M); | 141 | //ac->setDefaultShortcut (d->actionMirror, Qt::CTRL + Qt::Key_M); | ||
141 | 142 | | |||
142 | d->actionRotate = ac->addAction ("image_rotate"); | 143 | d->actionRotate = ac->addAction ("image_rotate"); | ||
143 | d->actionRotate->setText (i18n ("&Rotate...")); | 144 | d->actionRotate->setText (i18n ("&Rotate...")); | ||
144 | d->actionRotate->setIcon(KDE::icon("transform-rotate")); | 145 | d->actionRotate->setIcon(KDE::icon("transform-rotate")); | ||
145 | connect (d->actionRotate, SIGNAL (triggered(bool)), SLOT (slotRotate())); | 146 | connect (d->actionRotate, &QAction::triggered, this, &kpMainWindow::slotRotate); | ||
146 | ac->setDefaultShortcut (d->actionRotate, Qt::CTRL + Qt::Key_R); | 147 | ac->setDefaultShortcut (d->actionRotate, Qt::CTRL + Qt::Key_R); | ||
147 | 148 | | |||
148 | d->actionRotateLeft = ac->addAction ("image_rotate_270deg"); | 149 | d->actionRotateLeft = ac->addAction ("image_rotate_270deg"); | ||
149 | d->actionRotateLeft->setText (i18n ("Rotate &Left")); | 150 | d->actionRotateLeft->setText (i18n ("Rotate &Left")); | ||
150 | d->actionRotateLeft->setIcon(KDE::icon("object-rotate-left")); | 151 | d->actionRotateLeft->setIcon(KDE::icon("object-rotate-left")); | ||
151 | connect (d->actionRotateLeft, SIGNAL (triggered(bool)), SLOT (slotRotate270())); | 152 | connect (d->actionRotateLeft, &QAction::triggered, this, &kpMainWindow::slotRotate270); | ||
152 | ac->setDefaultShortcut (d->actionRotateLeft, Qt::CTRL + Qt::SHIFT + Qt::Key_Left); | 153 | ac->setDefaultShortcut (d->actionRotateLeft, Qt::CTRL + Qt::SHIFT + Qt::Key_Left); | ||
153 | 154 | | |||
154 | d->actionRotateRight = ac->addAction ("image_rotate_90deg"); | 155 | d->actionRotateRight = ac->addAction ("image_rotate_90deg"); | ||
155 | d->actionRotateRight->setText (i18n ("Rotate Righ&t")); | 156 | d->actionRotateRight->setText (i18n ("Rotate Righ&t")); | ||
156 | d->actionRotateRight->setIcon(KDE::icon("object-rotate-right")); | 157 | d->actionRotateRight->setIcon(KDE::icon("object-rotate-right")); | ||
157 | connect (d->actionRotateRight, SIGNAL (triggered(bool)), SLOT (slotRotate90())); | 158 | connect (d->actionRotateRight, &QAction::triggered, this, &kpMainWindow::slotRotate90); | ||
158 | ac->setDefaultShortcut (d->actionRotateRight, Qt::CTRL + Qt::SHIFT + Qt::Key_Right); | 159 | ac->setDefaultShortcut (d->actionRotateRight, Qt::CTRL + Qt::SHIFT + Qt::Key_Right); | ||
159 | 160 | | |||
160 | d->actionSkew = ac->addAction ("image_skew"); | 161 | d->actionSkew = ac->addAction ("image_skew"); | ||
161 | d->actionSkew->setText (i18n ("S&kew...")); | 162 | d->actionSkew->setText (i18n ("S&kew...")); | ||
162 | connect (d->actionSkew, SIGNAL (triggered(bool)), SLOT (slotSkew())); | 163 | connect (d->actionSkew, &QAction::triggered, this, &kpMainWindow::slotSkew); | ||
163 | ac->setDefaultShortcut (d->actionSkew, Qt::CTRL + Qt::Key_K); | 164 | ac->setDefaultShortcut (d->actionSkew, Qt::CTRL + Qt::Key_K); | ||
164 | 165 | | |||
165 | d->actionConvertToBlackAndWhite = ac->addAction ("image_convert_to_black_and_white"); | 166 | d->actionConvertToBlackAndWhite = ac->addAction ("image_convert_to_black_and_white"); | ||
166 | d->actionConvertToBlackAndWhite->setText (i18n ("Reduce to Mo&nochrome (Dithered)")); | 167 | d->actionConvertToBlackAndWhite->setText (i18n ("Reduce to Mo&nochrome (Dithered)")); | ||
167 | connect (d->actionConvertToBlackAndWhite, SIGNAL (triggered(bool)), SLOT (slotConvertToBlackAndWhite())); | 168 | connect (d->actionConvertToBlackAndWhite, &QAction::triggered, | ||
169 | this, &kpMainWindow::slotConvertToBlackAndWhite); | ||||
168 | 170 | | |||
169 | d->actionConvertToGrayscale = ac->addAction ("image_convert_to_grayscale"); | 171 | d->actionConvertToGrayscale = ac->addAction ("image_convert_to_grayscale"); | ||
170 | d->actionConvertToGrayscale->setText (i18n ("Reduce to &Grayscale")); | 172 | d->actionConvertToGrayscale->setText (i18n ("Reduce to &Grayscale")); | ||
171 | connect (d->actionConvertToGrayscale, SIGNAL (triggered(bool)), SLOT (slotConvertToGrayscale())); | 173 | connect (d->actionConvertToGrayscale, &QAction::triggered, this, &kpMainWindow::slotConvertToGrayscale); | ||
172 | 174 | | |||
173 | d->actionInvertColors = ac->addAction ("image_invert_colors"); | 175 | d->actionInvertColors = ac->addAction ("image_invert_colors"); | ||
174 | d->actionInvertColors->setText (i18n ("&Invert Colors")); | 176 | d->actionInvertColors->setText (i18n ("&Invert Colors")); | ||
175 | connect (d->actionInvertColors, SIGNAL (triggered(bool)), SLOT (slotInvertColors())); | 177 | connect (d->actionInvertColors, &QAction::triggered, this, &kpMainWindow::slotInvertColors); | ||
176 | ac->setDefaultShortcut (d->actionInvertColors, Qt::CTRL + Qt::Key_I); | 178 | ac->setDefaultShortcut (d->actionInvertColors, Qt::CTRL + Qt::Key_I); | ||
177 | 179 | | |||
178 | d->actionClear = ac->addAction ("image_clear"); | 180 | d->actionClear = ac->addAction ("image_clear"); | ||
179 | d->actionClear->setText (i18n ("C&lear")); | 181 | d->actionClear->setText (i18n ("C&lear")); | ||
180 | connect (d->actionClear, SIGNAL (triggered(bool)), SLOT (slotClear())); | 182 | connect (d->actionClear, &QAction::triggered, this, &kpMainWindow::slotClear); | ||
181 | ac->setDefaultShortcut (d->actionClear, Qt::CTRL + Qt::SHIFT + Qt::Key_N); | 183 | ac->setDefaultShortcut (d->actionClear, Qt::CTRL + Qt::SHIFT + Qt::Key_N); | ||
182 | 184 | | |||
183 | d->actionBlur = ac->addAction("image_make_confidential"); | 185 | d->actionBlur = ac->addAction("image_make_confidential"); | ||
184 | d->actionBlur->setText(i18n("Make Confidential")); | 186 | d->actionBlur->setText(i18n("Make Confidential")); | ||
185 | connect(d->actionBlur, SIGNAL(triggered(bool)), SLOT(slotMakeConfidential())); | 187 | connect(d->actionBlur, &QAction::triggered, this, &kpMainWindow::slotMakeConfidential); | ||
186 | 188 | | |||
187 | d->actionMoreEffects = ac->addAction ("image_more_effects"); | 189 | d->actionMoreEffects = ac->addAction ("image_more_effects"); | ||
188 | d->actionMoreEffects->setText (i18n ("&More Effects...")); | 190 | d->actionMoreEffects->setText (i18n ("&More Effects...")); | ||
189 | connect (d->actionMoreEffects, SIGNAL (triggered(bool)), SLOT (slotMoreEffects())); | 191 | connect (d->actionMoreEffects, &QAction::triggered, this, &kpMainWindow::slotMoreEffects); | ||
190 | ac->setDefaultShortcut (d->actionMoreEffects, Qt::CTRL + Qt::Key_M); | 192 | ac->setDefaultShortcut (d->actionMoreEffects, Qt::CTRL + Qt::Key_M); | ||
191 | 193 | | |||
192 | 194 | | |||
193 | enableImageMenuDocumentActions (false); | 195 | enableImageMenuDocumentActions (false); | ||
194 | } | 196 | } | ||
195 | 197 | | |||
196 | //--------------------------------------------------------------------- | 198 | //--------------------------------------------------------------------- | ||
197 | 199 | | |||
▲ Show 20 Lines • Show All 422 Lines • Show Last 20 Lines |