• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ delete_it函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: find_dirs

void CodLinkCanvas::menu(const QPoint&) {
  bool new_dirs;
  CodDirsCanvas * d = find_dirs();
  CodObjCanvas * from;
  CodObjCanvas * to;

  get_start_end(from, to);
  
  if (d == 0) {
    new_dirs = TRUE;
    (d = dirs = new CodDirsCanvas(the_canvas(), this, 0))->show();
  }
  else
    new_dirs = FALSE;
  
  Q3PopupMenu m;
  Q3PopupMenu geo;
  
  m.insertItem(new MenuTitle(TR("Link"), m.font()), -1);
  m.insertSeparator();
  m.insertItem(TR("add messages to ") + from->get_full_name(), 1);
  m.insertItem(TR("add messages to ") + to->get_full_name(), 2);
  m.insertSeparator();
  m.insertItem(TR("Edit its messages"), 3);
  m.insertItem(TR("Edit all the messages"), 4);
  m.insertSeparator();
  m.insertItem(TR("Select linked items"), 7);
  m.insertSeparator();
  if (!new_dirs) {
    m.insertItem(TR("Edit drawing settings"), 5);
    m.insertSeparator();
  }
  if (get_start() != get_end()) {
    init_geometry_menu(geo, 10);
    m.insertItem(TR("Geometry (Ctrl+l)"), &geo);
    m.insertSeparator();
  }
  m.insertItem(TR("Remove from diagram"), 6);
  
  int rank = m.exec(QCursor::pos());
  
  switch (rank) {
  case 1:
    {
      CodAddMsgDialog dialog(to, from, d,
			     (ColDiagramView *) the_canvas()->get_view(),
			     FALSE);
      
      dialog.raise();
      if (dialog.exec() != QDialog::Accepted)
	return;
    }
    break;
  case 2:
    {
      CodAddMsgDialog dialog(from, to, d,
			     (ColDiagramView *) the_canvas()->get_view(),
			     TRUE);
      
      dialog.raise();
      if (dialog.exec() != QDialog::Accepted)
	return;
    }
    break;
  case 3:
    CodEditMsgDialog::exec((ColDiagramView *) the_canvas()->get_view(), d->get_msgs());
    return;
  case 4:
    CodEditMsgDialog::exec((ColDiagramView *) the_canvas()->get_view(),
			   ((ColDiagramView *) the_canvas()->get_view())->get_msgs());
    return;
  case 5:
    if (d->edit_drawing_settings())
      modified();
    return;
  case 6:
    delete_it();
    ((ColDiagramView *) the_canvas()->get_view())->update_msgs();
    break;
  case 7:
    select_associated();
    return;
  default:
    if (rank >= 10) {
      rank -= 10;
      if (rank == RecenterBegin)
	set_decenter(-1.0, decenter_end);
      else if (rank == RecenterEnd)
	set_decenter(decenter_begin, -1.0);
      else if (rank != (int) geometry)
	set_geometry((LineGeometry) rank, TRUE);
      else
	return;
    }
    else
      return;
  }
  
  package_modified();
  
//.........这里部分代码省略.........
开发者ID:kralf,项目名称:bouml,代码行数:101,代码来源:CodLinkCanvas.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ delete_list函数代码示例发布时间:2022-05-30
下一篇:
C++ delete_file函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap