//33 void MavSerialPort::global_position_int_handler(){ // qDebug() << "MAVLINK_MSG_ID_GLOBAL_POSITION_INT\n"; mavlink_msg_global_position_int_decode(&message, &global_position_int); setLat(global_position_int.lat); setLon(global_position_int.lon); setAlt(global_position_int.relative_alt); emit globalChanged(); }
//33 void MavSerialPort::global_position_int_handler(){ // qDebug() << "MAVLINK_MSG_ID_GLOBAL_POSITION_INT\n"; mavlink_msg_global_position_int_decode(&message, &global_position_int); emit globalChanged(); }
DatasetIsoline::DatasetIsoline( DatasetScalar* ds, float isoValue ) : Dataset( QDir( "new iso line" ), Fn::DatasetType::ISO_LINE ), m_dirty( true ), vbo0( 0 ), vbo1( 0 ), vbo2( 0 ), vbo3( 0 ), m_vertCountAxial( 0 ), m_vertCountCoronal( 0 ), m_vertCountSagittal( 0 ), m_stripeVertCountAxial( 0 ), m_stripeVertCountCoronal( 0 ), m_stripeVertCountSagittal( 0 ), m_x( 0 ), m_y( 0 ), m_z( 0 ) { m_scalarField = *(ds->getData() ); m_properties["maingl"].createInt( Fn::Property::D_NX, ds->properties( "maingl" ).get( Fn::Property::D_NX ).toInt() ); m_properties["maingl"].createInt( Fn::Property::D_NY, ds->properties( "maingl" ).get( Fn::Property::D_NY ).toInt() ); m_properties["maingl"].createInt( Fn::Property::D_NZ, ds->properties( "maingl" ).get( Fn::Property::D_NZ ).toInt() ); m_properties["maingl"].createFloat( Fn::Property::D_DX, ds->properties( "maingl" ).get( Fn::Property::D_DX ).toFloat(), "transform" ); m_properties["maingl"].createFloat( Fn::Property::D_DY, ds->properties( "maingl" ).get( Fn::Property::D_DY ).toFloat(), "transform" ); m_properties["maingl"].createFloat( Fn::Property::D_DZ, ds->properties( "maingl" ).get( Fn::Property::D_DZ ).toFloat(), "transform" ); m_properties["maingl"].createFloat( Fn::Property::D_ADJUST_X, ds->properties( "maingl" ).get( Fn::Property::D_ADJUST_X ).toFloat(), "transform" ); m_properties["maingl"].createFloat( Fn::Property::D_ADJUST_Y, ds->properties( "maingl" ).get( Fn::Property::D_ADJUST_Y ).toFloat(), "transform" ); m_properties["maingl"].createFloat( Fn::Property::D_ADJUST_Z, ds->properties( "maingl" ).get( Fn::Property::D_ADJUST_Z ).toFloat(), "transform" ); m_properties["maingl"].createInt( Fn::Property::D_DIM, 1 ); m_properties["maingl"].createInt( Fn::Property::D_CREATED_BY, (int)Fn::Algo::ISOSURFACE ); m_properties["maingl"].createInt( Fn::Property::D_TYPE, (int)Fn::DatasetType::ISO_LINE ); QString name = ds->properties( "maingl" ).get( Fn::Property::D_NAME ).toString(); if( !name.contains( "isoline" ) ) { name += " (isoline)"; } m_properties["maingl"].createString( Fn::Property::D_NAME, name ); m_properties["maingl"].createBool( Fn::Property::D_RENDER_SAGITTAL, false, "general" ); m_properties["maingl"].createBool( Fn::Property::D_RENDER_CORONAL, false, "general" ); m_properties["maingl"].createBool( Fn::Property::D_RENDER_AXIAL, true, "general" ); connect( m_properties["maingl"].getProperty( Fn::Property::D_RENDER_SAGITTAL ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); connect( m_properties["maingl"].getProperty( Fn::Property::D_RENDER_CORONAL ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); connect( m_properties["maingl"].getProperty( Fn::Property::D_RENDER_AXIAL ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); m_properties["maingl"].createFloat( Fn::Property::D_LINE_WIDTH, 1, 1, 10, "general" ); m_properties["maingl"].createFloat( Fn::Property::D_STIPPLE_GLYPH_SIZE, 1.2f, 1, 10, "general" ); m_properties["maingl"].createColor( Fn::Property::D_COLOR, Models::getGlobal( Fn::Property::G_ISOLINE_STANDARD_COLOR ).value<QColor>(), "general" ); connect( m_properties["maingl"].getProperty( Fn::Property::D_COLOR ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); m_properties["maingl"].createBool( Fn::Property::D_INTERPOLATION, true, "general" ); connect( m_properties["maingl"].getProperty( Fn::Property::D_INTERPOLATION ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); m_properties["maingl"].createFloat( Fn::Property::D_ISO_VALUE, isoValue, ds->properties( "maingl" ).get( Fn::Property::D_MIN ).toFloat(), ds->properties( "maingl" ).get( Fn::Property::D_MAX ).toFloat(), "general" ); connect( m_properties["maingl"].getProperty( Fn::Property::D_ISO_VALUE ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); m_properties["maingl"].createList( Fn::Property::D_ISOLINE_STRIPES, { "none", "45 degrees right", "45 degrees left", "vertical", "horizontal", "dots" }, 0, "general" ); connect( m_properties["maingl"].getProperty( Fn::Property::D_ISOLINE_STRIPES ), SIGNAL( valueChanged( QVariant ) ), this, SLOT( isoValueChanged() ) ); m_properties["maingl"].createFloat( Fn::Property::D_ISOLINE_STRIPES_WIDTH, 1, 1, 10, "general" ); PropertyGroup props2( m_properties["maingl"] ); m_properties.insert( "maingl2", props2 ); connect( Models::g(), SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), this, SLOT( globalChanged() ) ); }