Exemple #1
0
void BSymbol::writeProperties(XmlWriter& xml) const
      {
      if (systemFlag())
            xml.tag("systemFlag", systemFlag());
      for (const Element* e : leafs())
            e->write(xml);
      Element::writeProperties(xml);
      }
Exemple #2
0
void Symbol::layout()
{
    foreach(Element* e, leafs())
        e->layout();
    ElementLayout::layout(this);
    BSymbol::layout();
    setbbox(_scoreFont ? _scoreFont->bbox(_sym, magS()) : symBbox(_sym));
}
Exemple #3
0
void Symbol::layout()
      {
//      qreal m = parent() ? parent()->mag() : 1.0;
//      if (_small)
//            m *= score()->styleD(ST_smallNoteMag);
//      setMag(m);
      foreach(Element* e, leafs())
            e->layout();
      ElementLayout::layout(this);
      BSymbol::layout();
      setbbox(symbols[score()->symIdx()][_sym].bbox(magS()));
      }
		int	currentCellWidth
			(const QModelIndex& searchedIndex,
			 const QModelIndex& leafIndex,
			 int sectionIndex,
			 const QHeaderView* hv) const
		{
			QModelIndexList leafsList(leafs(searchedIndex));
			if(leafsList.empty())
				return hv->sectionSize(sectionIndex);
			int width=0;
			int firstLeafSectionIndex=sectionIndex-leafsList.indexOf(leafIndex);
			for(int i=0; i<leafsList.size(); ++i)
				width+=hv->sectionSize(firstLeafSectionIndex+i);
			return width;
		}
		int	currentCellLeft
			(const QModelIndex& searchedIndex,
			 const QModelIndex& leafIndex,
			 int sectionIndex,
			 int left,
			 const QHeaderView* hv) const
		{
			QModelIndexList leafsList(leafs(searchedIndex));
			if(!leafsList.empty())
			{
				int n=leafsList.indexOf(leafIndex);
				int firstLeafSectionIndex=sectionIndex-n;
				--n;
				for(; n>=0; --n)
					left-=hv->sectionSize(firstLeafSectionIndex+n);
			}
			return left;
		}