当前位置: 首页>>代码示例>>C++>>正文


C++ delete_it函数代码示例

本文整理汇总了C++中delete_it函数的典型用法代码示例。如果您正苦于以下问题:C++ delete_it函数的具体用法?C++ delete_it怎么用?C++ delete_it使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了delete_it函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: while

void AssocContainCanvas::remove(bool from_model) {
  if (!from_model) {
    if (the_canvas()->must_draw_all_relations()) {
      const AssocContainCanvas * a = this;
  
      while (a->begin->type() == UmlArrowPoint) {
	a = (AssocContainCanvas *) ((ArrowPointCanvas *) a->begin)->get_other(a);
	if (a == 0)
	  break;
      }

      if (a && !a->begin->isSelected() && !a->begin->get_bn()->deletedp()) {
	a = this;
  
	while (a->end->type() == UmlArrowPoint) {
	  a = (AssocContainCanvas *) ((ArrowPointCanvas *) a->end)->get_other(a);
	  if (a == 0)
	    break;
	}
  
	if (a && !a->end->isSelected() && !a->end->get_bn()->deletedp()) {
	  msg_warning("Bouml", TR("<i>Draw all relations</i> forced to <i>no</i>"));
	  the_canvas()->dont_draw_all_relations();
	}
      }
    }
    delete_it();
  }
  else
    get_start()->unassociate(get_end());	// line will be deleted
}
开发者ID:SciBoy,项目名称:douml,代码行数:31,代码来源:AssocContainCanvas.cpp

示例2: fromUnicode

void TextCanvas::open()
{
    static QSize sz;

    // warning : 'note' is already unicode
    QString s = fromUnicode(text);
    bool created = s.isEmpty();

    MLEDialog::get(s, QCursor::pos(), sz);

    if (s.isEmpty())
        delete_it();
    else {
        text = s;

        if (created) {
            QFontMetrics fm(the_canvas()->get_font(UmlNormalFont));
            QSize sz = fm.size(0, text);

            DiagramCanvas::resize(sz.width(), sz.height());
        }

        // force son reaffichage
        hide();
        show();
    }

    canvas()->update();

    package_modified();
}
开发者ID:ErickCastellanos,项目名称:douml,代码行数:31,代码来源:TextCanvas.cpp

示例3: delete_it

void UcUseCaseCanvas::remove(bool from_model)
{
    if (! from_model)
        delete_it();
    else
        browser_node->delete_it();	// will remove canvas
}
开发者ID:harmegnies,项目名称:douml,代码行数:7,代码来源:UcUseCaseCanvas.cpp

示例4: delete_it

