summaryrefslogtreecommitdiffstats
path: root/src/displaysettings
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2018-09-28 15:23:47 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2018-10-15 06:41:34 +0000
commit261e4c619214af5e5cf95ec08a7d46d702ae0a93 (patch)
treeb670a6f347a8a8053bee850162c6ed542fcb5524 /src/displaysettings
parent0ecd391912f6338d5aef6105600fc8c321c83bd8 (diff)
Doc: Add documentation for C++ classes
Currently, only QML types are documented. Task-number: QTBUG-69686 Change-Id: Idc13bff25a154e88c6c769c0af37204573ec1118 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/displaysettings')
-rw-r--r--src/displaysettings/displaysettings.cpp95
1 files changed, 88 insertions, 7 deletions
diff --git a/src/displaysettings/displaysettings.cpp b/src/displaysettings/displaysettings.cpp
index bf15884..de2d416 100644
--- a/src/displaysettings/displaysettings.cpp
+++ b/src/displaysettings/displaysettings.cpp
@@ -31,24 +31,77 @@
QT_BEGIN_NAMESPACE
+/*!
+ \class DisplaySettings
+ \inmodule QtDeviceUtilities
+
+ \brief The DisplaySettings class specifies display settings.
+
+ The Boot to Qt demo launcher and Qt Quick Controls scale automatically to
+ screens of different sizes, from 7-inch touch screens to 60-inch or larger
+ television screens to ensure readability and touch friendliness. For this,
+ Qt has to know the physical dimensions of the screen. By default, it tries
+ to query these values from the framebuffer devices. However, many kernel
+ drivers do not provide this information.
+
+ The display settings enable overriding and manually setting the physical
+ screen size.
+
+ In addition, you can set the display brightness. That is, the intensity of
+ the backlight.
+*/
+
+/*!
+ \property DisplaySettings::displayBrightness
+ \brief The display brightness.
+
+ A value of \c 255 requests the maximum brightness, while that of \c 0
+ requests the minimum (typically, the backlight turned off).
+*/
+
+
+/*!
+ \property DisplaySettings::physicalScreenSizeInch
+ \brief The physical screen size in inches.
+*/
+
+/*!
+ \property DisplaySettings::physicalScreenWidthMm
+ \brief The physical screen width in millimeters.
+*/
+
+/*!
+ \property DisplaySettings::physicalScreenHeightMm
+ \brief The physical screen height in millimeters.
+*/
+
+/*!
+ \property DisplaySettings::physicalScreenSizeOverride
+ \brief Whether to use the value set for the physical screen size.
+*/
+
+/*!
+ Creates a new display settings object with the parent \a parent.
+*/
DisplaySettings::DisplaySettings(QObject *parent)
: QObject(parent)
,d_ptr(new DisplaySettingsPrivate(this))
{
}
+/*!
+ Deletes the display settings object.
+*/
DisplaySettings::~DisplaySettings()
{
}
/*!
- * Sets the display brightness (i.e. the intensity of the backlight)
- * to \a value. A value of 255 requests maximum brightness, while 0 requests
- * minimum (typically, the backlight turned off).
- *
- * Returns true on success.
- */
+ Sets the display brightness to \a v.
+
+ Returns \c true on success.
+*/
bool DisplaySettings::setDisplayBrightness(int v)
{
Q_D(DisplaySettings);
@@ -66,49 +119,77 @@ int DisplaySettings::displayBrightness()
return d->displayBrightness();
}
-
+/*!
+ Returns the physical screen size in inches.
+*/
int DisplaySettings::physicalScreenSizeInch() const
{
Q_D(const DisplaySettings);
return d->physicalScreenSizeInch();
}
+/*!
+ Returns the physical screen width in millimeters.
+*/
int DisplaySettings::physicalScreenWidthMm() const
{
Q_D(const DisplaySettings);
return d->physicalScreenWidthMm();
}
+/*!
+ Returns the physical screen height in millimeters.
+*/
int DisplaySettings::physicalScreenHeightMm() const
{
Q_D(const DisplaySettings);
return d->physicalScreenHeightMm();
}
+/*!
+ Sets the physical screen size to \a inches.
+*/
void DisplaySettings::setPhysicalScreenSizeInch(int inches)
{
Q_D(DisplaySettings);
d->setPhysicalScreenSizeInch(inches);
}
+/*!
+ Sets the physical screen width to \a newWidth.
+*/
void DisplaySettings::setPhysicalScreenWidthMm(int newWidth)
{
Q_D(DisplaySettings);
d->setPhysicalScreenWidthMm(newWidth);
}
+/*!
+ Sets the physical screen height to \a newHeight.
+*/
void DisplaySettings::setPhysicalScreenHeightMm(int newHeight)
{
Q_D(DisplaySettings);
d->setPhysicalScreenHeightMm(newHeight);
}
+/*!
+ Returns whether the value set for the physical screen size is used.
+
+ \sa physicalScreenSizeInch()
+*/
bool DisplaySettings::physicalScreenSizeOverride() const
{
Q_D(const DisplaySettings);
return d->physicalScreenSizeOverride();
}
+/*!
+ Sets whether the value set for the physical screen size is used to
+ \a enable.
+
+ \sa physicalScreenSizeInch()
+*/
void DisplaySettings::setPhysicalScreenSizeOverride(bool enable)
{
Q_D(DisplaySettings);