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


C++ Q3CanvasItemList::end方法代码示例

本文整理汇总了C++中Q3CanvasItemList::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3CanvasItemList::end方法的具体用法?C++ Q3CanvasItemList::end怎么用?C++ Q3CanvasItemList::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Q3CanvasItemList的用法示例。


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

示例1: if

		void RegularData1DWidget::onNotify(Message *message)
		{
			if (!RTTI::isKindOf<RegularData1DMessage>(*message))
			{
				return;
			}

			RegularData1DMessage& msg = *(RegularData1DMessage*) message;
			if (msg.getData() != data_) return;

			if ((RegularData1DMessage::RegularDataMessageType) msg.getType() 
						== RegularData1DMessage::UPDATE)
			{
				createPlot();
			}
			else if ((RegularData1DMessage::RegularDataMessageType) msg.getType() 
									== RegularData1DMessage::REMOVE)
			{
				data_ = 0;

				Q3CanvasItemList list = canvas()->allItems();
				Q3CanvasItemList::Iterator it = list.begin();
				for (; it != list.end(); ++it) 
				{
					if ( *it ) delete *it;
				}
			}
		}
开发者ID:HeyJJ,项目名称:ball,代码行数:28,代码来源:regularData1DWidget.C

示例2: collisions

Q3CanvasItem * UmlCanvas::collision(const QPoint & p) const
{
    Q3CanvasItemList l = collisions(p);
    Q3CanvasItemList::ConstIterator it;
    Q3CanvasItemList::ConstIterator end = l.end();
    ArrowCanvas * arrow = 0;

    for (it = l.begin(); it != end; ++it)
        if (((*it)->visible()) && // at least not deleted
            !isa_alien(*it) &&
            !isa_col_msg_dirs(*it)) {
            switch ((*it)->rtti()) {
            case RTTI_ARROW:
                if (arrow == 0)
                    arrow = (ArrowCanvas *) *it;

                break;

            case RTTI_LABEL:
                return (arrow == 0) ? *it : arrow;

            default:
                // isa DiagramCanvas
                return ((arrow == 0) ||
                        (small_element(((DiagramCanvas *) *it)->rect()) &&
                         ((DiagramCanvas *) *it)->attached_to(arrow)))
                       ? *it : arrow;
            }
        }

    return arrow;
}
开发者ID:harmegnies,项目名称:douml,代码行数:32,代码来源:UmlCanvas.cpp

示例3: prepare_for_move

void PackageCanvas::prepare_for_move(bool on_resize) {
  if (! on_resize) {
    DiagramCanvas::prepare_for_move(on_resize);
    
    Q3CanvasItemList l = collisions(TRUE);
    Q3CanvasItemList::ConstIterator it;
    Q3CanvasItemList::ConstIterator end = l.end();
    DiagramItem * di;
    BrowserNode * p = get_bn();
  
    for (it = l.begin(); it != end; ++it) {
      if ((*it)->visible() && // at least not deleted
	  !(*it)->selected() &&
	  ((di = QCanvasItemToDiagramItem(*it)) != 0) &&
	  di->move_with_its_package()) {
	BrowserNode * bn = di->get_bn();
	
	do
	  bn = (BrowserNode *) bn->parent();
	while (bn->get_type() != UmlPackage);
	
	if (bn == p) {
	  the_canvas()->select(*it);
	  di->prepare_for_move(FALSE);
	}
      }
    }
  }
}
开发者ID:kralf,项目名称:bouml,代码行数:29,代码来源:PackageCanvas.cpp

示例4: send

void SubjectCanvas::send(ToolCom * com, Q3CanvasItemList & all)
{
  Q3PtrList<SubjectCanvas> subjects;
  Q3CanvasItemList::Iterator cit;

  for (cit = all.begin(); cit != all.end(); ++cit) {
    DiagramItem *di = QCanvasItemToDiagramItem(*cit);
    
    if ((di != 0) && 
	(*cit)->visible() &&
	(di->type() == UmlSubject))
      subjects.append((SubjectCanvas *) di);
  }
  
  com->write_unsigned(subjects.count());
  
  SubjectCanvas * sc;
  
  for (sc = subjects.first(); sc != 0; sc = subjects.next()) {
    Q3CString s = fromUnicode(sc->name);
    
    com->write_string((const char *) s);
    com->write(sc->rect());
  }
}
开发者ID:SciBoy,项目名称:douml,代码行数:25,代码来源:SubjectCanvas.cpp

示例5: update_msg_supports