void OdClassInstCanvas::remove(bool from_model)
{
    if (! from_model)
        delete_it();
    else
        browser_node->delete_it();	// will remove canvas
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:7,代码来源:OdClassInstCanvas.cpp

示例5: delete_it

void ArrowJunctionCanvas::remove_line(ArrowCanvas * l, bool onbrkjoin)
{
    DiagramItem::remove_line(l, onbrkjoin);

    if (!onbrkjoin && lines.isEmpty())
        delete_it();
}
开发者ID:harmegnies,项目名称:douml,代码行数:7,代码来源:ArrowJunctionCanvas.cpp

示例6: while

void SimpleRelationCanvas::remove(bool from_model)
{
    if (! from_model) {
        if (the_canvas()->must_draw_all_relations()) {
            const SimpleRelationCanvas * a = this;

            while (a->begin->type() == UmlArrowPoint) {
                a = (SimpleRelationCanvas *)((ArrowPointCanvas *) a->begin)->get_other(a);

                if (a == 0)
                    break;
            }

            if (a && !a->begin->isSelected() && !a->begin->get_bn()->deletedp()) {
                a = this;

                while (a->end->type() == UmlArrowPoint) {
                    a = (SimpleRelationCanvas *)((ArrowPointCanvas *) a->end)->get_other(a);

                    if (a == 0)
                        break;
                }

                if (a && !a->end->isSelected() && !a->end->get_bn()->deletedp()) {
                    msg_warning("Douml", "<i>Draw all relations</i> forced to <i>no</i>");
                    the_canvas()->dont_draw_all_relations();
                }
            }
        }

        delete_it();
    }
    else
        data->delete_it();	// will remove canvas
}
开发者ID:harmegnies,项目名称:douml,代码行数:35,代码来源:SimpleRelationCanvas.cpp

示例7: delete_it

void SdDurationCanvas::remove(SdDurationCanvas * d) {
  durations.remove(d);
  
  if (msgs.isEmpty() && durations.isEmpty())
    // now useless, remove it
    delete_it();
}
开发者ID:kralf,项目名称:bouml,代码行数:7,代码来源:SdDurationCanvas.cpp

示例8: m

void SubjectCanvas::menu(const QPoint&) {
  Q3PopupMenu m(0);
  
  MenuFactory::createTitle(m, TR("Subject"));
  m.insertSeparator();
  m.insertItem(TR("Upper"), 0);
  m.insertItem(TR("Lower"), 1);
  m.insertItem(TR("Go up"), 6);
  m.insertItem(TR("Go down"), 7);
  m.insertSeparator();
  m.insertItem(TR("Edit"), 2);
  m.insertSeparator();
  m.insertItem(TR("Edit drawing settings"), 3);
  if (linked()) {
    m.insertSeparator();
    m.insertItem(TR("Select linked items"), 4);
  }
  m.insertSeparator();
  m.insertItem(TR("Remove from diagram"),5);

  int index = m.exec(QCursor::pos());
  
  switch (index) {
  case 0:
    upper();
    modified();	// call package_modified()
    return;
  case 1:
    lower();
    modified();	// call package_modified()
    return;
  case 6:
    z_up();
    modified();	// call package_modified()
    return;
  case 7:
    z_down();
    modified();	// call package_modified()
    return;
  case 2:
    open();
    // modified then package_modified already called
    return;
  case 3:
    edit_drawing_settings();
    return;
  case 4:
    the_canvas()->unselect_all();
    select_associated();
    return;
  case 5:
    delete_it();
    break;
  default:
    return;
  }
  
  package_modified();
}
开发者ID:SciBoy,项目名称:douml,代码行数:59,代码来源:SubjectCanvas.cpp

示例9: switch

void qm_plistview::keyPressEvent(QKeyEvent *event)
{
    switch (event->key())
    {
        case Qt::Key_Return:
        {
            on_item_dclicked(currentItem());
            break;
        }

        case Qt::Key_Delete:
        {
            delete_it();
            break;
        }

        case Qt::Key_Space:
        {
            if (current_songPos != -1 && current_songPos < topLevelItemCount() )
                scrollToItem(topLevelItem(current_songPos));
            break;
        }

        case Qt::Key_Home:
        {
            if (topLevelItemCount() > 0)
                scrollToItem(topLevelItem(0));
            break;
        }

        case Qt::Key_End:
        {
            if (topLevelItemCount() > 0)
                scrollToItem(topLevelItem(topLevelItemCount() - 1));
            break;
        }

        case Qt::Key_Down:
        {
            if (currentItem()->get_pos < topLevelItemCount())
                setCurrentItem(itemBelow ( currentItem() ));
            break;
        }

        case Qt::Key_Up:
        {
            if (currentItem()->get_pos > 1)
                setCurrentItem(itemAbove ( currentItem() ));
            break;
        }

        default:
            QTreeWidget::keyPressEvent(event);
    }
}
开发者ID:ronalde,项目名称:quimup-packaging,代码行数:55,代码来源:qm_playlistview.cpp

示例10: m

void FragmentSeparatorCanvas::menu(const QPoint&) {
  Q3PopupMenu m(0);
  
  MenuFactory::createTitle(m, TR("Separator"));
  m.insertSeparator();
  m.insertItem(TR("Remove from diagram"), 1);
  
  if (m.exec(QCursor::pos()) == 1) {
    delete_it();
    package_modified();
  }
}
开发者ID:SciBoy,项目名称:douml,代码行数:12,代码来源:FragmentSeparatorCanvas.cpp

示例11: TR

void HubCanvas::menu(const QPoint &)
{
    Q3PopupMenu m;

    MenuFactory::createTitle(m, TR("Network connexion"));
    m.insertSeparator();
    m.insertItem(TR("Remove from diagram"), 0);

    switch (m.exec(QCursor::pos())) {
    case 0:
        delete_it();
        break;

    default:
        return;
    }

    package_modified();
}
开发者ID:harmegnies,项目名称:douml,代码行数:19,代码来源:HubCanvas.cpp

示例12: disconnect

void IconCanvas::deleted() {
  disconnect(browser_node->get_data(), SIGNAL(deleted()), this, SLOT(deleted()));
  delete_it();
  canvas()->update();
}
开发者ID:kralf,项目名称:bouml,代码行数:5,代码来源:IconCanvas.cpp

示例13: m

void IconCanvas::menu(const QPoint&) {
  Q3PopupMenu m(0);
  
  m.insertItem(new MenuTitle(browser_node->get_name() + TR("\nshort cut"), m.font()), -1);
  m.insertSeparator();
  m.insertItem(TR("Upper"), 0);
  m.insertItem(TR("Lower"), 1);
  m.insertItem(TR("Go up"), 6);
  m.insertItem(TR("Go down"), 7);
  m.insertSeparator();
  if (! browser_node->deletedp()) {
    m.insertItem(TR("Open"), 2);
    m.insertSeparator();
  }
  m.insertItem(TR("Select diagram in browser"), 3);
  m.insertItem(TR("Select linked items"), 4);
  m.insertSeparator();
  m.insertItem(TR("Remove from diagram"),5);

  switch (m.exec(QCursor::pos())) {
  case 0:
    upper();
    // force son reaffichage
    hide();
    show();
    canvas()->update();
    break;
  case 1:
    lower();
    // force son reaffichage
    hide();
    show();
    canvas()->update();
    break;
  case 6:
    z_up();
    // force son reaffichage
    hide();
    show();
    canvas()->update();
    break;
  case 7:
    z_down();
    // force son reaffichage
    hide();
    show();
    canvas()->update();
    break;
  case 2:
    browser_node->open(FALSE);
    return;
  case 3:
    browser_node->select_in_browser();
    return;
  case 4:
    the_canvas()->unselect_all();
    select_associated();
    return;
  case 5:
    // delete
    delete_it();
    break;
  default:
    return;
  }
  
  package_modified();
}
开发者ID:kralf,项目名称:bouml,代码行数:68,代码来源:IconCanvas.cpp

示例14: delete_it

void RelationData::end_deleted()
{
    // the unidirectionnal relation end class is removed
    start->package_modified();
    delete_it();
}
开发者ID:harmegnies,项目名称:douml,代码行数:6,代码来源:RelationData.cpp

示例15: delete_it

void SimpleRelationCanvas::deleted()
{
    delete_it();
    canvas()->update();
    package_modified();
}
开发者ID:harmegnies,项目名称:douml,代码行数:6,代码来源:SimpleRelationCanvas.cpp


注:本文中的delete_it函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。