Skip to content

Commit d923ec4

Browse files
authored
Merge pull request #186 from Esri/tdunn/20171122-doc-build
Update toolkit API doc
2 parents 172a655 + e7637bb commit d923ec4

File tree

9 files changed

+384
-187
lines changed

9 files changed

+384
-187
lines changed

Import/Esri/ArcGISRuntime/Toolkit/Controls/CppApi/CoordinateConversion.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Esri.ArcGISRuntime.Toolkit.CppApi 100.2
66

77
/*!
88
\qmltype CoordinateConversion
9+
\inqmlmodule Esri.ArcGISRuntime.Toolkit.Controls
910
\ingroup ToolCoordinateConversion
1011
\since Esri.ArcGISRutime 100.2
1112
\brief The user interface for the coordinate conversion tool.

Plugin/CppApi/include/ArcGISCompassController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class TOOLKIT_EXPORT ArcGISCompassController : public AbstractTool
4545
~ArcGISCompassController();
4646

4747
bool setView(Esri::ArcGISRuntime::GeoView* geoView);
48+
/*! \internal */
4849
bool setView(Esri::ArcGISRuntime::MapQuickView* mapView);
50+
/*! \internal */
4951
bool setView(Esri::ArcGISRuntime::SceneQuickView* sceneView);
5052

5153
double heading() const;

Plugin/CppApi/include/CoordinateConversionController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class TOOLKIT_EXPORT CoordinateConversionController : public AbstractTool
5252
Q_PROPERTY(CoordinateConversionOptions::UtmConversionMode inputUtmConversionMode READ inputUtmConversionMode WRITE setInputUtmConversionMode NOTIFY inputUtmConversionModeChanged)
5353

5454
// internal: support for nested default property "options" objects
55+
/*! \internal */
5556
Q_PRIVATE_PROPERTY(CoordinateConversionController::self(), QQmlListProperty<QObject> objects READ objects DESIGNABLE false)
5657
Q_CLASSINFO("DefaultProperty", "objects")
5758

Plugin/CppApi/source/AbstractTool.cpp

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,105 @@ namespace ArcGISRuntime
1818
{
1919
namespace Toolkit
2020
{
21+
/*!
22+
\class Esri::ArcGISRuntime::Toolkit::AbstractTool
23+
\inmodule ArcGISQtToolkit
24+
\brief Base class for classes that implement individual tools.
25+
\since Esri::ArcGISRuntime 100.2
2126
27+
AbstractTool provides functions and properties that all derived tools share.
28+
29+
\note You cannot create an object of this class. Instead, create a tool
30+
object from a derived class.
31+
*/
32+
33+
/*!
34+
\brief The constructor that accepts an optional \a parent object.
35+
*/
2236
AbstractTool::AbstractTool(QObject* parent /*= nullptr*/):
2337
QObject(parent)
2438
{
2539

2640
}
2741

42+
/*!
43+
\brief The destructor.
44+
*/
2845
AbstractTool::~AbstractTool()
2946
{
3047

3148
}
3249

50+
/*!
51+
\brief Reimplement this method in subclasses to handle a click at
52+
geographic coordinate \a pos.
53+
54+
Returns \c false.
55+
*/
3356
bool AbstractTool::handleClick(const Point& pos)
3457
{
3558
Q_UNUSED(pos)
3659
return false;
3760
}
3861

62+
/*!
63+
\brief Reimplement this method in subclasses to set tool properties.
64+
\list
65+
\li \a properties - A QVariantMap containing property settings.
66+
\endlist
67+
68+
A tool property is defined as a key-value pair where the key is a QString
69+
and the value is a QVariant. Properties are useful for general settings
70+
which you wish to persist for the tool, such as default modes.
71+
*/
3972
void AbstractTool::setProperties(const QVariantMap&)
4073
{
4174

4275
}
4376

77+
/*!
78+
\brief Sets whether this tool is active to \a active.
79+
*/
4480
void AbstractTool::setActive(bool active)
4581
{
4682
m_active = active;
4783
}
4884

85+
/*!
86+
\brief Returns whether this tool is active (\c true) or not (\c false).
87+
*/
4988
bool AbstractTool::isActive() const
5089
{
5190
return m_active;
5291
}
5392

93+
// Signals
94+
/*!
95+
\fn void Esri::ArcGISRuntime::Toolkit::AbstractTool::errorOccurred(const Error& error)
96+
\brief Signal emitted when this tool encounters an error.
97+
98+
\list
99+
\li \a error - Details about the error that occurred.
100+
\endlist
101+
*/
102+
103+
/*!
104+
\fn void Esri::ArcGISRuntime::Toolkit::AbstractTool::propertyChanged(const QString& propertyName, const QVariant& propertyValue)
105+
\brief Signal emitted when a property of this tool changes.
106+
107+
\list
108+
\li \a propertyName - The changed property's name.
109+
\li \a propertyValue - The changed property's new value.
110+
\endlist
111+
*/
112+
113+
// Properties
114+
115+
/*!
116+
\fn QString AbstractTool::toolName() const
117+
\brief Returns the name of this tool.
118+
*/
119+
54120
} // Toolkit
55121
} // ArcGISRuntime
56122
} // Esri

