Ejemplo n.º 1
0
void RelationData::emitRelationChanged() const
{
    if (!this->m_relation)
        return;

    if(this->m_redrawAllowed)
        emit relationChanged();
}
Ejemplo n.º 2
0
function::function(QWidget *parent):
        QWidget(parent)
{
    lastNum=0;
    relation.addItem(tr("min"));
    relation.addItem(tr("max"));
    connect(&relation,SIGNAL(currentIndexChanged(QString)),this,SLOT(relationChanged(QString)));
    mainLayout=new QHBoxLayout(this);
    lblZ=new QLabel(tr("z = "));
    mainLayout->addWidget(lblZ);
    set();
}
Ejemplo n.º 3
0
bool RelationData::setTableBit(unsigned int x, unsigned int y, int b)
{
    if (!this->m_relation)
        return false;

    if (!rf_table_set_bit(this->m_relation->table, x, y, b)){
        if(this->m_redrawAllowed)
            emit relationChanged();
        return true;
    }else{
        return false;
    }
}
Ejemplo n.º 4
0
void QgsRelationReferenceConfigDlg::setConfig( const QgsEditorWidgetConfig& config )
{
  if ( config.contains( "AllowNULL" ) )
  {
    mCbxAllowNull->setChecked( config.value( "AllowNULL" ).toBool() );
  }

  if ( config.contains( "OrderByValue" ) )
  {
    mCbxOrderByValue->setChecked( config.value( "OrderByValue" ).toBool() );
  }

  if ( config.contains( "ShowForm" ) )
  {
    mCbxShowForm->setChecked( config.value( "ShowForm" ).toBool() );
  }

  if ( config.contains( "Relation" ) )
  {
    mComboRelation->setCurrentIndex( mComboRelation->findData( config.value( "Relation" ).toString() ) );
    relationChanged( mComboRelation->currentIndex() );
  }

  if ( config.contains( "MapIdentification" ) )
  {
    mCbxMapIdentification->setChecked( config.value( "MapIdentification" ).toBool() );
  }

  if ( config.contains( "AllowAddFeatures" ) )
    mCbxAllowAddFeatures->setChecked( config.value( "AllowAddFeatures" ).toBool() );

  if ( config.contains( "ReadOnly" ) )
  {
    mCbxReadOnly->setChecked( config.value( "ReadOnly" ).toBool() );
  }

  if ( config.contains( "FilterFields" ) )
  {
    mFilterGroupBox->setChecked( true );
    Q_FOREACH ( const QString& fld, config.value( "FilterFields" ).toStringList() )
    {
      addFilterField( fld );
    }

    mCbxChainFilters->setChecked( config.value( "ChainFilters" ).toBool() );
  }
Ejemplo n.º 5
0
//--------------------------------------------------------------------------------
bool QmvSqlQuery::updateRelationSet()
{
    int status = getRelation()->open( sqlQuery(), controller );
    if ( controller )
        controller->reset();
    
    if ( status < 0 )
    {
        query_errormessage = getRelation()->lastError();
        query_status = false;
    } else {
        query_errormessage = "";
        query_status = true;
        emit relationChanged( getRelation() );
    }
    
    emit queryStatus( status, getRelation() );        
    return query_status;
}
Ejemplo n.º 6
0
void RelationData::importRelation(const RF_RELATION* rel)
{
    if (!rel)
        return;

    if (this->m_relation)
        rf_relation_destroy(this->m_relation);


    this->m_relation = rf_relation_copy((RF_RELATION*) rel);
    //due to the uniqueness of relation names relafix does not copie
    //the relation name itself when using rf_relation_copy
    //so a manual copy is necessary
    if(!this->m_relation->name){
       this->m_relation->name = rf_string_copy(rel->name);
    }

    if (this->m_redrawAllowed)
        emit relationChanged();
}