QLayout *playlistItemIndexed::createIndexControllers(QWidget *parentWidget)
{
  // Absolutely always only call this function once!
  assert(!controlsCreated);
    
  ui.setupUi(parentWidget);
    
  indexRange startEndFrameLimit = getstartEndFrameLimits();
  if (startEndFrame == indexRange(-1,-1))
  {
    startEndFrame = startEndFrameLimit;
  }

  // Set default values
  ui.startSpinBox->setMinimum( startEndFrameLimit.first );
  ui.startSpinBox->setMaximum( startEndFrameLimit.second );
  ui.startSpinBox->setValue( startEndFrame.first );
  ui.endSpinBox->setMinimum( startEndFrameLimit.first );
  ui.endSpinBox->setMaximum( startEndFrameLimit.second );
  ui.endSpinBox->setValue( startEndFrame.second );
  ui.rateSpinBox->setMaximum(1000);
  ui.rateSpinBox->setValue( frameRate );
  ui.samplingSpinBox->setMinimum(1);
  ui.samplingSpinBox->setMaximum(100000);
  ui.samplingSpinBox->setValue( sampling );
    
  // Connect all the change signals from the controls to "connectWidgetSignals()"
  connect(ui.startSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotVideoControlChanged()));
  connect(ui.endSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotVideoControlChanged()));
  connect(ui.rateSpinBox, SIGNAL(valueChanged(double)), this, SLOT(slotVideoControlChanged()));
  connect(ui.samplingSpinBox, SIGNAL(valueChanged(int)), this, SLOT(slotVideoControlChanged()));
    
  controlsCreated = true;
  return ui.gridLayout;
}
playlistItemIndexed::playlistItemIndexed(QString itemNameOrFileName) :
  playlistItem(itemNameOrFileName)
{
  frameRate = DEFAULT_FRAMERATE;
  sampling  = 1;
  startEndFrame = indexRange(-1,-1);
  controlsCreated = false;
  startEndFrameChanged = false;
}
// <arraytype>          ::=	ARRAY [ <indexrange> ] OF <simpletype>
void SyntaxAnalyzer::arrayType()
{
    accept(arraysy);
    accept(leftbracket);
    indexRange();
    accept(rightbracket);
    accept(ofsy);
    simpleType();
}
Beispiel #4
0
 // Return a range of scopes for the given closure. The elements of the
 // returned range have type `SILFunction *` and are non-null. Return an empty
 // range for a SILFunction that is not a closure or is a dead closure.
 ScopeRange getClosureScopes(SILFunction *ClosureF) {
   IndexRange indexRange(nullptr, nullptr);
   auto closureScopesPos = closureToScopesMap.find(ClosureF);
   if (closureScopesPos != closureToScopesMap.end()) {
     auto &indexedScopes = closureScopesPos->second;
     indexRange = IndexRange(indexedScopes.begin(), indexedScopes.end());
   }
   return makeOptionalTransformRange(indexRange,
                                     IndexLookupFunc(indexedScopes));
 }
Beispiel #5
0
gl::Error VertexArrayGL::syncDrawState(const std::vector<GLuint> &activeAttribLocations, GLint first, GLsizei count, GLenum type, const GLvoid *indices, const GLvoid **outIndices) const
{
    mStateManager->bindVertexArray(mVertexArrayID, mAppliedElementArrayBuffer);

    // Check if any attributes need to be streamed, determines if the index range needs to be computed
    bool attributesNeedStreaming = doAttributesNeedStreaming(activeAttribLocations);

    // Determine if an index buffer needs to be streamed and the range of vertices that need to be copied
    gl::RangeUI indexRange(0, 0);
    if (type != GL_NONE)
    {
        gl::Error error = syncIndexData(count, type, indices, attributesNeedStreaming, &indexRange, outIndices);
        if (error.isError())
        {
            return error;
        }
    }
    else
    {
        // Not an indexed call, set the range to [first, first + count)
        indexRange.start = first;
        indexRange.end = first + count;
    }

    // Sync the vertex attribute state and track what data needs to be streamed
    size_t streamingDataSize = 0;
    size_t maxAttributeDataSize = 0;
    gl::Error error = syncAttributeState(activeAttribLocations, attributesNeedStreaming, indexRange,
                                         &streamingDataSize, &maxAttributeDataSize);
    if (error.isError())
    {
        return error;
    }

    if (streamingDataSize > 0)
    {
        ASSERT(attributesNeedStreaming);

        gl::Error error = streamAttributes(activeAttribLocations, streamingDataSize, maxAttributeDataSize,
                                           indexRange);
        if (error.isError())
        {
            return error;
        }
    }

    return gl::Error(GL_NO_ERROR);
}
Beispiel #6
0
gl::Error VertexArrayGL::syncDrawState(const gl::AttributesMask &activeAttributesMask,
                                       GLint first,
                                       GLsizei count,
                                       GLenum type,
                                       const GLvoid *indices,
                                       GLsizei instanceCount,
                                       const GLvoid **outIndices) const
{
    mStateManager->bindVertexArray(mVertexArrayID, getAppliedElementArrayBufferID());

    // Check if any attributes need to be streamed, determines if the index range needs to be computed
    bool attributesNeedStreaming = mAttributesNeedStreaming.any();

    // Determine if an index buffer needs to be streamed and the range of vertices that need to be copied
    RangeUI indexRange(0, 0);
    if (type != GL_NONE)
    {
        Error error =
            syncIndexData(count, type, indices, attributesNeedStreaming, &indexRange, outIndices);
        if (error.isError())
        {
            return error;
        }
    }
    else
    {
        // Not an indexed call, set the range to [first, first + count - 1]
        indexRange.start = first;
        indexRange.end = first + count - 1;
    }

    if (attributesNeedStreaming)
    {
        Error error = streamAttributes(activeAttributesMask, instanceCount, indexRange);
        if (error.isError())
        {
            return error;
        }
    }

    return Error(GL_NO_ERROR);
}