Plugin/CppApi/source/ArcGISCompassController.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ namespace Toolkit
2929

3030
/*!
3131
\class Esri::ArcGISRuntime::Toolkit::ArcGISCompassController
32-
\ingroup ToolArcGISCompass
3332
\inmodule ArcGISQtToolkit
34-
\since Esri::ArcGISRuntime 100.2
33+
\ingroup ToolArcGISCompass
3534
\brief The controller for the ArcGIS Compass tool.
35+
\since Esri::ArcGISRuntime 100.2
3636
*/
3737

38+
/*!
39+
\brief The constructor that accepts an optional \a parent object.
40+
*/
3841
ArcGISCompassController::ArcGISCompassController(QObject *parent):
3942
AbstractTool(parent)
4043
{
@@ -48,10 +51,17 @@ ArcGISCompassController::ArcGISCompassController(QObject *parent):
4851
});
4952
}
5053

54+
/*!
55+
\brief The destructor.
56+
*/
5157
ArcGISCompassController::~ArcGISCompassController()
5258
{
5359
}
5460

61+
/*!
62+
\property ArcGISCompassController::heading
63+
\brief The compass heading in degrees.
64+
*/
5565
void ArcGISCompassController::setHeading(double rotation)
5666
{
5767
if (m_heading == rotation)
@@ -68,6 +78,10 @@ void ArcGISCompassController::setHeading(double rotation)
6878
}
6979
}
7080

81+
/*!
82+
\property ArcGISCompassController::autoHide
83+
\brief Whether the compass should be hidden when its heading is north (zero degrees).
84+
*/
7185
void ArcGISCompassController::setAutoHide(bool autoHide)
7286
{
7387
if (m_autoHide == autoHide)
@@ -77,6 +91,12 @@ void ArcGISCompassController::setAutoHide(bool autoHide)
7791
emit autoHideChanged();
7892
}
7993

94+
/*!
95+
\fn Esri::ArcGISRuntime::Toolkit::ArcGISCompassController::setView(Esri::ArcGISRuntime::GeoView* geoView)
96+
\brief Sets the \c Esri::ArcGISRuntime::GeoView associated with the compass to \a geoView.
97+
98+
Returns \c true on success.
99+
*/
80100
bool ArcGISCompassController::setView(GeoView *geoView)
81101
{
82102
if (!geoView)

Plugin/CppApi/source/ArcGISRuntimeToolkit.cpp

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ namespace ArcGISRuntime
2424
{
2525
namespace Toolkit
2626
{
27+
/*!
28+
\class Esri::ArcGISRuntime::Toolkit::ArcGISRuntimeToolkit
29+
\inmodule ArcGISQtToolkit
30+
\since Esri::ArcGISRuntime 100.2
31+
\brief The main plugin class for the ArcGISRuntimeToolkit.
32+
33+
You must call the static \l registerToolkitTypes function
34+
to ensure all the types are accessible in the QML environment.
35+
You may alternately do this manually if you only need specific types.
36+
*/
2737

2838
static CoordinateConversionOptions* m_optionsProvider = nullptr;
2939

@@ -37,6 +47,9 @@ QObject* optionsProvider(QQmlEngine* engine, QJSEngine*)
3747
return m_optionsProvider;
3848
}
3949

50+
/*!
51+
\brief Constructor that accepts an optional \a parent object.
52+
*/
4053
ArcGISRuntimeToolkit::ArcGISRuntimeToolkit(QObject* parent) :
4154
QQmlExtensionPlugin(parent)
4255
{
@@ -45,11 +58,36 @@ ArcGISRuntimeToolkit::ArcGISRuntimeToolkit(QObject* parent) :
4558
#endif
4659
}
4760

61+
/*!
62+
\brief Type registration function to ensure the types are accessible
63+
in the QML environment.
64+
65+
You can use this method if you want to customize the import path. For ease
66+
of use, \l registerToolkitTypes can be used instead without needing to instantiate
67+
this class.
68+
69+
\list
70+
\li \a uri - The namespace in which to register the types.
71+
\endlist
72+
*/
4873
void ArcGISRuntimeToolkit::registerTypes(const char* uri)
4974
{
5075
registerToolkitTypes(uri);
5176
}
5277

78+
/*!
79+
\brief Static type registration function to ensure the types are accessible
80+
in the QML environment.
81+
82+
This is the starting point for most uses of the ArcGISRuntimeToolkit. If you
83+
want to use the ArcGISRuntimeToolkit out of the box, then this method (with
84+
the default argument) will register all the types with the default import
85+
path.
86+
87+
\list
88+
\li \a uri - The namespace in which to register the types.
89+
\endlist
90+
*/
5391
void ArcGISRuntimeToolkit::registerToolkitTypes(const char* uri)
5492
{
5593
// singletons

0 commit comments

Comments
 (0)