void ColDiagramView::update_msg_supports()
{
    Q3CanvasItemList l = canvas()->allItems();
    Q3CanvasItemList::Iterator it;

    for (it = l.begin(); it != l.end(); ++it) {
        if ((*it)->visible()) { // at least not deleted
            DiagramItem * di = QCanvasItemToDiagramItem(*it);

            if (di != 0) {
                switch (di->type()) {
                case UmlSelfLink:
                    ((CodSelfLinkCanvas *) di)->update_msgs();
                    break;

                case UmlLinkDirs:
                    ((CodDirsCanvas *) di)->update_msgs();
                    break;

                default:	// to avoid compiler warning
                    break;
                }
            }
        }
    }
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:26,代码来源:ColDiagramView.cpp

示例6: force_inside

// if elt parent is present, force inside it
bool ActivityContainerCanvas::force_inside(DiagramCanvas * elt, bool part)
{
  // if its parent is present, force inside it  
  Q3CanvasItemList all = elt->the_canvas()->allItems();
  Q3CanvasItemList::Iterator cit;
  BrowserNode * parent = (BrowserNode *) elt->get_bn()->parent();

  for (cit = all.begin(); cit != all.end(); ++cit) {
    if ((*cit)->visible()) {
      DiagramItem * di = QCanvasItemToDiagramItem(*cit);
      
      if ((di != 0) &&
	  IsaActivityContainer(di->type(), part) &&
	  (((ActivityContainerCanvas *) di)->get_bn() == parent)) {
	BooL under = FALSE;
	
	((ActivityContainerCanvas *) di)->force_inside(elt, elt, under);
	
	if (under)
	  elt->upper();
	
	return TRUE;
      }
    }
  }
  
  elt->upper();
  return FALSE;
}
开发者ID:SciBoy,项目名称:douml,代码行数:30,代码来源:ActivityContainerCanvas.cpp

示例7: draw_all_relations

void ArtifactCanvas::draw_all_relations() {
  if (strcmp(browser_node->get_stereotype(), "source") != 0)
    // may start association
    update_relations();
  else if (!DrawingSettings::just_modified() &&
	   !on_load_diagram()) {
    // remove all association starting from 'this'
    Q3PtrListIterator<ArrowCanvas> it(lines);
    
    while (it.current()) {
      if ((it.current()->type() == UmlContain) &&
	  (((AssocContainCanvas *) it.current())->get_start() == this))
	it.current()->delete_it();
      else
	++it;
    }
    
    // update non source artifact vis a vis 'this'
    Q3CanvasItemList all = canvas()->allItems();
    Q3CanvasItemList::Iterator cit;
    
    for (cit = all.begin(); cit != all.end(); ++cit) {
      if ((*cit)->visible()) {
	DiagramItem * adi = QCanvasItemToDiagramItem(*cit);
	
	if ((adi != 0) &&		// an uml canvas item
	    (adi->type() == UmlArtifact) &&
	    strcmp(((ArtifactCanvas *) adi)->browser_node->get_stereotype(), "source"))
	  ((ArtifactCanvas *) adi)->update_relations(this);
      }
    }
  }
}
开发者ID:kralf,项目名称:bouml,代码行数:33,代码来源:ArtifactCanvas.cpp

示例8: clear

void CanvasDialog::clear()
{
	Q3CanvasItemList list = m_canvasView->canvas()->allItems();
	Q3CanvasItemList::Iterator it = list.begin();
	for( ; it != list.end(); ++it )
	{
		if ( *it ) delete *it;
	}
}
开发者ID:JohnAGoldsmith,项目名称:lxa420,代码行数:9,代码来源:canvasdialog.cpp

示例9: onLinePath

/**
 * Returns -1 if the given point is not on the line.
 * else returns the line segment the point is on.
 * Use the value to insert points at the point position.
 */
int LinePath::onLinePath( const QPoint &position )
{
    Q3CanvasItemList list = getScene()->collisions( position );
    int index = -1;

    Q3CanvasItemList::iterator end(list.end());
    for(Q3CanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
        if( ( index = m_LineList.indexOf( (Q3CanvasLine*)*item_it ) ) != -1 )
            break;
    }//end for
    return index;
}
开发者ID:Elv13,项目名称:Umbrello-ng,代码行数:17,代码来源:linepath.cpp

示例10: QCanvasItemToDiagramItem

DiagramItemList::DiagramItemList(Q3CanvasItemList l)
{
    Q3CanvasItemList::Iterator it;

    for (it = l.begin(); it != l.end(); ++it) {
        if ((*it)->visible()) {
            DiagramItem * di = QCanvasItemToDiagramItem(*it);

            if (di != 0)
                append(di);
        }
    }
}
开发者ID:harmegnies,项目名称:douml,代码行数:13,代码来源:DiagramItem.cpp

示例11: buildXML

void ReportSection::buildXML(QDomDocument & doc, QDomElement & section) {
    //qDebug("ReportSection::buildXML()");
    float f = (float)canvas->height() / dpiY * 100.0;
    f = ((f - (int)f) > .5 ? (int)f : (int)f + 1);
    QDomElement height = doc.createElement("height");
    height.appendChild(doc.createTextNode(QString::number((int)f)));
    section.appendChild(height);

    // now get a list of all the QCanvasItems on this canvas and output them.
    Q3CanvasItemList list = canvas->allItems();
    for(Q3CanvasItemList::iterator it = list.begin();
          it != list.end(); it++ ) {
          ReportEntity::buildXML((*it),doc,section);
    }
}
开发者ID:Wushaowei001,项目名称:xtuple,代码行数:15,代码来源:reportsection.cpp

示例12: collisionsFiltered

Q3CanvasItemList DigitView::collisionsFiltered(Q3CanvasItemList listIn, int rtti)
{
  // filter out all but the desired types
  Q3CanvasItemList listOut;

  Q3CanvasItemList::iterator itrIn;
  for (itrIn = listIn.begin(); itrIn != listIn.end(); ++itrIn)
  {
    ASSERT_ENGAUGE((*itrIn) != 0);
    if ((*itrIn)->rtti() == rtti)
      listOut.append(*itrIn);
  }

  return listOut;
}
开发者ID:crayxt,项目名称:digitizer,代码行数:15,代码来源:digitview.cpp

示例13: already_drawn

bool UmlCanvas::already_drawn(BrowserNode * bn) {
  Q3CanvasItemList all = allItems();
  Q3CanvasItemList::Iterator cit;
  UmlCode k = bn->get_type();

  for (cit = all.begin(); cit != all.end(); ++cit) {
    if ((*cit)->visible()) {
      DiagramItem * di = QCanvasItemToDiagramItem(*cit);
    
      if ((di != 0) && (di->type() == k) && (di->get_bn() == bn))
	return TRUE;
    }
  }

  return FALSE;
}
开发者ID:SciBoy,项目名称:douml,代码行数:16,代码来源:UmlCanvas.cpp

示例14: drop

void SimpleRelationCanvas::drop(BrowserNode * bn, UmlCanvas * canvas)
{
    SimpleRelationData * def = (SimpleRelationData *) bn->get_data();
    BrowserNode * from = def->get_start_node();
    BrowserNode * to = def->get_end_node();
    DiagramItem * ccfrom = 0;
    DiagramItem * ccto = 0;
    Q3CanvasItemList all = canvas->allItems();
    Q3CanvasItemList::Iterator cit;

    // the two classes are drawn ?
    for (cit = all.begin(); cit != all.end(); ++cit) {
        if ((*cit)->visible()) {
            DiagramItem * adi = QCanvasItemToDiagramItem(*cit);

            if (adi != 0) {
                if (adi->get_bn() == from) {
                    ccfrom = adi;

                    if (ccto != 0)
                        break;
                }

                if (adi->get_bn() == to) {
                    ccto = adi;

                    if (ccfrom != 0)
                        break;
                }
            }
        }
    }

    if ((ccfrom != 0) && (ccto != 0)) {
        if (ccfrom->has_relation(def))
            msg_information("Douml", "relation already drawn");
        else {
            SimpleRelationCanvas * rel =
                new SimpleRelationCanvas(canvas, ccfrom, ccto, from,
                                         bn->get_type(), 0, -1.0, -1.0, def);

            rel->show();
            rel->package_modified();
        }
    }
}
开发者ID:harmegnies,项目名称:douml,代码行数:46,代码来源:SimpleRelationCanvas.cpp

示例15: force_sub_upper

// update sub nodes to be upper this, recursively
void ActivityContainerCanvas::force_sub_upper(Q3CanvasItemList & all) {
  Q3CanvasItemList::Iterator cit;
  BrowserNode * browser_node = get_bn();
  
  for (cit = all.begin(); cit != all.end(); ++cit) {
    if ((*cit)->visible()) {
      DiagramItem * di = QCanvasItemToDiagramItem(*cit);
      
      if ((di != 0) &&
	  (di->get_bn() != 0) &&
	  (((BrowserNode *) di->get_bn())->parent() == browser_node)) {
	  // must look at the type because some canvas items have browser_node
	  // attr equals to the diagram and the parent of the diagram is the activity
	  switch (di->type()) {
	  case UmlActivityObject:
	  case UmlActivityAction:
	  case UmlActivityPartition:
	  case UmlExpansionRegion:
	  case UmlInterruptibleActivityRegion:
	  case InitialAN:
	  case FlowFinalAN:
	  case ActivityFinalAN:
	  case DecisionAN:
	  case MergeAN:
	  case ForkAN:
	  case JoinAN:	    
	    if ((*cit)->z() <= z())
	      ((DiagramCanvas *) di)->upper();
	    
	    {
	      ActivityContainerCanvas * cntr =
		dynamic_cast<ActivityContainerCanvas *>(di);
	      
	      if (cntr != 0)
		cntr->force_sub_upper(all);
	    }
	    break;
	  default:
	    break;
	  }
      }
    }
  }  
}
开发者ID:SciBoy,项目名称:douml,代码行数:45,代码来源:ActivityContainerCanvas.cpp


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