Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

void FlowCodeDocument::setPicType ( const QString &  id  ) 

Sets the type of PIC to be used. FlowCodeDocument se virtual void convertToMicrobe();ts the internal MicroInfo pointer to that returned by MicroLibrary for the given id. The pic type must be set before anything useful (such as compilage) can be done.

Definition at line 71 of file flowcodedocument.cpp.

References MicroInfo::id(), MicroSettings::microInfo(), and MicroLibrary::microInfoWithID().

Referenced by ItemDocumentData::restoreDocument().

      if ( m_microSettings && m_microSettings->microInfo() && m_microSettings->microInfo()->id() == id )
      MicroInfo *microInfo = MicroLibrary::self()->microInfoWithID(id);
      if ( !microInfo ) {
            kdWarning() << "FlowCodeDocument::setPicType: Could not set the pic type to PIC \""<<id<<"\"\n";
      m_microInfo = microInfo;
      if (m_microSettings) {
            //TODO write the pic settings to somewhere temporary and then restore them
            delete m_microSettings;
      m_microSettings = new MicroSettings(m_microInfo);
      connect( m_microSettings, SIGNAL(pinMappingsChanged()), this, SIGNAL(pinMappingsChanged()) );
      //TODO restore pic settings from temporary location if appropriate
      delete m_picItem;
      m_picItem = new PicItem( this, true, "picItem", m_microSettings );
      emit picTypeChanged();

Generated by  Doxygen 1.6.0   Back to index