mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
add cpp to code type
This commit is contained in:
parent
7b0ad1b6d5
commit
45315bbfd6
@ -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.
|
||||
|
@ -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...
|
||||
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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() )
|
||||
|
@ -171,7 +171,7 @@ public:
|
||||
* 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";
|
||||
* ...
|
||||
|
Loading…
x
Reference in New Issue
Block a user