QGC视图组件qml

来源:互联网 发布:mac打开u盘隐藏文件 编辑:程序博客网 时间:2024/05/21 21:43

主要视图qml

MainWindowHybrid.qml中主要是加载MainWindowInner.qml.
定义了一个Connection

Loader{    id:mainWindowInner    anchors.fill:parent    source:"MainWindowInner.qml"    Connections{        target :mainWindowInner.item        onReallyClose:controller.reallyClose()      }}
//AGCApplication.cc中qmlRegisterSingletonType<"QGroundControl",1,0,"QGroundControl",qgroundcontrolQmlGlobalSingletonFactory>
qmlRegisterSingletonType<MavlinkQmlSingleton>("QGroundControl.Mavlink",1,0,"Mavlink",mavlinkQmlSingletonFactory);//将MavlinkQmlSingleton这个类注册,唯一标识的url是QGroundControl.Mavlink。在QML中通过Mavlink可以引用。
qmlRegisterType<MavlinkQmlSingleton>("QGroundControl",1,0,"QGroundControl",mavlinkQmlSingletonFactory);
//QGroundControlQmlGlobal.ccQGroundControlQmlGlobal::QGroundControlQmlGlobal(QGCApplication *app,QGCToolbox * toolbox):QGCTool(app,toolbox),..._multiVehicleManager(NULL)
原创粉丝点击