Commit 4b19a0fc authored by Adrian Page's avatar Adrian Page

Adapt to new kdelibs api.

svn path=/trunk/koffice/; revision=528418
parent 0390c5f8
......@@ -169,7 +169,7 @@ void KisToolEllipse::setup(KActionCollection *collection)
if (m_action == 0) {
KShortcut shortcut(Qt::Key_Plus);
shortcut.append(KKeySequence(Qt::Key_F7));
shortcut.append(Qt::Key_F7);
m_action = new KAction(i18n("&Ellipse"),
"tool_ellipse",
shortcut,
......
......@@ -132,7 +132,7 @@ void KisToolSelectBrush::setup(KActionCollection *collection)
if (m_action == 0) {
m_action = new KAction(i18n("&Selection Brush"),
"tool_brush_selection", "Ctrl+Shift+B", this,
"tool_brush_selection", Qt::CTRL+Qt::SHIFT+Qt::Key_B, this,
SLOT(activate()), collection,
name());
Q_CHECK_PTR(m_action);
......
......@@ -116,7 +116,7 @@ void KisToolSelectEraser::setup(KActionCollection *collection)
if (m_action == 0) {
m_action = new KAction(i18n("Selection &Eraser"),
"tool_eraser_selection", "Ctrl+Shift+E", this,
"tool_eraser_selection", Qt::CTRL+Qt::SHIFT+Qt::Key_E, this,
SLOT(activate()), collection,
name());
Q_CHECK_PTR(m_action);
......
......@@ -224,7 +224,7 @@ void KisToolPolygon::setup(KActionCollection *collection)
if (m_action == 0) {
KShortcut shortcut(Qt::Key_Plus);
shortcut.append(KKeySequence(Qt::Key_F9));
shortcut.append(Qt::Key_F9);
m_action = new KAction(i18n("&Polygon"),
"tool_polygon",
......
......@@ -239,7 +239,7 @@ void KisToolPolyline::setup(KActionCollection *collection)
if (m_action == 0) {
KShortcut shortcut(Qt::Key_Plus);
shortcut.append(KKeySequence(Qt::Key_F9));
shortcut.append(Qt::Key_F9);
m_action = new KAction(i18n("&Polyline"),
"polyline",
shortcut,
......
......@@ -199,7 +199,7 @@ void KisToolSelectSimilar::setup(KActionCollection *collection)
m_action = collection->action(name());
if (m_action == 0) {
m_action = new KAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, SLOT(activate()), collection, name());
m_action = new KAction(i18n("&Similar Selection"), "tool_similar_selection", Qt::CTRL+Qt::Key_E, this, SLOT(activate()), collection, name());
Q_CHECK_PTR(m_action);
m_action->setToolTip(i18n("Select similar colors"));
m_action->setActionGroup(actionGroup());
......
......@@ -181,7 +181,7 @@ void KisToolStar::setup(KActionCollection *collection)
if (m_action == 0) {
KShortcut shortcut(Qt::Key_Plus);
shortcut.append(KKeySequence(Qt::Key_F9));
shortcut.append(Qt::Key_F9);
m_action = new KAction(i18n("&Star"),
"tool_star",
shortcut,
......
......@@ -104,14 +104,15 @@ KSnapshot::KSnapshot(QWidget *parent, const char *name)
connect( &grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) );
KAccel* accel = new KAccel(this);
Q_CHECK_PTR(accel);
accel->insert(KStdAccel::Print, this, SLOT(slotPrint()));
accel->insert(KStdAccel::New, this, SLOT(slotGrab()));
accel->insert( "Print2", Qt::Key_P, this, SLOT(slotPrint()));
accel->insert( "New2", Qt::Key_N, this, SLOT(slotGrab()));
accel->insert( "New3", Qt::Key_Space, this, SLOT(slotGrab()));
#warning kde4 port
// KAccel* accel = new KAccel(this);
// Q_CHECK_PTR(accel);
// accel->insert(KStdAccel::Print, this, SLOT(slotPrint()));
// accel->insert(KStdAccel::New, this, SLOT(slotGrab()));
//
// accel->insert( "Print2", Qt::Key_P, this, SLOT(slotPrint()));
// accel->insert( "New2", Qt::Key_N, this, SLOT(slotGrab()));
// accel->insert( "New3", Qt::Key_Space, this, SLOT(slotGrab()));
mainWidget->btnNew->setFocus();
}
......
......@@ -20,7 +20,7 @@
#ifndef _KIS_AUTOGRADIENT_H_
#define _KIS_AUTOGRADIENT_H_
#include "wdgautogradient.h"
#include "ui_wdgautogradient.h"
class KisResource;
class KisGradientSegment;
......
......@@ -21,7 +21,7 @@
#include <kdialogbase.h>
#include <kis_types.h>
#include "wdgnewimage.h"
#include "ui_wdgnewimage.h"
class Q3ButtonGroup;
class KisID;
......
......@@ -66,8 +66,8 @@
#include "kis_canvas.h"
#include "wdgcolorsettings.h"
#include "wdgperformancesettings.h"
#include "wdggeneralsettings.h"
#include "ui_wdgperformancesettings.h"
#include "ui_wdggeneralsettings.h"
// for the performance update
#include "tiles/kis_tilemanager.h"
......
......@@ -29,12 +29,12 @@
#include "kis_canvas.h"
#include "wdggeneralsettings.h"
#include "ui_wdggeneralsettings.h"
#include "wdgtabletsettings.h"
#include "wdgtabletdevicesettings.h"
#include "wdgperformancesettings.h"
#include "ui_wdgperformancesettings.h"
#include "wdgdisplaysettings.h"
#include "wdggridsettings.h"
#include "ui_wdggridsettings.h"
class QLineEdit;
class QCheckBox;
......
......@@ -153,7 +153,7 @@ void KisFilterManager::setup(KActionCollection * ac)
}
m_reapplyAction = new KAction(i18n("Apply Filter Again"),
"Ctrl+Shift+F",
Qt::CTRL+Qt::SHIFT+Qt::Key_F,
this, SLOT(slotApply()),
ac, "filter_apply_again");
......
......@@ -51,17 +51,17 @@ KisGridManager::~KisGridManager()
void KisGridManager::setup(KActionCollection * collection)
{
m_toggleGrid = new KToggleAction(i18n("Show Grid"), "", this, SLOT(toggleGrid()), collection, "view_toggle_grid");
m_toggleGrid = new KToggleAction(i18n("Show Grid"), 0, this, SLOT(toggleGrid()), collection, "view_toggle_grid");
m_toggleGrid->setCheckedState(KGuiItem(i18n("Hide Grid")));
m_toggleGrid->setChecked(false);
// Fast grid config
m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, "", this, SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1");
m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, "", this, SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2");
m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, "", this, SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5");
m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, "", this, SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10");
m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, "", this, SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20");
m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, "", this, SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40");
m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, 0, this, SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1");
m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, 0, this, SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2");
m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, 0, this, SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5");
m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, 0, this, SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10");
m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, 0, this, SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20");
m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, 0, this, SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40");
}
void KisGridManager::updateGUI()
......
......@@ -139,39 +139,39 @@ void KisSelectionManager::setup(KActionCollection * collection)
"clear");
m_reselect = new KAction(i18n("&Reselect"),
0, "Ctrl+Shift+D",
0, Qt::CTRL+Qt::SHIFT+Qt::Key_D,
this, SLOT(reselect()),
collection, "reselect");
m_invert = new KAction(i18n("&Invert"),
0, "Ctrl+I",
0, Qt::CTRL+Qt::Key_I,
this, SLOT(invert()),
collection, "invert");
m_toNewLayer = new KAction(i18n("Copy Selection to New Layer"),
0, "Ctrl+J",
0, Qt::CTRL+Qt::Key_J,
this, SLOT(copySelectionToNewLayer()),
collection, "copy_selection_to_new_layer");
m_cutToNewLayer = new KAction(i18n("Cut Selection to New Layer"),
0, "Ctrl+Shift+J",
0, Qt::CTRL+Qt::SHIFT+Qt::Key_J,
this, SLOT(cutToNewLayer()),
collection, "cut_selection_to_new_layer");
m_feather = new KAction(i18n("Feather"),
0, "Ctrl+Alt+D",
0, Qt::CTRL+Qt::ALT+Qt::Key_D,
this, SLOT(feather()),
collection, "feather");
m_fillForegroundColor = new KAction(i18n("Fill with Foreground Color"),
"Alt+backspace", this,
Qt::ALT+Qt::Key_Backspace, this,
SLOT(fillForegroundColor()),
collection,
"fill_selection_foreground_color");
m_fillBackgroundColor = new KAction(i18n("Fill with Background Color"),
"backspace", this,
Qt::Key_Backspace, this,
SLOT(fillBackgroundColor()),
collection,
"fill_selection_background_color");
......@@ -181,7 +181,7 @@ void KisSelectionManager::setup(KActionCollection * collection)
collection,
"fill_selection_pattern");
m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), "Ctrl+h", this, SLOT(toggleDisplaySelection()), collection, "toggle_display_selection");
m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), Qt::CTRL+Qt::Key_H, this, SLOT(toggleDisplaySelection()), collection, "toggle_display_selection");
m_toggleDisplaySelection->setCheckedState(KGuiItem(i18n("Hide Selection")));
m_toggleDisplaySelection->setChecked(true);
......
......@@ -627,13 +627,13 @@ void KisView::setupActions()
// view actions
m_zoomIn = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection(), "zoom_in");
m_zoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection(), "zoom_out");
m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, SLOT(slotActualPixels()), actionCollection(), "actual_pixels");
m_actualPixels = new KAction(i18n("Actual Pixels"), Qt::CTRL+Qt::Key_0, this, SLOT(slotActualPixels()), actionCollection(), "actual_pixels");
m_actualSize = KStdAction::actualSize(this, SLOT(slotActualSize()), actionCollection(), "actual_size");
m_actualSize->setEnabled(false);
m_fitToCanvas = KStdAction::fitToPage(this, SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas");
// layer actions
m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, SLOT(layerAdd()), actionCollection(), "insert_layer");
m_layerAdd = new KAction(i18n("&Add..."), Qt::CTRL+Qt::SHIFT+Qt::Key_N, this, SLOT(layerAdd()), actionCollection(), "insert_layer");
m_actionPartLayer = new KoPartSelectAction( i18n( "&Object Layer" ), "frame_query",
this, SLOT( addPartLayer() ),
......@@ -648,24 +648,24 @@ void KisView::setupActions()
m_layerRm = new KAction(i18n("&Remove"), 0, this, SLOT(layerRemove()), actionCollection(), "remove_layer");
m_layerDup = new KAction(i18n("Duplicate"), 0, this, SLOT(layerDuplicate()), actionCollection(), "duplicate_layer");
m_layerHide = new KAction(i18n("&Hide/Show"), 0, this, SLOT(layerToggleVisible()), actionCollection(), "hide_layer");
m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, SLOT(layerRaise()), actionCollection(), "raiselayer");
m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, SLOT(layerLower()), actionCollection(), "lowerlayer");
m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, SLOT(layerFront()), actionCollection(), "toplayer");
m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, SLOT(layerBack()), actionCollection(), "bottomlayer");
m_layerRaise = new KAction(i18n("Raise"), "raise", Qt::CTRL+Qt::Key_BracketRight, this, SLOT(layerRaise()), actionCollection(), "raiselayer");
m_layerLower = new KAction(i18n("Lower"), "lower", Qt::CTRL+Qt::Key_BracketLeft, this, SLOT(layerLower()), actionCollection(), "lowerlayer");
m_layerTop = new KAction(i18n("To Top"), "bring_forward", Qt::CTRL+Qt::SHIFT+Qt::Key_BracketRight, this, SLOT(layerFront()), actionCollection(), "toplayer");
m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", Qt::CTRL+Qt::SHIFT+Qt::Key_BracketLeft, this, SLOT(layerBack()), actionCollection(), "bottomlayer");
m_layerProperties = new KAction(i18n("Properties..."), 0, this, SLOT(layerProperties()), actionCollection(), "layer_properties");
(void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer");
m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image");
m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", 0, this, SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image");
(void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX");
(void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY");
// image actions
m_imgFlatten = new KAction(i18n("&Flatten image"), "Ctrl+Shift+E", this, SLOT(flattenImage()), actionCollection(), "flatten_image");
m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, SLOT(mergeLayer()), actionCollection(), "merge_layer");
m_imgFlatten = new KAction(i18n("&Flatten image"), Qt::CTRL+Qt::SHIFT+Qt::Key_E, this, SLOT(flattenImage()), actionCollection(), "flatten_image");
m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), Qt::CTRL+Qt::Key_E, this, SLOT(mergeLayer()), actionCollection(), "merge_layer");
// setting actions
KStdAction::preferences(this, SLOT(preferences()), actionCollection(), "preferences");
m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, SLOT( showRuler() ), actionCollection(), "view_ruler" );
m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), Qt::CTRL+Qt::Key_R, this, SLOT( showRuler() ), actionCollection(), "view_ruler" );
m_RulerAction->setChecked(cfg.showRulers());
m_RulerAction->setCheckedState(i18n("Hide Rulers"));
m_RulerAction->setWhatsThis( i18n("The rulers show the horizontal and vertical positions of the mouse on the image "
......
......@@ -31,7 +31,7 @@
#include <KoPoint.h>
#include <KoRect.h>
#include "wdgbirdeye.h"
#include "ui_wdgbirdeye.h"
class QPixmap;
class KAction;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment