Skip to content

Commit

Permalink
add cpp to code type
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Dec 20, 2017
1 parent 7b0ad1b commit 45315bb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsabstractgeometry.h
Expand Up @@ -430,7 +430,7 @@ class CORE_EXPORT QgsAbstractGeometry
* It may generate an invalid geometry (in some corner cases).
* It can also be thought as rounding the edges and it may be useful for removing errors.
* Example:
* \code
* \code{.cpp}
* geometry->snappedToGrid(1, 1);
* \endcode
* In this case we use a 2D grid of 1x1 to gridify.
Expand Down
4 changes: 2 additions & 2 deletions src/core/gps/qextserialport/qextserialenumerator.h
Expand Up @@ -77,7 +77,7 @@ class QextSerialRegistrationWidget : public QWidget
QextPortInfo structure will populated with information about the corresponding device.
\b Example
\code
\code{.cpp}
QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
Q_FOREACH( QextPortInfo port, ports ) {
// inspect port...
Expand All @@ -89,7 +89,7 @@ class QextSerialRegistrationWidget : public QWidget
signals. Event-driven behavior is currently available only on Windows and OS X.
\b Example
\code
\code{.cpp}
QextSerialEnumerator* enumerator = new QextSerialEnumerator();
connect(enumerator, &QextSerialEnumerator::deviceDiscovered,
myClass, &MyObject::onDeviceDiscovered);
Expand Down
2 changes: 1 addition & 1 deletion src/core/gps/qextserialport/qextserialport.h
Expand Up @@ -150,7 +150,7 @@ QextSerialPort offers both a polling and event driven API. Event driven is typi
to use, since you never have to worry about checking for new data.
\b Example
\code
\code{.cpp}
QextSerialPort* port = new QextSerialPort("COM1", QextSerialPort::EventDriven);
connect(port, &QextSerialPort::readyRead, myClass, &MyObject::onDataAvailable);
port->open();
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelingengine.h
Expand Up @@ -148,7 +148,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( QgsAbstractLabelProvider::Flags )
* (if labeling / diagrams were configured for such vector layer).
*
* The labeling engine may also be used independently from map rendering loop:
* \code
* \code{.cpp}
* QgsLabelingEngine engine;
* engine.setMapSettings( mapSettings );
* // add one or more providers
Expand Down
7 changes: 3 additions & 4 deletions src/core/raster/qgsrasterlayer.h
Expand Up @@ -91,23 +91,22 @@ typedef QList < QPair< QString, QColor > > QgsLegendColorList;
*
* Sample usage of the QgsRasterLayer class:
*
* \code
* \code{.cpp}
* QString myFileNameQString = "/path/to/file";
* QFileInfo myFileInfo(myFileNameQString);
* QString myBaseNameQString = myFileInfo.baseName();
* QgsRasterLayer *myRasterLayer = new QgsRasterLayer(myFileNameQString, myBaseNameQString);
*
* \endcode
*
* In order to automate redrawing of a raster layer, you should like it to a map canvas like this :
*
* \code
* \code{.cpp}
* QObject::connect( myRasterLayer, SIGNAL(repaintRequested()), mapCanvas, SLOT(refresh()) );
* \endcode
*
* Once a layer has been created you can find out what type of layer it is (GrayOrUndefined, Palette or Multiband):
*
* \code
* \code{.cpp}
* if (rasterLayer->rasterType()==QgsRasterLayer::Multiband)
* {
* //do something
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsprojectionselectiondialog.h
Expand Up @@ -34,7 +34,7 @@
* Typically you will use this when you want to prompt the user for
* a coordinate system identifier e.g. from a plugin you might do this
* to get an epsg code:
* \code
* \code{.cpp}
* QgsProjectionSelectionDialog mySelector( mQGisIface->mainWindow() );
* mySelector.setCrs( crs );
* if ( mySelector.exec() )
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qtermwidget/kprocess.h
Expand Up @@ -171,7 +171,7 @@ class KProcess : public QProcess
* If no executable is set yet, it will be set instead.
*
* For example, doing an "ls -l /usr/local/bin" can be achieved by:
* \code
* \code{.cpp}
* KProcess p;
* p << "ls" << "-l" << "/usr/local/bin";
* ...
Expand Down

0 comments on commit 45315bb

Please sign in to comment.