summaryrefslogtreecommitdiffstats
path: root/plugins/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/declarative')
-rw-r--r--plugins/declarative/declarative.pro4
-rw-r--r--plugins/declarative/multimedia/qdeclarativecamera.cpp161
-rw-r--r--plugins/declarative/systeminfo/qdeclarativenetworkinfo.cpp60
-rw-r--r--plugins/declarative/systeminfo/qdeclarativenetworkinfo_p.h14
4 files changed, 234 insertions, 5 deletions
diff --git a/plugins/declarative/declarative.pro b/plugins/declarative/declarative.pro
index f263687e6f..cf318adae9 100644
--- a/plugins/declarative/declarative.pro
+++ b/plugins/declarative/declarative.pro
@@ -6,11 +6,11 @@ contains(mobility_modules,sensors): SUBDIRS += sensors
contains(mobility_modules,serviceframework): SUBDIRS += serviceframework
contains(mobility_modules,publishsubscribe): SUBDIRS += publishsubscribe
contains(mobility_modules,multimedia): SUBDIRS += multimedia
-contains(mobility_modules,organizer):contains(mobility_modules,versit) SUBDIRS += organizer
+contains(mobility_modules,organizer):contains(mobility_modules,versit): SUBDIRS += organizer
contains(mobility_modules,systeminfo): SUBDIRS += systeminfo
contains(mobility_modules,gallery): SUBDIRS += gallery
contains(mobility_modules,feedback): SUBDIRS += feedback
-contains(mobility_modules,contacts):contains(mobility_modules,versit) SUBDIRS += contacts
+contains(mobility_modules,contacts):contains(mobility_modules,versit): SUBDIRS += contacts
contains(mobility_modules,location): SUBDIRS += location
!win32:!mac:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2):contains(mobility_modules,connectivity): SUBDIRS += connectivity
contains(qmf_enabled, yes)|wince*|win32|symbian|maemo5|maemo6 {
diff --git a/plugins/declarative/multimedia/qdeclarativecamera.cpp b/plugins/declarative/multimedia/qdeclarativecamera.cpp
index ce63be4432..d36a0c9f32 100644
--- a/plugins/declarative/multimedia/qdeclarativecamera.cpp
+++ b/plugins/declarative/multimedia/qdeclarativecamera.cpp
@@ -351,7 +351,6 @@ QString QDeclarativeCamera::errorString() const
\o The initial camera state, with camera not loaded,
the camera capabilities except of supported capture modes
are unknown.
-
While the supported settings are unknown in this state,
it's allowed to set the camera capture settings like codec,
resolution, or frame rate.
@@ -369,6 +368,28 @@ QString QDeclarativeCamera::errorString() const
the viewfinder displays video frames and the
camera is ready for capture.
\endtable
+*/
+/*!
+ \enum QDeclarativeCamera::State
+ \value UnloadedState
+ The initial camera state, with camera not loaded,
+ the camera capabilities except of supported capture modes
+ are unknown.
+ While the supported settings are unknown in this state,
+ it's allowed to set the camera capture settings like codec,
+ resolution, or frame rate.
+
+ \value LoadedState
+ The camera is loaded and ready to be configured.
+ In the Idle state it's allowed to query camera capabilities,
+ set capture resolution, codecs, etc.
+ The viewfinder is not active in the loaded state.
+
+ \value ActiveState
+ In the active state as soon as camera is started
+ the viewfinder displays video frames and the
+ camera is ready for capture.
+
The default camera state is ActiveState.
*/
@@ -452,7 +473,26 @@ void QDeclarativeCamera::stop()
For example in continuous focusing mode, the focus is considered locked as long
and the object is in focus, even while the actual focusing distance may be constantly changing.
\endtable
+*/
+/*!
+ \enum QDeclarativeCamera::LockStatus
+ \value Unlocked
+ The application is not interested in camera settings value.
+ The camera may keep this parameter without changes, this is common with camera focus,
+ or adjust exposure and white balance constantly to keep the viewfinder image nice.
+
+ \value Searching
+ The application has requested the camera focus, exposure or white balance lock with
+ searchAndLock(). This state indicates the camera is focusing or calculating exposure and white balance.
+ \value Locked
+ The camera focus, exposure or white balance is locked.
+ The camera is ready to capture, application may check the exposure parameters.
+
+ The locked state usually means the requested parameter stays the same,
+ except in the cases when the parameter is requested to be constantly updated.
+ For example in continuous focusing mode, the focus is considered locked as long
+ and the object is in focus, even while the actual focusing distance may be constantly changing.
*/
QDeclarativeCamera::LockStatus QDeclarativeCamera::lockStatus() const
{
@@ -588,6 +628,22 @@ void QDeclarativeCamera::keyReleaseEvent(QKeyEvent * event)
\endtable
*/
+/*!
+ \enum QDeclarativeCamera::FlashMode
+ \value FlashOff Flash is Off.
+ \value FlashOn Flash is On.
+ \value FlashAuto Automatic flash.
+ \value FlashRedEyeReduction Red eye reduction flash.
+ \value FlashFill Use flash to fillin shadows.
+ \value FlashTorch Constant light source, useful for focusing and video capture.
+ \value FlashSlowSyncFrontCurtain
+ Use the flash in conjunction with a slow shutter speed.
+ This mode allows better exposure of distant objects and/or motion blur effect.
+ \value FlashSlowSyncRearCurtain
+ The similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.
+ \value FlashManual Flash power is manually set.
+
+*/
int QDeclarativeCamera::flashMode() const
{
if (!m_isValid)
@@ -610,6 +666,12 @@ void QDeclarativeCamera::setFlashMode(int mode)
Adjustment for the automatically calculated exposure. The value is
in EV units.
*/
+/*!
+ \property QDeclarativeCamera::exposureCompensation
+
+ Adjustment for the automatically calculated exposure. The value is
+ in EV units.
+ */
qreal QDeclarativeCamera::exposureCompensation() const
{
if (!m_isValid)
@@ -629,6 +691,11 @@ void QDeclarativeCamera::setExposureCompensation(qreal ev)
The sensor's ISO sensitivity.
*/
+/*!
+ \property QDeclarativeCamera::isoSensitivity
+
+ The sensor's ISO sensitivity.
+ */
int QDeclarativeCamera::isoSensitivity() const
{
if (!m_isValid)
@@ -650,6 +717,11 @@ void QDeclarativeCamera::setManualIsoSensitivity(int iso)
The camera's shutter speed, in seconds.
*/
+/*!
+ \property QDeclarativeCamera::shutterSpeed
+
+ The camera's shutter speed, in seconds.
+*/
qreal QDeclarativeCamera::shutterSpeed() const
{
if (!m_isValid)
@@ -663,6 +735,11 @@ qreal QDeclarativeCamera::shutterSpeed() const
The lens aperture as an F number (the ratio of the focal length to effective aperture diameter).
*/
+/*!
+ \property QDeclarativeCamera::aperture
+
+ The lens aperture as an F number (the ratio of the focal length to effective aperture diameter).
+*/
qreal QDeclarativeCamera::aperture() const
{
if (!m_isValid)
@@ -691,6 +768,27 @@ qreal QDeclarativeCamera::aperture() const
\endtable
*/
+/*!
+ \enum QDeclarativeCamera::ExposureMode
+ \value ExposureManual Manual mode.
+ \value ExposureAuto Automatic mode.
+ \value ExposureNight Night mode.
+ \value ExposureBacklight Backlight exposure mode.
+ \value ExposureSpotlight Spotlight exposure mode.
+ \value ExposureSports Spots exposure mode.
+ \value ExposureSnow Snow exposure mode.
+ \value ExposureBeach Beach exposure mode.
+ \value ExposureLargeAperture Use larger aperture with small depth of field.
+ \value ExposureSmallAperture Use smaller aperture.
+ \value ExposurePortrait Portrait exposure mode.
+ \value ExposureModeVendor The base value for device specific exposure modes.
+
+*/
+/*!
+ \property QDeclarativeCamera::exposureMode
+
+ Camera exposure modes.
+*/
QDeclarativeCamera::ExposureMode QDeclarativeCamera::exposureMode() const
{
if (!m_isValid)
@@ -716,6 +814,12 @@ void QDeclarativeCamera::setExposureMode(QDeclarativeCamera::ExposureMode mode)
The resolution to capture the image at. If empty, the system will pick
a good size.
*/
+/*!
+ \property QDeclarativeCamera::captureResolution
+
+ The resolution to capture the image at. If empty, the system will pick
+ a good size.
+*/
QSize QDeclarativeCamera::captureResolution() const
{
if (!m_isValid)
@@ -743,6 +847,11 @@ void QDeclarativeCamera::setCaptureResolution(const QSize &resolution)
The maximum optical zoom factor, or 1.0 if optical zoom is not supported.
*/
+/*!
+ \property QDeclarativeCamera::maximumOpticalZoom
+
+ The maximum optical zoom factor, or 1.0 if optical zoom is not supported.
+*/
qreal QDeclarativeCamera::maximumOpticalZoom() const
{
if (!m_isValid)
@@ -756,6 +865,11 @@ qreal QDeclarativeCamera::maximumOpticalZoom() const
The maximum digital zoom factor, or 1.0 if digital zoom is not supported.
*/
+/*!
+ \property QDeclarativeCamera::maximumDigitalZoom
+
+ The maximum digital zoom factor, or 1.0 if digital zoom is not supported.
+*/
qreal QDeclarativeCamera::maximumDigitalZoom() const
{
if (!m_isValid)
@@ -769,6 +883,11 @@ qreal QDeclarativeCamera::maximumDigitalZoom() const
The current optical zoom factor.
*/
+/*!
+ \property QDeclarativeCamera::opticalZoom
+
+ The current optical zoom factor.
+*/
qreal QDeclarativeCamera::opticalZoom() const
{
if (!m_isValid)
@@ -788,6 +907,11 @@ void QDeclarativeCamera::setOpticalZoom(qreal value)
The current digital zoom factor.
*/
+/*!
+ \property QDeclarativeCamera::digitalZoom
+
+ The current digital zoom factor.
+*/
qreal QDeclarativeCamera::digitalZoom() const
{
if (!m_isValid)
@@ -803,6 +927,20 @@ void QDeclarativeCamera::setDigitalZoom(qreal value)
}
/*!
+ \enum QDeclarativeCamera::WhiteBalanceMode
+ \value WhiteBalanceManual Manual white balance. In this mode the manual white balance property value is used.
+ \value WhiteBalanceAuto Auto white balance mode.
+ \value WhiteBalanceSunlight Sunlight white balance mode.
+ \value WhiteBalanceCloudy Cloudy white balance mode.
+ \value WhiteBalanceShade Shade white balance mode.
+ \value WhiteBalanceTungsten Tungsten white balance mode.
+ \value WhiteBalanceFluorescent Fluorescent white balance mode.
+ \value WhiteBalanceIncandescent Incandescent white balance mode.
+ \value WhiteBalanceFlash Flash white balance mode.
+ \value WhiteBalanceSunset Sunset white balance mode.
+ \value WhiteBalanceVendor Vendor defined white balance mode.
+*/
+/*!
\qmlproperty enumeration Camera::whiteBalanceMode
\table
@@ -822,6 +960,11 @@ void QDeclarativeCamera::setDigitalZoom(qreal value)
\sa manualWhiteBalance
*/
+/*!
+ \property QDeclarativeCamera::whiteBalanceMode
+
+ \sa WhiteBalanceMode
+*/
QDeclarativeCamera::WhiteBalanceMode QDeclarativeCamera::whiteBalanceMode() const
{
if (!m_isValid)
@@ -845,6 +988,13 @@ void QDeclarativeCamera::setWhiteBalanceMode(QDeclarativeCamera::WhiteBalanceMod
\sa whiteBalanceMode
*/
+/*!
+ \property QCamera::manualWhiteBalance
+
+ The color temperature used when in manual white balance mode (WhiteBalanceManual).
+
+ \sa whiteBalanceMode
+*/
int QDeclarativeCamera::manualWhiteBalance() const
{
if (!m_isValid)
@@ -877,6 +1027,15 @@ void QDeclarativeCamera::setManualWhiteBalance(int colorTemp) const
\row \o NotSupportedFeatureError \o The feature is not supported.
\endtable
*/
+/*!
+ \enum QDeclarativeCamera::Error
+ \value NoError No errors have occurred.
+ \value CameraError An error has occurred.
+ \value InvalidRequestError System resource doesn't support requested functionality.
+ \value ServiceMissingError No camera service available.
+ \value NotSupportedFeatureError The feature is not supported.
+*/
+
/*!
\qmlsignal Camera::onCaptureFailed(message)
diff --git a/plugins/declarative/systeminfo/qdeclarativenetworkinfo.cpp b/plugins/declarative/systeminfo/qdeclarativenetworkinfo.cpp
index edcdf1160c..4d98853ea7 100644
--- a/plugins/declarative/systeminfo/qdeclarativenetworkinfo.cpp
+++ b/plugins/declarative/systeminfo/qdeclarativenetworkinfo.cpp
@@ -274,7 +274,7 @@ void QDeclarativeNetworkInfo::startSignalStrengthChanged(bool on)
/*!
\qmlproperty bool NetworkInfo::monitorSignalStrengthChanges
- \brief Use the monitorSignalStrengthChanges signal.
+ \brief Use the signalStrengthChanged signal.
*/
bool QDeclarativeNetworkInfo::monitorSignalStrengthChanges()
{
@@ -300,7 +300,7 @@ void QDeclarativeNetworkInfo::startNameChanged(bool on)
/*!
\qmlproperty bool NetworkInfo::monitorNameChanges
- \brief Use the monitorNameChanges signal.
+ \brief Use the nameChanged signal.
*/
bool QDeclarativeNetworkInfo::monitorNameChanges()
{
@@ -527,3 +527,59 @@ QSystemNetworkInfo::NetworkMode QDeclarativeNetworkInfo::mode()
{
return m_mode;
}
+
+
+/*!
+ \qmlproperty bool NetworkInfo::monitoringCellDataTechnologyChanges
+ \brief Use the cellDataTechnologyChanges signal.
+
+ \sa QSystemNetworkInfo::cellDataTechnologyChanged
+ */
+bool QDeclarativeNetworkInfo::monitorCellDataChanges()
+{
+ return monitoringCellDataTechnologyChanges;
+}
+
+/*!
+ This function starts the cellDataTechnologyChanges notification
+
+*/
+void QDeclarativeNetworkInfo::startCellDataChanged(bool on)
+{
+ monitoringCellDataTechnologyChanges = on;
+ if (on) {
+ connect(netInfo(),SIGNAL(cellDataTechnologyChanged(QSystemNetworkInfo::CellDataTechnology)),
+ this,SIGNAL(cellDataTechnologyChanges(QSystemNetworkInfo::CellDataTechnology)),Qt::UniqueConnection);
+ } else {
+ disconnect(netInfo(),SIGNAL(cellDataTechnologyChanged(QSystemNetworkInfo::CellDataTechnology)),
+ this,SIGNAL(cellDataTechnologyChanges(QSystemNetworkInfo::CellDataTechnology)));
+ }
+}
+
+/*!
+ \qmlproperty bool NetworkInfo::monitoringCellIdChanges
+ \brief Use the cellIdChanges signal.
+ */
+bool QDeclarativeNetworkInfo::monitorCellIdChanges()
+{
+ return monitoringCellIdChanges;
+}
+
+/*!
+ This function starts the cellIdChanges notification
+
+ \sa QSystemNetworkInfo::cellIdChanged
+
+*/
+void QDeclarativeNetworkInfo::startCellIdChanged(bool on)
+{
+ monitoringCellIdChanges = on;
+ if (on) {
+ connect(netInfo(),SIGNAL(cellIdChanged(int)),
+ this,SIGNAL(cellIdChanges(int)),Qt::UniqueConnection);
+ } else {
+ disconnect(netInfo(),SIGNAL(cellIdChanged(int)),
+ this,SIGNAL(cellIdChanges(int)));
+ }
+}
+
diff --git a/plugins/declarative/systeminfo/qdeclarativenetworkinfo_p.h b/plugins/declarative/systeminfo/qdeclarativenetworkinfo_p.h
index 36427e58d9..df4e825422 100644
--- a/plugins/declarative/systeminfo/qdeclarativenetworkinfo_p.h
+++ b/plugins/declarative/systeminfo/qdeclarativenetworkinfo_p.h
@@ -62,6 +62,8 @@ class QDeclarativeNetworkInfo : public QSystemNetworkInfo
Q_PROPERTY(bool monitorModeChanges READ monitorModeChanges WRITE startModeChanged)
Q_PROPERTY(bool monitorCurrentMobileCountryCodeChanges READ monitorCurrentMobileCountryCodeChanges WRITE startCurrentMobileCountryCodeChanged)
Q_PROPERTY(bool monitorCurrentMobileNetworkCodeChanges READ monitorCurrentMobileNetworkCodeChanges WRITE startCurrentMobileNetworkCodeChanged)
+ Q_PROPERTY(bool monitorCellDataChanges READ monitorCellDataChanges WRITE startCellDataChanged)
+ Q_PROPERTY(bool monitorCellIdChanges READ monitorCellIdChanges WRITE startCellIdChanged)
public:
explicit QDeclarativeNetworkInfo(QObject *parent = 0);
@@ -90,6 +92,12 @@ public:
bool monitorCurrentMobileNetworkCodeChanges();
void startCurrentMobileNetworkCodeChanged(bool on);
+ bool monitorCellDataChanges();
+ void startCellDataChanged(bool on);
+
+ bool monitorCellIdChanges();
+ void startCellIdChanged(bool on);
+
void useMode(QSystemNetworkInfo::NetworkMode curmode);
public slots:
@@ -105,6 +113,10 @@ Q_SIGNALS:
void currentMobileCountryCodeChanged(const QString &newMcc);
void currentMobileNetworkCodeChanged(const QString &newMnc);
+ void cellIdChanges(int cellId);
+ void cellDataTechnologyChanges(QSystemNetworkInfo::CellDataTechnology cellTech);
+
+
private:
QSystemNetworkInfo::NetworkMode m_mode;
QString statusToString(QSystemNetworkInfo::NetworkStatus);
@@ -116,6 +128,8 @@ private:
bool monitoringModeChanges;
bool monitoringCurrentMobileCountryCodeChanges;
bool monitoringCurrentMobileNetworkCodeChanges;
+ bool monitoringCellDataTechnologyChanges;
+ bool monitoringCellIdChanges;
private slots:
void networkStatusChanged(QSystemNetworkInfo::NetworkMode, QSystemNetworkInfo::NetworkStatus);