Skip to content

Technical notes on GUI

jukea edited this page Jan 8, 2013 · 2 revisions

Eye candy from other dataflow apps :

Gear added by GUI drag&drop. Code flow analysis :

  • SchemaEditor::dropEvent
  • | SchemaEditor::addGear(..)
  • | | SchemaGui::addGear(..)
  • | | | Schema::addGear(type)
  • | | | | GearMaker::makeGear(this,geartype,uniqueName)
  • | | | | | ?
  • | | | |-Schema::initGear(gear)
  • | | | | | gear->init()
  • | | | | | | gear->createGearGui(gear)
  • | | | | | | | geargui = new GearGui
  • | | | | | | | | GearGui::refresh
  • | | | | | | | | | foreach (inputs,outputs) new PlugBox
  • | | | | | | | | | setRect(coordonées)
  • | | | | | | gear::internalInit();
  • | | | |-Schema::onGearAdded
  • | | | | | foearch(Schema::QList<SchemaEventListener*>)*it->onGearAdded(this,gear)
  • | | | | | | Engine::onGearAdded
  • | | | | | | | if(playing)gear->prePlay() (pourquoi ?)
  • | | | | | | | | gear->internalPrePlay();
  • | | | Gear->getGearGui
  • | | | QGraphicsScene::addItem(

Notes :

  • Most events should be handled by QGraphicsScene (SchemaGui) directly, not bw QGraphicsView (SceneEditor). This is an unnecessary proxy

--> prePlay vs internalInit … what's the difference ?

Clone this wiki locally