Sensors API 文档
hamishwillee
(Talk | contribs) m (Text replace - "<code cpp>" to "<code cpp-qt>") |
|||
| (16 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:Qt Mobility]] | + | [[Category:Qt Mobility]][[Category:Lang-Chinese]][[Category:Sensor]] |
| + | {{ArticleMetaData | ||
| + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords=QAccelerometer, QOrientationSensor, QSensorReading | ||
| + | |id= <!-- Article Id (Knowledge base articles only) --> | ||
| + | |language=Lang-Chinese | ||
| + | |translated-by= <!-- [[User: XXXXX]] --> | ||
| + | |translated-from-title=<!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by=<!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp=<!-- After re-review: YYYYMMDD --> | ||
| + | |update-by=<!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp=<!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate=20110314 | ||
| + | |author=[[User:Flycarl]] | ||
| + | }} | ||
==Sensors== | ==Sensors== | ||
| Line 7: | Line 30: | ||
=='''命名空间'''== | =='''命名空间'''== | ||
| − | QtMobility API 放在 QtMobility 的命名空间. 这是为以后Mobility APIs 集成到 Qt做准备. 参考[http://doc.qt.nokia.com/qtmobility-1.1.0/quickstart.html Quickstart guide] | + | QtMobility API 放在 QtMobility 的命名空间. 这是为以后Mobility APIs 集成到 Qt做准备. 参考[http://doc.qt.nokia.com/qtmobility-1.1.0/quickstart.html Quickstart guide]中的例子体会这个命名空间如何影响使用QtMobility的开发 |
| − | + | ||
---- | ---- | ||
| Line 14: | Line 36: | ||
设备上有很多种感应器,有些设备的感应器 Sensor API不支持,也可能Sensor API支持的感应器在某型设备上面没有。你可以使用 [http://doc.qt.nokia.com/qtmobility-1.1.0/qsensor.html#sensorTypes QSensor::sensorTypes()] 方法来查看Sensor API可以调用的当前设备的感应器类型。 | 设备上有很多种感应器,有些设备的感应器 Sensor API不支持,也可能Sensor API支持的感应器在某型设备上面没有。你可以使用 [http://doc.qt.nokia.com/qtmobility-1.1.0/qsensor.html#sensorTypes QSensor::sensorTypes()] 方法来查看Sensor API可以调用的当前设备的感应器类型。 | ||
| − | + | 内建的感应器类型列表参见下面的[[Sensors API %E6%96%87%E6%A1%A3#.E6.84.9F.E5.BA.94.E5.99.A8.E7.B1.BB | 感应器类]] 章节。 | |
---- | ---- | ||
| + | |||
=='''约定习惯'''== | =='''约定习惯'''== | ||
| − | 如没有特别说明,感应器要使用[http://en.wikipedia.org/wiki/Cartesian_coordinate_system 右手直角坐标系]。 | + | 如没有特别说明,感应器要使用[http://en.wikipedia.org/wiki/Cartesian_coordinate_system 右手直角坐标系]。<br> |
| − | [image: | + | [[image:sensors-coordinates.jpg ]]<br> |
| − | 为了能测量6个方向,引入了负数。 | + | 为了能测量6个方向,引入了负数。<br> |
| − | + | [[image:sensors-coordinates2.jpg ]]<br> | |
| − | 使用了关于坐标轴的旋转的地方,旋转要表示成右手系的选择。 | + | 使用了关于坐标轴的旋转的地方,旋转要表示成右手系的选择。<br> |
| − | + | [[image:sensors-coordinates3.jpg ]]<br> | |
| − | 总的来说,感应器的数据要以设备的上方的定向来取值。 如果数据要显示在屏幕上,那么数据需要变换,以符合用户界面的定向。某个感应器可能定义它的数据依赖于UI的定向,这会在感应器的文档中被注明。 | + | 总的来说,感应器的数据要以设备的上方的定向来取值。 如果数据要显示在屏幕上,那么数据需要变换,以符合用户界面的定向。某个感应器可能定义它的数据依赖于UI的定向,这会在感应器的文档中被注明。<br> |
| − | + | [[image:sensors-sides2.jpg ]]<br> | |
---- | ---- | ||
=='''使用感应器'''== | =='''使用感应器'''== | ||
| Line 37: | Line 60: | ||
下面的例子在堆上和栈上创建感应器 | 下面的例子在堆上和栈上创建感应器 | ||
| − | <code> | + | <code cpp-qt> |
// On the heap (deleted when this object is deleted) | // On the heap (deleted when this object is deleted) | ||
QAccelerometer *sensor = new QAccelerometer(this); | QAccelerometer *sensor = new QAccelerometer(this); | ||
| Line 56: | Line 79: | ||
来看一个如何获得加速度属性的例子。这段代码不需要在编译期链接到[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometer.html QAccelerometer ]或[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometerreading.html QAccelerometerReading]。 | 来看一个如何获得加速度属性的例子。这段代码不需要在编译期链接到[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometer.html QAccelerometer ]或[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometerreading.html QAccelerometerReading]。 | ||
| − | <code> | + | <code cpp-qt> |
// start the sensor | // start the sensor | ||
QSensor sensor("QAccelerometer"); | QSensor sensor("QAccelerometer"); | ||
| Line 73: | Line 96: | ||
感应器API有一个供应用开发者使用的前端,和一个供设备制造者写代码访问硬件的后端。做为应用开发者你不需要访问后端,但是通过后端理解工作原理很有帮助。 | 感应器API有一个供应用开发者使用的前端,和一个供设备制造者写代码访问硬件的后端。做为应用开发者你不需要访问后端,但是通过后端理解工作原理很有帮助。 | ||
| − | 应用程序的命令通过QSensor传递给设备插件。数据通过[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensorreading.html QSensorReading]类传回。 | + | 应用程序的命令通过QSensor传递给设备插件。数据通过[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensorreading.html QSensorReading]类传回。<br> |
| − | + | [[image:sensors-overview.png]]<br> | |
| − | 更多关于后端的信息参见[http://doc.qt.nokia.com/qtmobility-1.1.0/sensors-backend.html 感应器后端]。 | + | 更多关于后端的信息参见[http://doc.qt.nokia.com/qtmobility-1.1.0/sensors-backend.html 感应器后端]。 自定义感应器插件参看例子:[http://doc.qt.nokia.com/qtmobility-1.1.0/sensors-grueplugin.html Grue Plugin] |
---- | ---- | ||
| + | |||
=='''主要的类'''== | =='''主要的类'''== | ||
感应器API的主要有以下主要的类构成。 | 感应器API的主要有以下主要的类构成。 | ||
| − | {| | + | {| class="wikitable" |
| − | |QSensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensor.html QSensor] |
|Represents a single hardware sensor | |Represents a single hardware sensor | ||
|- | |- | ||
| − | |QSensorFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensorfilter.html QSensorFilter] |
|Efficient callback facility for asynchronous notifications of sensor changes | |Efficient callback facility for asynchronous notifications of sensor changes | ||
|- | |- | ||
| − | |QSensorReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensorreading.html QSensorReading] |
|Holds the readings from the sensor | |Holds the readings from the sensor | ||
|} | |} | ||
| Line 96: | Line 120: | ||
访问感应器数据的最佳方法是通过以下的类 | 访问感应器数据的最佳方法是通过以下的类 | ||
| − | {| | + | {| class="wikitable" |
| − | |QAccelerometerReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometerreading.html QAccelerometerReading] |
|Reports on linear acceleration along the X, Y and Z axes | |Reports on linear acceleration along the X, Y and Z axes | ||
|- | |- | ||
| − | |QAmbientLightReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qambientlightreading.html QAmbientLightReading] |
|Represents one reading from the ambient light sensor | |Represents one reading from the ambient light sensor | ||
|- | |- | ||
| − | |QCompassReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qcompassreading.html QCompassReading] |
|Represents one reading from a compass | |Represents one reading from a compass | ||
|- | |- | ||
| − | |QMagnetometerReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qmagnetometerreading.html QMagnetometerReading] |
|Represents one reading from the magnetometer | |Represents one reading from the magnetometer | ||
|- | |- | ||
| − | |QOrientationReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qorientationreading.html QOrientationReading] |
|Represents one reading from the orientation sensor | |Represents one reading from the orientation sensor | ||
|- | |- | ||
| − | |QProximityReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qproximityreading.html QProximityReading] |
|Represents one reading from the proximity sensor | |Represents one reading from the proximity sensor | ||
|- | |- | ||
| − | |QRotationReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qrotationreading.html QRotationReading] |
|Represents one reading from the rotation sensor | |Represents one reading from the rotation sensor | ||
|- | |- | ||
| − | |QTapReading | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qtapreading.html QTapReading] |
|Represents one reading from the tap sensor | |Represents one reading from the tap sensor | ||
|} | |} | ||
| Line 128: | Line 152: | ||
这些类提供良好的包装以减少类型转换的需求。每个感应器类代表一个感应器API知道的感应器类型。注意运行时可以增加类型,详情请参看[http://doc.qt.nokia.com/qtmobility-1.1.0/sensors-api.html#sensor-types 感应器类型]。 | 这些类提供良好的包装以减少类型转换的需求。每个感应器类代表一个感应器API知道的感应器类型。注意运行时可以增加类型,详情请参看[http://doc.qt.nokia.com/qtmobility-1.1.0/sensors-api.html#sensor-types 感应器类型]。 | ||
| − | {| | + | {| class="wikitable" |
| − | |QAccelerometer | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometer.html QAccelerometer] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QAmbientLightSensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qambientlightsensor.html QAmbientLightSensor] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QCompass | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qcompass.html QCompass] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QMagnetometer | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qmagnetometer.html QMagnetometer] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QOrientationSensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qorientationsensor.html QOrientationSensor] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QProximitySensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qproximitysensor.html QProximitySensor] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QRotationSensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qrotationsensor.html QRotationSensor] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|- | |- | ||
| − | |QTapSensor | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qtapsensor.html QTapSensor] |
|Convenience wrapper around QSensor | |Convenience wrapper around QSensor | ||
|} | |} | ||
| Line 160: | Line 184: | ||
类似于感应器类,这些类提供良好的包装以减少类型转换的需要。 | 类似于感应器类,这些类提供良好的包装以减少类型转换的需要。 | ||
| − | {| | + | {| class="wikitable" |
| − | |QAccelerometerFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qaccelerometerfilter.html QAccelerometerFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QAmbientLightFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qambientlightfilter.html QAmbientLightFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QCompassFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qcompassfilter.html QCompassFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QMagnetometerFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qmagnetometerfilter.html QMagnetometerFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QOrientationFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qorientationfilter.html QOrientationFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QProximityFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qproximityfilter.html QProximityFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QRotationFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qrotationfilter.html QRotationFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|- | |- | ||
| − | |QTapFilter | + | |[http://doc.qt.nokia.com/qtmobility-1.1.0/qtapfilter.html QTapFilter] |
|Convenience wrapper around QSensorFilter | |Convenience wrapper around QSensorFilter | ||
|} | |} | ||
| + | =='''例子'''== | ||
| + | 这个最简单的例子参看\examples\sensors\accel。演示了如何使用filter来高效的获得sensor的读数进一步可以参考\examples\sensors\中的其他例子,关于[http://doc.qt.nokia.com/qtmobility-1.1.0/qsensor.html#dataRate-prop QSensor::dataRate]的设置。<br> | ||
| + | accel.pro | ||
| + | |||
| + | <code text> | ||
| + | TEMPLATE=app | ||
| + | TARGET=accel | ||
| + | QT=core | ||
| + | CONFIG+=mobility | ||
| + | MOBILITY+=sensors | ||
| + | SOURCES=main.cpp | ||
| + | </code> | ||
| + | main.cpp | ||
| + | <code cpp-qt> | ||
| + | #include <QtCore> | ||
| + | #include <qaccelerometer.h> | ||
| + | |||
| + | QTM_USE_NAMESPACE | ||
| + | |||
| + | |||
| + | class AccelerometerFilter : public QAccelerometerFilter | ||
| + | { | ||
| + | public: | ||
| + | bool filter(QAccelerometerReading *reading) | ||
| + | { | ||
| + | qDebug() << "acceleration: " | ||
| + | << QString().sprintf("%0.2f %0.2f %0.2f", | ||
| + | reading->x(), | ||
| + | reading->y(), | ||
| + | reading->z()); | ||
| + | return false; // don't store the reading in the sensor | ||
| + | } | ||
| + | }; | ||
| + | |||
| + | int main(int argc, char **argv) | ||
| + | { | ||
| + | QCoreApplication app(argc, argv); | ||
| + | |||
| + | QAccelerometer sensor; | ||
| + | AccelerometerFilter filter; | ||
| + | sensor.addFilter(&filter); | ||
| + | sensor.start(); | ||
| + | |||
| + | if (!sensor.isActive()) { | ||
| + | qWarning("Accelerometer didn't start!"); | ||
| + | return 1; | ||
| + | } | ||
| + | |||
| + | return app.exec(); | ||
| + | } | ||
| + | </code> | ||
==<u>相关链接</u>== | ==<u>相关链接</u>== | ||
*[[Qt Mobility 开发]] | *[[Qt Mobility 开发]] | ||
*[[Qt_开发|Qt 开发]] | *[[Qt_开发|Qt 开发]] | ||
| − | *[[Qt Quick (Chinese)]] | + | *[[Qt Quick (Chinese)]][[Category:MeeGo Harmattan]] [[Category:Symbian]] |
| − | + | ||
| − | [[Category: | + | |
Latest revision as of 04:23, 11 October 2012
文章信息
文章
Contents |
Sensors
本文包括高层感应器,例如屏幕定向(横屏,竖屏)和 底层的实时感应器,例如加速度数据。
命名空间
QtMobility API 放在 QtMobility 的命名空间. 这是为以后Mobility APIs 集成到 Qt做准备. 参考Quickstart guide中的例子体会这个命名空间如何影响使用QtMobility的开发
感应器类型
设备上有很多种感应器,有些设备的感应器 Sensor API不支持,也可能Sensor API支持的感应器在某型设备上面没有。你可以使用 QSensor::sensorTypes() 方法来查看Sensor API可以调用的当前设备的感应器类型。
内建的感应器类型列表参见下面的 感应器类 章节。
约定习惯
如没有特别说明,感应器要使用右手直角坐标系。

为了能测量6个方向,引入了负数。

使用了关于坐标轴的旋转的地方,旋转要表示成右手系的选择。

总的来说,感应器的数据要以设备的上方的定向来取值。 如果数据要显示在屏幕上,那么数据需要变换,以符合用户界面的定向。某个感应器可能定义它的数据依赖于UI的定向,这会在感应器的文档中被注明。

使用感应器
感应器的运行周期通常是这样:
- 创建一个QSensor或其子类的实例,在堆或栈上。
- 根据应用的需要setup
- 开始接收数据
- 应用程序使用感应器数据
下面的例子在堆上和栈上创建感应器
// On the heap (deleted when this object is deleted)
QAccelerometer *sensor = new QAccelerometer(this);
// On the stack (deleted when the current scope ends)
QOrientationSensor orient_sensor;
获取感应器数据的通常模式
推荐使用读取类来处理感应器数据。尽管有些时候这样行不通,例如,你的目标设备有一种新的感应器,但是没有可用的读取类的C++头文件。
还好有Qt的 属性(property)系统,我们还是能获得感应器数据。这需要以下3条信息:
- 感应器类型
- 属性的名字或指标(index)
- 属性的类型(type)或兼容类型
来看一个如何获得加速度属性的例子。这段代码不需要在编译期链接到QAccelerometer 或QAccelerometerReading。
// start the sensor
QSensor sensor("QAccelerometer");
sensor.start();
// later
QSensorReading *reading = sensor.reading();
qreal x = reading->property("x").value<qreal>();
qreal y = reading->value(1).value<qreal>();
你可以在运行期获取所有这些信息。sensor_explorer 例子显示了关于可用感应器的信息。
前端,后端
感应器API有一个供应用开发者使用的前端,和一个供设备制造者写代码访问硬件的后端。做为应用开发者你不需要访问后端,但是通过后端理解工作原理很有帮助。
应用程序的命令通过QSensor传递给设备插件。数据通过QSensorReading类传回。

更多关于后端的信息参见感应器后端。 自定义感应器插件参看例子:Grue Plugin
主要的类
感应器API的主要有以下主要的类构成。
| QSensor | Represents a single hardware sensor |
| QSensorFilter | Efficient callback facility for asynchronous notifications of sensor changes |
| QSensorReading | Holds the readings from the sensor |
读取类
访问感应器数据的最佳方法是通过以下的类
| QAccelerometerReading | Reports on linear acceleration along the X, Y and Z axes |
| QAmbientLightReading | Represents one reading from the ambient light sensor |
| QCompassReading | Represents one reading from a compass |
| QMagnetometerReading | Represents one reading from the magnetometer |
| QOrientationReading | Represents one reading from the orientation sensor |
| QProximityReading | Represents one reading from the proximity sensor |
| QRotationReading | Represents one reading from the rotation sensor |
| QTapReading | Represents one reading from the tap sensor |
感应器类
这些类提供良好的包装以减少类型转换的需求。每个感应器类代表一个感应器API知道的感应器类型。注意运行时可以增加类型,详情请参看感应器类型。
| QAccelerometer | Convenience wrapper around QSensor |
| QAmbientLightSensor | Convenience wrapper around QSensor |
| QCompass | Convenience wrapper around QSensor |
| QMagnetometer | Convenience wrapper around QSensor |
| QOrientationSensor | Convenience wrapper around QSensor |
| QProximitySensor | Convenience wrapper around QSensor |
| QRotationSensor | Convenience wrapper around QSensor |
| QTapSensor | Convenience wrapper around QSensor |
过滤器类
类似于感应器类,这些类提供良好的包装以减少类型转换的需要。
| QAccelerometerFilter | Convenience wrapper around QSensorFilter |
| QAmbientLightFilter | Convenience wrapper around QSensorFilter |
| QCompassFilter | Convenience wrapper around QSensorFilter |
| QMagnetometerFilter | Convenience wrapper around QSensorFilter |
| QOrientationFilter | Convenience wrapper around QSensorFilter |
| QProximityFilter | Convenience wrapper around QSensorFilter |
| QRotationFilter | Convenience wrapper around QSensorFilter |
| QTapFilter | Convenience wrapper around QSensorFilter |
例子
这个最简单的例子参看\examples\sensors\accel。演示了如何使用filter来高效的获得sensor的读数进一步可以参考\examples\sensors\中的其他例子,关于QSensor::dataRate的设置。
accel.pro
TEMPLATE=app
TARGET=accel
QT=core
CONFIG+=mobility
MOBILITY+=sensors
SOURCES=main.cpp
main.cpp
#include <QtCore>
#include <qaccelerometer.h>
QTM_USE_NAMESPACE
class AccelerometerFilter : public QAccelerometerFilter
{
public:
bool filter(QAccelerometerReading *reading)
{
qDebug() << "acceleration: "
<< QString().sprintf("%0.2f %0.2f %0.2f",
reading->x(),
reading->y(),
reading->z());
return false; // don't store the reading in the sensor
}
};
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
QAccelerometer sensor;
AccelerometerFilter filter;
sensor.addFilter(&filter);
sensor.start();
if (!sensor.isActive()) {
qWarning("Accelerometer didn't start!");
return 1;
}
return app.exec();
}

