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

void QEObjectMap::init_layout ( void   )  [private]

Creates and initializes widget layout

Definition at line 57 of file qeobjectmap.cpp.

References update_object().

Referenced by QEObjectMap().

                                  {
  QBoxLayout* top = new QVBoxLayout(this);

  QGroupBox* objgroup = new QVGroupBox(this, "objgroup");
  QListBox* objlist = new QListBox(objgroup, "objlist");

  empty_rep = false;
  objlist->insertItem("<none>");

#if ECA_LIBECASOUND_VERSION > 7
  const list<string>& omap = omap_rep->registered_objects();
  list<string>::const_iterator p = omap.begin();
#else
  const map<string,string>& omap = omap_rep->registered_objects();
  map<string,string>::const_iterator p = omap.begin();
#endif
  while(p != omap.end()) {
#if ECA_LIBECASOUND_VERSION > 7
    const ECA_OBJECT* obj = omap_rep->object(*p);
    if (obj != 0) 
      objlist->insertItem(obj->name().c_str());
    else
      objlist->insertItem(p->c_str());
#else
    objlist->insertItem(p->second.c_str());
#endif
    ++p;
  }
  if (omap.size() == 0) empty_rep = true;
  top->addWidget(objgroup);

  objlist->setSelected(0, true);
  update_object(0);

  QObject::connect(objlist, SIGNAL(highlighted(int)), this, SLOT(update_object(int)));
}


Generated by  Doxygen 1.6.0   Back to index