Ejemplo n.º 1
0
void getLinesFromFigures(TSafeVector * lines, TSafeVector * v,int n)
{
	int j = lines->length();
	for(int i=0; i<(v->length()); i++)
	{
		for(int k=1; k<=n; k++)
		{
			if(n==4)
			{//4х-угольник
				if(!hasLine(lines, ((TRectangle*)(v->get(i)))->getLine(k))) 
				{
					lines->setat(((TRectangle*)(v->get(i)))->getLine(k),j);
					j++;
				}
			}
			else
			{//3х-угольник
				if(!hasLine(lines, ((Triangle*)(v->get(i)))->getLine(k))) 
				{
					lines->setat(((Triangle*)(v->get(i)))->getLine(k),j);
					j++;
				}
			}
		}
	}
}
Ejemplo n.º 2
0
QVariant Ambitus::getProperty(Pid propertyId) const
      {
      switch(propertyId) {
            case Pid::HEAD_GROUP:
                  return int(noteHeadGroup());
            case Pid::HEAD_TYPE:
                  return int(noteHeadType());
            case Pid::MIRROR_HEAD:
                  return int(direction());
            case Pid::GHOST:                 // recycled property = _hasLine
                  return hasLine();
            case Pid::LINE_WIDTH:
                  return lineWidth();
            case Pid::TPC1:
                  return topTpc();
            case Pid::FBPARENTHESIS1:        // recycled property = _bottomTpc
                  return bottomTpc();
            case Pid::PITCH:
                  return topPitch();
            case Pid::FBPARENTHESIS2:        // recycled property = _bottomPitch
                  return bottomPitch();
            case Pid::FBPARENTHESIS3:        // recycled property = octave of _topPitch
                  return topOctave();
            case Pid::FBPARENTHESIS4:        // recycled property = octave of _bottomPitch
                  return bottomOctave();
            default:
                  return Element::getProperty(propertyId);
            }
      }
Ejemplo n.º 3
0
void MultiReader::waitForLine() {
  while(hasLine() == false) {
    doSelect(NULL);
  }
}