コード例 #1
0
ファイル: qgstipfactory.cpp プロジェクト: Aladar64/QGIS
QgsTipFactory::QgsTipFactory() : QObject()
{
  // I'm just doing this in a simple way so
  // its easy for translators...later
  // it its worth the time I'll move this data
  // into a sqlite database...
  QgsTip myTip;
  myTip.setTitle( tr( "QGIS is open source" ) );
  myTip.setContent( tr( "QGIS is open source software."
                        " This means that the software source code can be freely viewed"
                        " and modified. The GPL places a restriction that any modifications"
                        " you make must be made available in source form to whoever you give"
                        " modified versions to, and that you can not create a new version of"
                        " QGIS under a 'closed source' license. Visit"
                        " <a href=\"http://qgis.org\"> the QGIS home page (http://qgis.org)</a>"
                        " for more information."
                      ) );
  addGenericTip( myTip );
  //
  myTip.setTitle( tr( "QGIS Publications" ) );
  myTip.setContent( tr( "If you write a scientific paper or any other article"
                        " that refers to QGIS we would love to include your work"
                        " in the <a href=\"http://qgis.org/en/site/about/case_studies/index.html\">case studies section</a> of"
                        " the QGIS home page."
                      ) );
  addGenericTip( myTip );
  myTip.setTitle( tr( "Become an QGIS translator" ) );
  myTip.setContent( tr( "Would you like to see QGIS"
                        " in your native language? We are looking for more translators"
                        " and would appreciate your help! The translation process is"
                        " fairly straight forward - instructions are available in the"
                        " QGIS wiki"
                        " <a href=\"http://qgis.org/en/site/getinvolved/translate.html#howto-translate-gui\">translator's page.</a>"
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "QGIS Mailing lists" ) );
  myTip.setContent( tr( "If you need help using QGIS"
                        " we have a 'users'  mailing list where users help each other with issues"
                        " related to using our sofware. We also have a 'developers' mailing list."
                        " for those wanting help and to discuss things relating to the QGIS code base."
                        " Details on how to subscribe are in the <a href=\"http://qgis.org/en/site/forusers/support.html#mailing-lists\">community section</a> of"
                        " the QGIS home page."
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "Is it 'QGIS' or 'Quantum GIS'?" ) );
  myTip.setContent( tr( "Both used to be correct, but we recently decided to just use 'QGIS'.  For articles we suggest you write 'QGIS is ....'"
                      ) );
  addGenericTip( myTip );
  myTip.setTitle( tr( "How do I refer to QGIS?" ) );
  myTip.setContent( tr( "QGIS is spelled in all caps."
                        " We have various subprojects of the QGIS project"
                        " and it will help to avoid confusion if you refer to each by"
                        " its name:"
                        "<ul>"
                        "<li>QGIS Library - this is the C++ library that contains"
                        " the core logic that is used to build the QGIS user interface and other applications.</li>"
                        "<li>QGIS Application - this is the desktop application that you know and love so much :-).</li>"
                        "<li>QGIS Mapserver - this is a server-side application based on the QGIS Library"
                        " that will serve up your .qgs projects using the WMS protocol.</li>"
                        "</ul>"
                      ) );
  addGenericTip( myTip );
  // This tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Add the current date to a map layout" ) );
  myTip.setContent( tr( "You can add a current date variable to your map"
                        " layout. Create a regular text label and add the string"
                        " $CURRENT_DATE(yyyy-MM-dd) to the text box. See the"
                        " <a href=\"http://qt-project.org/doc/qt-5.0/qtcore/qdate.html#toString\">"
                        "QDate::toString format documentation</a> for the possible date formats."
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "Moving Elements and Maps in the Print Composer" ) );
  myTip.setContent( tr( "In the print composer tool bar you can find two buttons for moving"
                        " elements. The left one (right arrow icon) selects and moves elements"
                        " in the layout. After selecting the element with this tool you can also"
                        " move them around with the arrow keys. For accurate positioning use the"
                        " <strong>Position and Size</strong> section, which can be found in the"
                        " tab <strong>Item Properties -> Position and Size</strong>."
                        " The other move tool (map canvas icon with right arrow) allows one"
                        " to move the map content within a map frame."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Lock an element in the layout view" ) );
  myTip.setContent( tr( "By left clicking an element in the layout view you can"
                        " select it, by right clicking an element you can lock it. A lock symbol"
                        " will appear in the upper left corner of the selected element. This"
                        " prevents the element from accidentally being moved with the mouse. While"
                        " in a locked state, you cannot move an element with the mouse but you can"
                        " still move it with the arrow keys or by absolutely positioning it by"
                        " setting its <strong>Position and Size</strong>."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Rotating a map and linking a north arrow" ) );
  myTip.setContent( tr( "In the Print Composer you can rotate a map by setting its rotation value"
                        " in the tab <strong>Item Properties -> Map -> Main properties</strong> section."
                        " To place a north arrow in your layout you can use the"
                        " <strong>Add Image</strong> tool. After the selection and"
                        " placement of the north arrow in the layout you can link it"
                        " with a specific map frame by activating the <strong>Sync with map</strong>"
                        " checkbox and selecting a map frame. Whenever you change the rotation"
                        " value of a linked map, the north arrow will now automatically adjust"
                        " its rotation."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Numeric scale value in map layout linked to map frame" ) );
  myTip.setContent( tr( "If you want to place a text label as a placeholder for the"
                        " current scale, linked to a map frame, you need to place a scalebar and"
                        " set the style to 'Numeric'. You also need to select the map frame, if there"
                        " is more than one."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Using the mouse scroll wheel" ) );
  myTip.setContent( tr( "You can use the scroll wheel on your mouse to zoom in,"
                        " out and pan the map. Scroll forwards to zoom in, scroll backwards to"
                        " zoom out and press and hold the scroll wheel down to pan the map. You"
                        " can configure options for scroll wheel behaviour in the Options panel."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Stopping rendering" ) );
  myTip.setContent( tr( "Sometimes you have a very large dataset which takes ages"
                        " to draw. You can press 'Esc' (the escape key), or click the 'Stop"
                        " map rendering' icon in the status bar to the bottom of the window at any"
                        " time to halt rendering. If you are going to be performing several"
                        " actions (e.g. modifying symbology options) and wish to temporarily"
                        " disable map rendering while you do so, you can uncheck the 'Render'"
                        " checkbox in the bottom right of the status bar. Don't forget to check"
                        " it on again when you are ready to have the map draw itself again!"
                      ) );
  addGuiTip( myTip );
  // Tip contributed by Alister Hood
  myTip.setTitle( tr( "Join intersected polylines when rendering" ) );
  myTip.setContent( tr( "When applying layered styles to a polyline layer, you can join"
                        " intersecting lines together simply by enabling symbol levels."
                        " The image below shows a before (left) and after (right) view of"
                        " an intersection when symbol levels are enabled." ) +
                    QString( "<p><center><img src=\":/images/tips/symbol_levels.png\"/></center></p>" )
                  );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Auto-enable on the fly projection" ) );
  myTip.setContent( tr( "In the options dialog, under the CRS tab, you can set QGIS so that"
                        " whenever you create a new project, 'on the fly projection' is enabled"
                        " automatically and a pre-selected Coordinate Reference System of your"
                        " choice is used."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Sponsor QGIS" ) );
  myTip.setContent( tr( "If QGIS is saving you money or you like our work and"
                        " have the financial ability to help, please consider sponsoring the"
                        " development of QGIS. We use money from sponsors to pay for"
                        " travel and costs related to our regular hackfest meetings, and to generally"
                        " support the goals of our project. Please see the <a"
                        " href=\"http://qgis.org/en/site/getinvolved/governance/sponsorship/sponsorship.html\">QGIS Sponsorship Web"
                        " Page</a> for more details."
                      ) );
  addGenericTip( myTip );
  // by gsherman
  myTip.setTitle( tr( "QGIS has Plugins!" ) );
  myTip.setContent( tr( "QGIS has plugins that extend its functionality."
                        " QGIS ships with some core plugins you can explore from the"
                        " Plugins->Manage and Install Plugins menu. In addition there are a lot"
                        " of <a href=\"http://plugins.qgis.org/\">Python plugins </a>"
                        " contributed by the user community that can be"
                        " installed via this same menu. Don't miss out on all QGIS has to offer!"
                        " Check out the plugins and see what they can do for you."
                      ) );
  addGenericTip( myTip );

  /* Template for adding more tips
  myTip.setTitle(tr(""));
  myTip.setContent(tr(""
        ));
  addGuiTip(myTip);
  */
}
コード例 #2
0
ファイル: qgstipfactory.cpp プロジェクト: drnextgis/QGIS
QgsTipFactory::QgsTipFactory() : QObject()
{
  // I'm just doing this in a simple way so
  // its easy for translators...later
  // it its worth the time I'll move this data
  // into a sqlite database...
  QgsTip myTip;
  myTip.setTitle( tr( "QGIS is open source" ) );
  myTip.setContent( tr( "QGIS is open source software."
                        " This means that the software source code can be freely viewed"
                        " and modified. The GPL places a restriction that any modifications"
                        " you make must be made available in source form to whoever you give"
                        " modified versions to, and that you can not create a new version of"
                        " QGIS under a 'closed source' license. Visit"
                        " <a href=\"https://qgis.org\"> the QGIS home page</a>"
                        " for more information."
                      ) );
  addGenericTip( myTip );
  //
  myTip.setTitle( tr( "QGIS Publications" ) );
  myTip.setContent( tr( "If you write a scientific paper or any other article"
                        " that refers to QGIS we would love to include your work"
                        " in the <a href=\"https://qgis.org/en/site/about/case_studies/index.html\">case studies section</a> of"
                        " the QGIS home page."
                      ) );
  addGenericTip( myTip );
  myTip.setTitle( tr( "Become a QGIS translator" ) );
  myTip.setContent( tr( "Would you like to see QGIS"
                        " in your native language? We are looking for more translators"
                        " and would appreciate your help! The translation process is"
                        " fairly straight forward - instructions are available in the"
                        " QGIS wiki"
                        " <a href=\"https://qgis.org/en/site/getinvolved/translate.html#howto-translate-gui\">translator's page.</a>"
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "Getting Help With QGIS" ) );
  myTip.setContent( tr( "If you need help using QGIS"
                        " there is a 'users' mailing list where users help each other with issues"
                        " related to using QGIS. We also have a 'developers' mailing list"
                        " for those wanting help and discuss things relating to the QGIS code base."
                        " Details on different means to get help are described in the"
                        " <a href=\"https://qgis.org/en/site/forusers/support.html#mailing-lists\">community section</a> of the QGIS home page."
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "Is it 'QGIS' or 'Quantum GIS'?" ) );
  myTip.setContent( tr( "Both used to be correct, but we recently decided to just use 'QGIS'. For articles we suggest you write 'QGIS is ....'"
                      ) );
  addGenericTip( myTip );
  myTip.setTitle( tr( "How do I refer to QGIS?" ) );
  myTip.setContent( tr( "QGIS is spelled in all caps."
                        " We have various subprojects of the QGIS project"
                        " and it will help to avoid confusion if you refer to each by"
                        " its name:"
                        "<ul>"
                        "<li><strong>QGIS Library</strong> - this is the C++ library that contains"
                        " the core logic that is used to build the QGIS user interface and other applications.</li>"
                        "<li><strong>QGIS Desktop</strong> - this is the desktop application that you know and love so much :-).</li>"
                        "<li><strong>QGIS Server</strong> - this is a server-side application based on the QGIS Library"
                        " that will serve up your .qgs projects using OGC standard protocols.</li>"
                        "</ul>"
                      ) );
  addGenericTip( myTip );
  // This tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Add the current date to a map layout" ) );
  myTip.setContent( tr( "You can add a current date variable to your map"
                        " layout. Create a regular text label and add the string"
                        " $CURRENT_DATE(yyyy-MM-dd) to the text box. See the"
                        " <a href=\"https://doc.qt.io/qt-5.7/qdate.html#toString\">"
                        "QDate::toString format documentation</a> for the possible date formats."
                      ) );
  addGuiTip( myTip );
  myTip.setTitle( tr( "Moving Elements and Maps in the Print Composer" ) );
  myTip.setContent( tr( "In the print composer toolbar you can find two buttons for moving"
                        " elements. The first one ( <img src=\":/images/themes/default/mActionSelect.svg\"/> )"
                        " selects and moves elements in the layout. After selecting the element"
                        " with this tool you can also move them around with the arrow keys."
                        " For accurate positioning use the <strong>Position and Size</strong> section,"
                        " which can be found in the tab <strong>Item Properties -> Position and Size</strong>."
                        " The other move tool ( <img src=\":/images/themes/default/mActionMoveItemContent.svg\"/> )"
                        " allows you to move the map content within a map frame."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Lock an element in the layout view" ) );
  myTip.setContent( tr( "Locking an element in the layout view prevents you to select or accidentally"
                        " move it with the mouse. (Un)Locking an item is done by ticking its checkbox"
                        " in the <strong>Items</strong> tab. While in a locked state, you can"
                        " still get it selected from the <strong>Items</strong> tab, move it with the arrow keys"
                        " or configure any of its properties in the <strong>Item Properties</strong> tab"
                        " including precisely place it by setting its <strong>Position and Size</strong>."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Rotating a map and linking a north arrow" ) );
  myTip.setContent( tr( "In the Print Composer you can rotate a map by setting its rotation value"
                        " in the tab <strong>Item Properties -> Map -> Main properties</strong> section."
                        " To place a north arrow in your layout you can use the"
                        " <strong>Add Image</strong> tool. After the selection and"
                        " placement of the north arrow in the layout you can link it"
                        " with a specific map frame by activating the <strong>Sync with map</strong>"
                        " checkbox and selecting a map frame. Whenever you change the rotation"
                        " value of a linked map, the north arrow will now automatically adjust"
                        " its rotation."
                      ) );
  addGuiTip( myTip );
  // This  tip contributed by Andreas Neumann
  myTip.setTitle( tr( "Numeric scale value in map layout linked to map frame" ) );
  myTip.setContent( tr( "If you want to place a text label as a placeholder for the"
                        " current scale, linked to a map frame, you need to place a scalebar and"
                        " set the style to 'Numeric'. You also need to select the map frame, if there"
                        " is more than one."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Using the mouse scroll wheel" ) );
  myTip.setContent( tr( "You can use the scroll wheel on your mouse to zoom in,"
                        " out and pan the map. Scroll forwards to zoom in, scroll backwards to"
                        " zoom out and press and hold the scroll wheel down to pan the map. You"
                        " can configure the zoom scale factor in the <strong>Options -> Map tools</strong> panel."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Disabling rendering" ) );
  myTip.setContent( tr( "Sometimes you have a very large dataset which takes ages"
                        " to draw. If you are going to be performing several"
                        " actions (e.g. modifying symbology options) and wish to temporarily"
                        " disable map rendering while you do so, you can uncheck the 'Render'"
                        " checkbox in the bottom right of the status bar. Don't forget to check"
                        " it on again when you are ready to have the map draw itself again!"
                      ) );
  addGuiTip( myTip );
  // Tip contributed by Alister Hood
  myTip.setTitle( tr( "Join intersected polylines when rendering" ) );
  myTip.setContent( tr( "When applying layered styles to a polyline layer, you can join"
                        " intersecting lines together simply by enabling symbol levels."
                        " The image below shows a before (left) and after (right) view of"
                        " an intersection when symbol levels are enabled." ) +
                    QStringLiteral( "<p><center><img src=\":/images/tips/symbol_levels.png\"/></center></p>" )
                  );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Auto-enable on the fly projection" ) );
  myTip.setContent( tr( "In the options dialog, under the CRS tab, you can set QGIS so that"
                        " whenever you create a new project, 'on the fly projection' is enabled"
                        " automatically and a pre-selected Coordinate Reference System of your"
                        " choice is used."
                      ) );
  addGuiTip( myTip );
  // by Tim
  myTip.setTitle( tr( "Sponsor QGIS" ) );
  myTip.setContent( tr( "If QGIS is saving you money or you like our work and"
                        " have the financial ability to help, please consider sponsoring the"
                        " development of QGIS. We use money from sponsors to pay for"
                        " travel and costs related to our regular hackfest meetings, and to generally"
                        " support the goals of our project. Please see the <a"
                        " href=\"https://qgis.org/en/site/getinvolved/governance/sponsorship/sponsorship.html\">QGIS Sponsorship Web"
                        " Page</a> for more details."
                      ) );
  addGenericTip( myTip );
  // by gsherman
  myTip.setTitle( tr( "QGIS has Plugins!" ) );
  myTip.setContent( tr( "QGIS has plugins that extend its functionality."
                        " QGIS ships with some core plugins you can explore from the"
                        " <strong>Plugins -> Manage and Install</strong> Plugins menu. In addition there"
                        " are a lot of <a href=\"https://plugins.qgis.org/\">Python plugins </a>"
                        " contributed by the user community that can be"
                        " installed via this same menu. Don't miss out on all QGIS has to offer!"
                        " Check out the plugins and see what they can do for you."
                      ) );
  addGenericTip( myTip );
  // by yjacolin
  myTip.setTitle( tr( "Add an action to layer" ) );
  myTip.setContent( tr( "Action in a layer allows user to trigger action when clicking on a geometry"
                        " with 'Run Feature Action' tools."
                        "For example, you can open a HTML page using the field value of the geometry "
                        "as a parameter. Look at the <a href=\"https://docs.qgis.org/latest/en/docs/user_manual/working_with_vector/vector_properties.html?#actions-menu\">documentation</a>."
                      ) );
  addGuiTip( myTip );
  // by yjacolin
  myTip.setTitle( tr( "Copy, paste and cut in QGIS" ) );
  myTip.setContent( tr( "Copy, paste, and cut work as in another applications in QGIS. Select a "
                        "feature (a geometry or an attribut row in the attribute table) and use "
                        "one of these shortcuts: Ctrl+C to copy, Ctrl+X to cut, and Ctrl+V to paste."
                      ) );
  addGuiTip( myTip );
  // by yjacolin
  myTip.setTitle( tr( "Right click with identify tools" ) );
  myTip.setContent( tr( "Right click with the identify tool to show a context menu from which you can "
                        "choose the layer in which to identify a feature. A sub-menu will list features "
                        "identified and a third sub-menu will show the action link setup for the layer. "
                        "If one of this sub-menu doesn't contain any information, the next sub-menu "
                        "will appear instead. For example, if you have just one layer, and click "
                        "somewhere with several features, the first menu will list the features "
                        "instead of layer list."
                      ) );
  addGuiTip( myTip );
  // by Alister Hood
  myTip.setTitle( tr( "Use VRT files" ) );
  myTip.setContent( tr( "If you have a number of aerial photos spread across a wide area, instead of "
                        "loading each file as a separate layer you can treat them all as a single layer "
                        "by using a .vrt file. "
                        "To create a .vrt, go to <strong>Raster -> Miscellaneous -> Build Virtual Raster (Catalog)</strong>."
                      ) );
  addGuiTip( myTip );
  // by Harrissou Sant-anna
  myTip.setTitle( tr( "Switch quickly between different styles of the layer" ) );
  myTip.setContent( tr( "From the Layer properties dialog, use the <strong>Styles -> Add</strong> combobox"
                        " to create as many combinations of layer properties settings (symbology, labeling,"
                        " diagram, fields form, actions...) as you want. Then, simply switch between styles"
                        " from the context menu of the layer in <strong>Layers Panel</strong> to automatically"
                        "get different custom representations of your data."
                      ) );
  addGuiTip( myTip );
  // by Harrissou Sant-anna
  myTip.setTitle( tr( "Live update rendering" ) );
  myTip.setContent( tr( "Press F7 to activate the <strong>Layer Styling</strong> panel from which you can"
                        " easily and quickly configure the layer rendering. Check the <strong>Live update</strong>"
                        " option to automatically apply to the map canvas each of your modifications."
                      ) );
  addGuiTip( myTip );
  // by Harrissou Sant-anna
  myTip.setTitle( tr( "Print or export a specific feature from an atlas composition" ) );
  myTip.setContent( tr( "If you want to print or export the composition of only one feature of the atlas,"
                        " start the atlas preview, select the desired feature in the drop-down list"
                        " and click on <strong>Composer -> Print</strong> menu (or use <strong>Composer ->"
                        " Export...</strong> to any supported file format)."
                      ) );
  addGuiTip( myTip );
  // by Harrissou Sant-anna
  myTip.setTitle( tr( "Start QGIS from command line" ) );
  myTip.setContent( tr( "QGIS can be launched from command line and supports a number of options. This can be"
                        " handy if you need to use QGIS with particular configurations such as custom"
                        " user profile or, without plugins... To get the list of the options,"
                        " enter qgis --help on the command line."
                      ) );
  addGuiTip( myTip );
  // by Harrissou Sant-anna
  myTip.setTitle( tr( "Set your own shortcuts for your actions" ) );
  myTip.setContent( tr( "QGIS provides you with a list of predefined shortcuts you can use to speed"
                        " your workflow. These are available under <strong>Settings -> Configure"
                        " shortcuts</strong> menu and can be extended and customized for any dialog or tool."
                      ) );
  addGuiTip( myTip );

  /* Template for adding more tips
  myTip.setTitle(tr(""));
  myTip.setContent(tr(""
        ));
  addGuiTip(myTip);
  */
}