Skip to content

Commit 90c10d1

Browse files
author
g_j_m
committed
Apply patch (option 3) in ticket #66
git-svn-id: http://svn.osgeo.org/qgis/trunk@5404 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 321a922 commit 90c10d1

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

src/gui/qgisapp.cpp

+43-43
Original file line numberDiff line numberDiff line change
@@ -364,59 +364,59 @@ void QgisApp::createActions()
364364
// File Menu Related Items
365365
//
366366
mActionFileNew= new QAction(QIcon(myIconPath+"/mActionFileNew.png"), tr("&New Project"), this);
367-
mActionFileNew->setShortcut(tr("Ctrl+N"));
367+
mActionFileNew->setShortcut(tr("Ctrl+N","New Project"));
368368
mActionFileNew->setStatusTip(tr("New Project"));
369369
connect(mActionFileNew, SIGNAL(triggered()), this, SLOT(fileNew()));
370370
//
371371
mActionFileOpen= new QAction(QIcon(myIconPath+"/mActionFileOpen.png"), tr("&Open Project..."), this);
372-
mActionFileOpen->setShortcut(tr("Ctrl+O"));
372+
mActionFileOpen->setShortcut(tr("Ctrl+O","Open a Project"));
373373
mActionFileOpen->setStatusTip(tr("Open a Project"));
374374
connect(mActionFileOpen, SIGNAL(triggered()), this, SLOT(fileOpen()));
375375
//
376376
mActionFileSave= new QAction(QIcon(myIconPath+"/mActionFileSave.png"), tr("&Save Project"), this);
377-
mActionFileSave->setShortcut(tr("Ctrl+O"));
378-
mActionFileSave->setStatusTip(tr("Open a Project"));
377+
mActionFileSave->setShortcut(tr("Ctrl+S","Save Project"));
378+
mActionFileSave->setStatusTip(tr("Save Project"));
379379
connect(mActionFileSave, SIGNAL(triggered()), this, SLOT(fileSave()));
380380
//
381381
mActionFileSaveAs= new QAction(QIcon(myIconPath+"/mActionFileSaveAs.png"), tr("Save Project &As..."), this);
382-
mActionFileSaveAs->setShortcut(tr("Ctrl+A"));
382+
mActionFileSaveAs->setShortcut(tr("Ctrl+A","Save Project under a new name"));
383383
mActionFileSaveAs->setStatusTip(tr("Save Project under a new name"));
384384
connect(mActionFileSaveAs, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
385385
//
386386
mActionFilePrint= new QAction(QIcon(myIconPath+"/mActionFilePrint.png"), tr("&Print..."), this);
387-
mActionFilePrint->setShortcut(tr("Ctrl+P"));
387+
mActionFilePrint->setShortcut(tr("Ctrl+P","Print"));
388388
mActionFilePrint->setStatusTip(tr("Print"));
389389
connect(mActionFilePrint, SIGNAL(triggered()), this, SLOT(filePrint()));
390390
//
391391
mActionSaveMapAsImage= new QAction(QIcon(myIconPath+"/mActionSaveMapAsImage.png"), tr("Save as Image..."), this);
392-
mActionSaveMapAsImage->setShortcut(tr("I"));
392+
mActionSaveMapAsImage->setShortcut(tr("Ctrl+I","Save map as image"));
393393
mActionSaveMapAsImage->setStatusTip(tr("Save map as image"));
394394
connect(mActionSaveMapAsImage, SIGNAL(triggered()), this, SLOT(saveMapAsImage()));
395395
//
396396
mActionExportMapServer= new QAction(QIcon(myIconPath+"/mActionExportMapServer.png"), tr("Export to MapServer Map..."), this);
397-
mActionExportMapServer->setShortcut(tr("M"));
397+
mActionExportMapServer->setShortcut(tr("M","Export as MapServer .map file"));
398398
mActionExportMapServer->setStatusTip(tr("Export as MapServer .map file"));
399399
connect(mActionExportMapServer, SIGNAL(triggered()), this, SLOT(exportMapServer()));
400400
//
401401
mActionFileExit= new QAction(QIcon(myIconPath+"/mActionFileExit.png"), tr("Exit"), this);
402-
mActionFileExit->setShortcut(tr("Ctrl+Q"));
402+
mActionFileExit->setShortcut(tr("Ctrl+Q","Exit QGIS"));
403403
mActionFileExit->setStatusTip(tr("Exit QGIS"));
404404
connect(mActionFileExit, SIGNAL(triggered()), this, SLOT(fileExit()));
405405
//
406406
// Layer Menu Related Items
407407
//
408408
mActionAddNonDbLayer= new QAction(QIcon(myIconPath+"/mActionAddNonDbLayer.png"), tr("Add a Vector Layer..."), this);
409-
mActionAddNonDbLayer->setShortcut(tr("V"));
409+
mActionAddNonDbLayer->setShortcut(tr("V","Add a Vector Layer"));
410410
mActionAddNonDbLayer->setStatusTip(tr("Add a Vector Layer"));
411411
connect(mActionAddNonDbLayer, SIGNAL(triggered()), this, SLOT(addLayer()));
412412
//
413413
mActionAddRasterLayer= new QAction(QIcon(myIconPath+"/mActionAddRasterLayer.png"), tr("Add a Raster Layer..."), this);
414-
mActionAddRasterLayer->setShortcut(tr("R"));
414+
mActionAddRasterLayer->setShortcut(tr("R","Add a Raster Layer"));
415415
mActionAddRasterLayer->setStatusTip(tr("Add a Raster Layer"));
416416
assert(connect(mActionAddRasterLayer, SIGNAL(triggered()), this, SLOT(addRasterLayer())));
417417
//
418418
mActionAddLayer= new QAction(QIcon(myIconPath+"/mActionAddLayer.png"), tr("Add a PostGIS Layer..."), this);
419-
mActionAddLayer->setShortcut(tr("D"));
419+
mActionAddLayer->setShortcut(tr("D","Add a PostGIS Layer"));
420420
mActionAddLayer->setStatusTip(tr("Add a PostGIS Layer"));
421421
//#ifdef HAVE_POSTGRESQL
422422
// std::cout << "HAVE_POSTGRESQL is defined" << std::endl;
@@ -428,66 +428,66 @@ void QgisApp::createActions()
428428
assert(connect(mActionAddLayer, SIGNAL(triggered()), this, SLOT(addDatabaseLayer())));
429429
//
430430
mActionNewVectorLayer= new QAction(QIcon(myIconPath+"/mActionNewVectorLayer.png"), tr("New Vector Layer..."), this);
431-
mActionNewVectorLayer->setShortcut(tr("N"));
431+
mActionNewVectorLayer->setShortcut(tr("N","Create a New Vector Layer"));
432432
mActionNewVectorLayer->setStatusTip(tr("Create a New Vector Layer"));
433433
connect(mActionNewVectorLayer, SIGNAL(triggered()), this, SLOT(newVectorLayer()));
434434
//
435435
mActionRemoveLayer= new QAction(QIcon(myIconPath+"/mActionRemoveLayer.png"), tr("Remove Layer"), this);
436-
mActionRemoveLayer->setShortcut(tr("Ctrl+D"));
436+
mActionRemoveLayer->setShortcut(tr("Ctrl+D","Remove a Layer"));
437437
mActionRemoveLayer->setStatusTip(tr("Remove a Layer"));
438438
connect(mActionRemoveLayer, SIGNAL(triggered()), this, SLOT(removeLayer()));
439439
//
440440
mActionAddAllToOverview= new QAction(QIcon(myIconPath+"/mActionAddAllToOverview.png"), tr("Add All To Overview"), this);
441-
mActionAddAllToOverview->setShortcut(tr("+"));
441+
mActionAddAllToOverview->setShortcut(tr("+","Show all layers in the overview map"));
442442
mActionAddAllToOverview->setStatusTip(tr("Show all layers in the overview map"));
443443
connect(mActionAddAllToOverview, SIGNAL(triggered()), this, SLOT(addAllToOverview()));
444444
//
445445
mActionRemoveAllFromOverview= new QAction(QIcon(myIconPath+"/mActionRemoveAllFromOverview.png"), tr("Remove All From Overview"), this);
446-
mActionRemoveAllFromOverview->setShortcut(tr("-"));
446+
mActionRemoveAllFromOverview->setShortcut(tr("-","Remove all layers from overview map"));
447447
mActionRemoveAllFromOverview->setStatusTip(tr("Remove all layers from overview map"));
448448
connect(mActionRemoveAllFromOverview, SIGNAL(triggered()), this, SLOT(removeAllFromOverview()));
449449
//
450450
mActionShowAllLayers= new QAction(QIcon(myIconPath+"/mActionShowAllLayers.png"), tr("Show All Layers"), this);
451-
mActionShowAllLayers->setShortcut(tr("S"));
451+
mActionShowAllLayers->setShortcut(tr("S","Show all layers"));
452452
mActionShowAllLayers->setStatusTip(tr("Show all layers"));
453453
connect(mActionShowAllLayers, SIGNAL(triggered()), this, SLOT(showAllLayers()));
454454
//
455455
mActionHideAllLayers= new QAction(QIcon(myIconPath+"/mActionHideAllLayers.png"), tr("Hide All Layers"), this);
456-
mActionHideAllLayers->setShortcut(tr("H"));
456+
mActionHideAllLayers->setShortcut(tr("H","Hide all layers"));
457457
mActionHideAllLayers->setStatusTip(tr("Hide all layers"));
458458
connect(mActionHideAllLayers, SIGNAL(triggered()), this, SLOT(hideAllLayers()));
459459
//
460460
// Settings Menu Related Items
461461
//
462462
mActionProjectProperties= new QAction(QIcon(myIconPath+"/mActionProjectProperties.png"), tr("Project Properties..."), this);
463-
mActionProjectProperties->setShortcut(tr("Alt+P"));
463+
mActionProjectProperties->setShortcut(tr("P","Set project properties"));
464464
mActionProjectProperties->setStatusTip(tr("Set project properties"));
465465
connect(mActionProjectProperties, SIGNAL(triggered()), this, SLOT(projectProperties()));
466466
//
467467
mActionOptions= new QAction(QIcon(myIconPath+"/mActionOptions.png"), tr("Options..."), this);
468-
mActionOptions->setShortcut(tr("Alt+O"));
468+
// mActionOptions->setShortcut(tr("Alt+O","Change various QGIS options"));
469469
mActionOptions->setStatusTip(tr("Change various QGIS options"));
470470
connect(mActionOptions, SIGNAL(triggered()), this, SLOT(options()));
471471
//
472472
mActionCustomProjection= new QAction(QIcon(myIconPath+"/mActionCustomProjection.png"), tr("Custom Projection..."), this);
473-
mActionCustomProjection->setShortcut(tr("Alt+I"));
473+
// mActionCustomProjection->setShortcut(tr("Alt+I","Manage custom projections"));
474474
mActionCustomProjection->setStatusTip(tr("Manage custom projections"));
475475
connect(mActionCustomProjection, SIGNAL(triggered()), this, SLOT(customProjection()));
476476
//
477477
// Help Menu Related items
478478
//
479479
mActionHelpContents= new QAction(QIcon(myIconPath+"/mActionHelpContents.png"), tr("Help Contents"), this);
480-
mActionHelpContents->setShortcut(tr("F1"));
480+
mActionHelpContents->setShortcut(tr("F1","Help Documentation"));
481481
mActionHelpContents->setStatusTip(tr("Help Documentation"));
482482
connect(mActionHelpContents, SIGNAL(triggered()), this, SLOT(helpContents()));
483483
//
484484
mActionQgisHomePage= new QAction(QIcon(myIconPath+"/mActionQgisHomePage.png"), tr("Qgis Home Page"), this);
485-
mActionQgisHomePage->setShortcut(tr("Ctrl+H"));
485+
mActionQgisHomePage->setShortcut(tr("Ctrl+H","QGIS Home Page"));
486486
mActionQgisHomePage->setStatusTip(tr("QGIS Home Page"));
487487
connect(mActionQgisHomePage, SIGNAL(triggered()), this, SLOT(helpQgisHomePage()));
488488
//
489489
mActionQgisSourceForgePage= new QAction(QIcon(myIconPath+"/mActionQgisSourceForgePage.png"), tr("Qgis Sourceforge"), this);
490-
mActionQgisSourceForgePage->setShortcut(tr("Alt+H"));
490+
// mActionQgisSourceForgePage->setShortcut(tr("Alt+H","Visit QGIS SourceForge page"));
491491
mActionQgisSourceForgePage->setStatusTip(tr("Visit QGIS SourceForge page"));
492492
connect(mActionQgisSourceForgePage, SIGNAL(triggered()), this, SLOT(helpQgisSourceForge()));
493493
//
@@ -502,27 +502,27 @@ void QgisApp::createActions()
502502
// View Menu Items
503503
//
504504
mActionDraw= new QAction(QIcon(myIconPath+"/mActionDraw.png"), tr("Refresh"), this);
505-
mActionDraw->setShortcut(tr("Ctrl+R"));
505+
mActionDraw->setShortcut(tr("Ctrl+R","Refresh Map"));
506506
mActionDraw->setStatusTip(tr("Refresh Map"));
507507
connect(mActionDraw, SIGNAL(triggered()), this, SLOT(refreshMapCanvas()));
508508
//
509509
mActionZoomIn= new QAction(QIcon(myIconPath+"/mActionZoomIn.png"), tr("Zoom In"), this);
510-
mActionZoomIn->setShortcut(tr("z"));
510+
mActionZoomIn->setShortcut(tr("Ctrl++","Zoom In"));
511511
mActionZoomIn->setStatusTip(tr("Zoom In"));
512512
connect(mActionZoomIn, SIGNAL(triggered()), this, SLOT(zoomIn()));
513513
//
514514
mActionZoomOut= new QAction(QIcon(myIconPath+"/mActionZoomOut.png"), tr("Zoom Out"), this);
515-
mActionZoomOut->setShortcut(tr("Z"));
515+
mActionZoomOut->setShortcut(tr("Ctrl+-","Zoom Out"));
516516
mActionZoomOut->setStatusTip(tr("Zoom Out"));
517517
connect(mActionZoomOut, SIGNAL(triggered()), this, SLOT(zoomOut()));
518518
//
519519
mActionZoomFullExtent= new QAction(QIcon(myIconPath+"/mActionZoomFullExtent.png"), tr("Zoom Full"), this);
520-
mActionZoomFullExtent->setShortcut(tr("f"));
520+
mActionZoomFullExtent->setShortcut(tr("F","Zoom to Full Extents"));
521521
mActionZoomFullExtent->setStatusTip(tr("Zoom to Full Extents"));
522522
connect(mActionZoomFullExtent, SIGNAL(triggered()), this, SLOT(zoomFull()));
523523
//
524524
mActionZoomToSelected= new QAction(QIcon(myIconPath+"/mActionZoomToSelected.png"), tr("Zoom To Selection"), this);
525-
mActionZoomToSelected->setShortcut(tr("F"));
525+
mActionZoomToSelected->setShortcut(tr("Ctrl+F","Zoom to selection"));
526526
mActionZoomToSelected->setStatusTip(tr("Zoom to selection"));
527527
connect(mActionZoomToSelected, SIGNAL(triggered()), this, SLOT(zoomToSelected()));
528528
//
@@ -531,17 +531,17 @@ void QgisApp::createActions()
531531
connect(mActionPan, SIGNAL(triggered()), this, SLOT(pan()));
532532
//
533533
mActionZoomLast= new QAction(QIcon(myIconPath+"/mActionZoomLast.png"), tr("Zoom Last"), this);
534-
//mActionZoomLast->setShortcut(tr("Ctrl+O"));
534+
//mActionZoomLast->setShortcut(tr("Ctrl+O","Zoom to Last Extent"));
535535
mActionZoomLast->setStatusTip(tr("Zoom to Last Extent"));
536536
connect(mActionZoomLast, SIGNAL(triggered()), this, SLOT(zoomPrevious()));
537537
//
538538
mActionZoomToLayer= new QAction(QIcon(myIconPath+"/mActionZoomToLayer.png"), tr("Zoom To Layer"), this);
539-
//mActionZoomToLayer->setShortcut(tr("Ctrl+O"));
539+
//mActionZoomToLayer->setShortcut(tr("Ctrl+O","Zoom to Layer"));
540540
mActionZoomToLayer->setStatusTip(tr("Zoom to Layer"));
541541
connect(mActionZoomToLayer, SIGNAL(triggered()), this, SLOT(zoomToLayerExtent()));
542542
//
543543
mActionIdentify= new QAction(QIcon(myIconPath+"/mActionIdentify.png"), tr("Identify Features"), this);
544-
mActionIdentify->setShortcut(tr("I"));
544+
mActionIdentify->setShortcut(tr("I","Click on features to identify them"));
545545
mActionIdentify->setStatusTip(tr("Click on features to identify them"));
546546
connect(mActionIdentify, SIGNAL(triggered()), this, SLOT(identify()));
547547
//
@@ -550,44 +550,44 @@ void QgisApp::createActions()
550550
connect(mActionSelect, SIGNAL(triggered()), this, SLOT(select()));
551551
//
552552
mActionOpenTable= new QAction(QIcon(myIconPath+"/mActionOpenTable.png"), tr("Open Table"), this);
553-
//mActionOpenTable->setShortcut(tr("Ctrl+O"));
553+
//mActionOpenTable->setShortcut(tr("Ctrl+O","Open Table"));
554554
mActionOpenTable->setStatusTip(tr("Open Table"));
555555
connect(mActionOpenTable, SIGNAL(triggered()), this, SLOT(attributeTable()));
556556
//
557557
mActionMeasure= new QAction(QIcon(myIconPath+"/mActionMeasure.png"), tr("Measure Line "), this);
558-
mActionMeasure->setShortcut(tr("Ctrl+M"));
558+
mActionMeasure->setShortcut(tr("Ctrl+M","Measure a Line"));
559559
mActionMeasure->setStatusTip(tr("Measure a Line"));
560560
connect(mActionMeasure, SIGNAL(triggered()), this, SLOT(measure()));
561561
//
562562
mActionMeasureArea= new QAction(QIcon(myIconPath+"/mActionMeasureArea.png"), tr("Measure Area"), this);
563-
mActionMeasureArea->setShortcut(tr("Alt+M"));
563+
mActionMeasureArea->setShortcut(tr("Ctrl+J","Measure an Area"));
564564
mActionMeasureArea->setStatusTip(tr("Measure an Area"));
565565
connect(mActionMeasureArea, SIGNAL(triggered()), this, SLOT(measureArea()));
566566
//
567567
mActionShowBookmarks= new QAction(QIcon(myIconPath+"/mActionShowBookmarks.png"), tr("Show Bookmarks"), this);
568-
mActionShowBookmarks->setShortcut(tr("Ctrl+B"));
568+
mActionShowBookmarks->setShortcut(tr("B","Show Bookmarks"));
569569
mActionShowBookmarks->setStatusTip(tr("Show Bookmarks"));
570570
connect(mActionShowBookmarks, SIGNAL(triggered()), this, SLOT(showBookmarks()));
571571
//
572572
mActionNewBookmark= new QAction(QIcon(myIconPath+"/mActionNewBookmark.png"), tr("New Bookmark..."), this);
573-
mActionNewBookmark->setShortcut(tr("Alt+B"));
573+
mActionNewBookmark->setShortcut(tr("Ctrl+B","New Bookmark"));
574574
mActionNewBookmark->setStatusTip(tr("New Bookmark"));
575575
connect(mActionNewBookmark, SIGNAL(triggered()), this, SLOT(newBookmark()));
576576
//
577577
mActionAddWmsLayer= new QAction(QIcon(myIconPath+"/mActionAddWmsLayer.png"), tr("Add WMS Layer..."), this);
578-
mActionAddWmsLayer->setShortcut(tr("Ctrl+M"));
578+
mActionAddWmsLayer->setShortcut(tr("W","Add Web Mapping Server Layer"));
579579
mActionAddWmsLayer->setStatusTip(tr("Add Web Mapping Server Layer"));
580580
connect(mActionAddWmsLayer, SIGNAL(triggered()), this, SLOT(addWmsLayer()));
581581
//
582582
mActionInOverview= new QAction(QIcon(myIconPath+"/mActionInOverview.png"), tr("In Overview"), this);
583-
mActionInOverview->setShortcut(tr("Alt+O"));
583+
mActionInOverview->setShortcut(tr("O","Add current layer to overview map"));
584584
mActionInOverview->setStatusTip(tr("Add current layer to overview map"));
585585
connect(mActionInOverview, SIGNAL(triggered()), this, SLOT(inOverview()));
586586
//
587587
// Plugin Menu Related Items
588588
//
589589
mActionShowPluginManager= new QAction(QIcon(myIconPath+"/mActionShowPluginManager.png"), tr("Plugin Manager..."), this);
590-
mActionShowPluginManager->setShortcut(tr("Ctrl+P"));
590+
// mActionShowPluginManager->setShortcut(tr("Ctrl+P","Open the plugin manager"));
591591
mActionShowPluginManager->setStatusTip(tr("Open the plugin manager"));
592592
connect(mActionShowPluginManager, SIGNAL(triggered()), this, SLOT(showPluginManager()));
593593
//
@@ -603,17 +603,17 @@ void QgisApp::createActions()
603603
mActionStopEditing = new QAction(QIcon(myIconPath+"/mActionStopEditing.png"), tr("Stop Editing"), this);
604604
connect(mActionStopEditing, SIGNAL(triggered()), this, SLOT(stopEditing()));
605605
mActionCapturePoint= new QAction(QIcon(myIconPath+"/mActionCapturePoint.png"), tr("Capture Point"), this);
606-
mActionCapturePoint->setShortcut(tr("."));
606+
mActionCapturePoint->setShortcut(tr(".","Capture Points"));
607607
mActionCapturePoint->setStatusTip(tr("Capture Points"));
608608
connect(mActionCapturePoint, SIGNAL(triggered()), this, SLOT(capturePoint()));
609609
//
610610
mActionCaptureLine= new QAction(QIcon(myIconPath+"/mActionCaptureLine.png"), tr("Capture Line"), this);
611-
mActionCaptureLine->setShortcut(tr("/"));
611+
mActionCaptureLine->setShortcut(tr("/","Capture Lines"));
612612
mActionCaptureLine->setStatusTip(tr("Capture Lines"));
613613
connect(mActionCaptureLine, SIGNAL(triggered()), this, SLOT(captureLine()));
614614
//
615615
mActionCapturePolygon= new QAction(QIcon(myIconPath+"/mActionCapturePolygon.png"), tr("Capture Polygon"), this);
616-
mActionCapturePolygon->setShortcut(tr("Ctrl+/"));
616+
mActionCapturePolygon->setShortcut(tr("Ctrl+/","Capture Polygons"));
617617
mActionCapturePolygon->setStatusTip(tr("Capture Polygons"));
618618
connect(mActionCapturePolygon, SIGNAL(triggered()), this, SLOT(capturePolygon()));
619619
//

0 commit comments

Comments
 (0)