forked from qt-creator/qt-creator
Spinner: Add some docs
Change-Id: Ia8717ac93c92e03d27fc4b8c93a32b7785ccc3e9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -16,7 +16,7 @@ headerdirs = . \
|
|||||||
../src \
|
../src \
|
||||||
../../../src/libs/aggregation \
|
../../../src/libs/aggregation \
|
||||||
../../../src/libs/extensionsystem \
|
../../../src/libs/extensionsystem \
|
||||||
../../../src/libs/solutions/tasking \
|
../../../src/libs/solutions \
|
||||||
../../../src/libs/utils \
|
../../../src/libs/utils \
|
||||||
../../../src/plugins/coreplugin
|
../../../src/plugins/coreplugin
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ sourcedirs = . \
|
|||||||
../src \
|
../src \
|
||||||
../../../src/libs/aggregation \
|
../../../src/libs/aggregation \
|
||||||
../../../src/libs/extensionsystem \
|
../../../src/libs/extensionsystem \
|
||||||
../../../src/libs/solutions/tasking \
|
../../../src/libs/solutions \
|
||||||
../../../src/libs/utils \
|
../../../src/libs/utils \
|
||||||
../../../src/plugins/coreplugin
|
../../../src/plugins/coreplugin
|
||||||
|
|
||||||
@@ -42,7 +42,8 @@ sources.fileextensions = "*.cpp *.qdoc"
|
|||||||
|
|
||||||
imagedirs = ../images \
|
imagedirs = ../images \
|
||||||
../../config/images \
|
../../config/images \
|
||||||
../../qtcreator/images
|
../../qtcreator/images \
|
||||||
|
../../../src/libs/solutions
|
||||||
exampledirs = ../examples
|
exampledirs = ../examples
|
||||||
|
|
||||||
depends += qtwidgets \
|
depends += qtwidgets \
|
||||||
|
|||||||
@@ -119,6 +119,11 @@
|
|||||||
\li Solution Name
|
\li Solution Name
|
||||||
\li Description
|
\li Description
|
||||||
|
|
||||||
|
\row
|
||||||
|
\li \l{Spinner Solution}{Spinner}
|
||||||
|
\li Renders a circular, endlessly animated progress indicator,
|
||||||
|
which may be attached to any widget as an overlay.
|
||||||
|
|
||||||
\row
|
\row
|
||||||
\li \l{Tasking Solution}{Tasking}
|
\li \l{Tasking Solution}{Tasking}
|
||||||
\li Enables you to build extensible, declarative task tree structures
|
\li Enables you to build extensible, declarative task tree structures
|
||||||
|
|||||||
@@ -162,30 +162,85 @@ private:
|
|||||||
SpinnerPainter m_paint;
|
SpinnerPainter m_paint;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\module SpinnerSolution
|
||||||
|
\title Spinner Solution
|
||||||
|
\ingroup solutions-modules
|
||||||
|
\brief Contains a Spinner solution.
|
||||||
|
|
||||||
|
The Spinner solution depends on Qt only, and doesn't depend on any \QC specific code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\namespace SpinnerSolution
|
||||||
|
\inmodule SpinnerSolution
|
||||||
|
\brief The SpinnerSolution namespace encloses the Spinner class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\enum SpinnerSolution::SpinnerSize
|
||||||
|
|
||||||
|
This enum describes the possible spinner sizes.
|
||||||
|
|
||||||
|
\value Small \inlineimage spinner/icons/spinner_small.png
|
||||||
|
\value Medium \inlineimage spinner/icons/spinner_medium.png
|
||||||
|
\value Large \inlineimage spinner/icons/spinner_large.png
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class SpinnerSolution::Spinner
|
||||||
|
\inheaderfile solutions/spinner/spinner.h
|
||||||
|
\inmodule SpinnerSolution
|
||||||
|
\brief The Spinner class renders a circular, endlessly animated progress indicator,
|
||||||
|
that may be attached to any widget as an overlay.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Creates a spinner overlay with a given \a size for the passed \a parent widget.
|
||||||
|
|
||||||
|
The \a parent widget takes the ownership of the created spinner.
|
||||||
|
*/
|
||||||
Spinner::Spinner(SpinnerSize size, QWidget *parent)
|
Spinner::Spinner(SpinnerSize size, QWidget *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_widget(new SpinnerWidget(size, parent)) {}
|
, m_widget(new SpinnerWidget(size, parent)) {}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the size of the spinner to the given \a size.
|
||||||
|
*/
|
||||||
void Spinner::setSize(SpinnerSize size)
|
void Spinner::setSize(SpinnerSize size)
|
||||||
{
|
{
|
||||||
m_widget->setSize(size);
|
m_widget->setSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Shows the animated spinner as an overlay for the parent widget
|
||||||
|
set previously in the constructor.
|
||||||
|
*/
|
||||||
void Spinner::show()
|
void Spinner::show()
|
||||||
{
|
{
|
||||||
m_widget->show();
|
m_widget->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Hides the spinner.
|
||||||
|
*/
|
||||||
void Spinner::hide()
|
void Spinner::hide()
|
||||||
{
|
{
|
||||||
m_widget->hide();
|
m_widget->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns \c true if the spinner is visible; otherwise, returns \c false.
|
||||||
|
*/
|
||||||
bool Spinner::isVisible() const
|
bool Spinner::isVisible() const
|
||||||
{
|
{
|
||||||
return m_widget->isVisible();
|
return m_widget->isVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Shows or hides the spinner depending on the value of \a visible.
|
||||||
|
By default, the spinner is visible.
|
||||||
|
*/
|
||||||
void Spinner::setVisible(bool visible)
|
void Spinner::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
m_widget->setVisible(visible);
|
m_widget->setVisible(visible);
|
||||||
|
|||||||
Reference in New Issue
Block a user