int alinhamento_rec(char **S, Vertex *Mtz, unsigned int *tams, unsigned int *indexp, unsigned int pos, VUTIL des) { int pant = volta(pos, des, indexp), /* Ponto anterior. */ vw, /* Valor de retorno das recursões. */ valor = INT_MIN, /* Maior valor das recursões. */ watu = W(pos, pant, S, indexp); /* W calculado com o ponto anterior. */ VUTIL destino = 0; /* Fim da recursão */ if (pos) { int max = P2k; /* Calculando todos os deslocamentos possíveis. */ for( int d=1; d<max; d++) { int np = Vizinho(pos, d, indexp, Mtz); if (np>=0) { vw = alinhamento_rec(S, Mtz, tams, indexp, np, d); if (valor < vw) { destino = d; valor = vw; } } } } else { valor = 0; } Mtz[pos].destino = destino; return watu + valor; }
QVariant VoltaSegment::getProperty(P_ID id) const { switch (id) { case P_ID::VOLTA_TYPE: return volta()->getProperty(id); default: return TextLineSegment::getProperty(id); } }
bool VoltaSegment::setProperty(P_ID id, const QVariant& v) { switch (id) { case P_ID::LINE_WIDTH: case P_ID::VOLTA_TYPE: return volta()->setProperty(id, v); default: return TextLineSegment::setProperty(id, v); } }
QVariant VoltaSegment::propertyDefault(P_ID id) const { switch (id) { case P_ID::LINE_WIDTH: case P_ID::VOLTA_TYPE: return volta()->propertyDefault(id); default: return TextLineSegment::propertyDefault(id); } }
void VoltaSegment::resetProperty(P_ID id) { switch (id) { case P_ID::VOLTA_ENDING: case P_ID::LINE_WIDTH: return volta()->resetProperty(id); default: return TextLineBaseSegment::resetProperty(id); } }
bool VoltaSegment::setProperty(P_ID id, const QVariant& v) { switch (id) { case P_ID::VOLTA_ENDING: case P_ID::LINE_WIDTH: case P_ID::LINE_STYLE: case P_ID::BEGIN_TEXT_OFFSET: return volta()->setProperty(id, v); default: return TextLineBaseSegment::setProperty(id, v); } }
PropertyFlags VoltaSegment::propertyFlags(P_ID id) const { switch (id) { case P_ID::LINE_WIDTH: case P_ID::LINE_STYLE: case P_ID::LINE_COLOR: return volta()->propertyFlags(id); default: return TextLineBaseSegment::propertyFlags(id); } }
QVariant VoltaSegment::getProperty(P_ID id) const { switch (id) { case P_ID::VOLTA_ENDING: case P_ID::LINE_WIDTH: case P_ID::LINE_STYLE: case P_ID::VOLTA_TYPE: return volta()->getProperty(id); default: return TextLineBaseSegment::getProperty(id); } }
PropertyStyle VoltaSegment::propertyStyle(P_ID id) const { switch (id) { case P_ID::VOLTA_TYPE: return PropertyStyle::NOSTYLE; case P_ID::LINE_WIDTH: return volta()->propertyStyle(id); default: return TextLineSegment::propertyStyle(id); } }
void VoltaSegment::resetProperty(P_ID id) { switch (id) { case P_VOLTA_TYPE: return; case P_LINE_WIDTH: return volta()->resetProperty(id); default: return TextLineSegment::resetProperty(id); } }
QVariant VoltaSegment::propertyDefault(P_ID id) const { switch (id) { case P_ID::LINE_WIDTH: case P_ID::VOLTA_TYPE: case P_ID::BEGIN_TEXT_PLACE: case P_ID::CONTINUE_TEXT_PLACE: case P_ID::ANCHOR: case P_ID::BEGIN_HOOK: case P_ID::BEGIN_HOOK_HEIGHT: case P_ID::END_HOOK_HEIGHT: return volta()->propertyDefault(id); default: return TextLineSegment::propertyDefault(id); } }
StyleIdx VoltaSegment::getPropertyStyle(P_ID id) const { switch (id) { case P_ID::LINE_WIDTH: case P_ID::LINE_STYLE: case P_ID::BEGIN_FONT_FACE: case P_ID::BEGIN_FONT_SIZE: case P_ID::BEGIN_FONT_BOLD: case P_ID::BEGIN_FONT_ITALIC: case P_ID::BEGIN_FONT_UNDERLINE: case P_ID::BEGIN_TEXT_ALIGN: case P_ID::BEGIN_TEXT_OFFSET: return volta()->getPropertyStyle(id); default: return TextLineBaseSegment::getPropertyStyle(id); } }
void VoltaSegment::styleChanged() { volta()->styleChanged(); }