예제 #1
0
파일: ColMsgTable.cpp 프로젝트: kralf/bouml
void ColMsgTable::refresh(ColMsgList & m) {
  ColMsg * msg;
  Q3PtrListIterator<ColMsg> it(m);
  
  for ( ; (msg = it.current()) != 0; ++it) {
    QString def = msg->def(FALSE, TRUE, UmlView, DefaultShowContextMode);
    CodObjCanvas * from;
    CodObjCanvas * to;
    int r = numRows();
    
    msg->in->get_from_to(from, to, msg->is_forward);
    
    setNumRows(r + 1);
    
    setItem(r, ABS_RANK_COL, new MsgTableItem(this, msg->absolute_rank));
    setItem(r, HI_RANK_COL, new MsgTableItem(this, msg->hierarchical_rank));
    setItem(r, FROM_COL, new MsgTableItem(this, from->get_full_name()));
    setItem(r, MSG_COL, new MsgTableItem(this, def.mid(def.find(' ') + 1)));
    setItem(r, TO_COL, new MsgTableItem(this, to->get_full_name()));
    setItem(r, CMD_COL, new MsgTableItem(this, TR("do"), Qt::AlignHCenter));
    
    flat_msg_list.append(msg);
    
    if (rec)
      refresh(msg->msgs);
  }
}
예제 #2
0
파일: ColMsgTable.cpp 프로젝트: kralf/bouml
void ColMsgTable::edit_msg(int row) {
  ColMsg * msg = flat_msg_list[row];
  
  CodChangeMsgDialog d(this, msg);
  
  if (d.exec() == QDialog::Accepted) {
    QString def = msg->def(FALSE, TRUE, UmlView, DefaultShowContextMode);
    
    msg->in->update_msgs();
    item(row, MSG_COL)->setText(def.mid(def.find(' ') + 1));
    updateCell(row, MSG_COL);
  }
}