Ejemplo n.º 1
0
void RenderRegion::attachRegion()
{
    if (documentBeingDestroyed())
        return;
    
    // A region starts off invalid.
    setIsValid(false);

    // Initialize the flow thread reference and create the flow thread object if needed.
    // The flow thread lifetime is influenced by the number of regions attached to it,
    // and we are attaching the region to the flow thread.
    installFlowThread();
    
    if (!m_flowThread)
        return;

    // Only after adding the region to the thread, the region is marked to be valid.
    m_flowThread->addRegionToThread(this);

    // The region just got attached to the flow thread, lets check whether
    // it has region styling rules associated.
    checkRegionStyle();

    if (!isValid())
        return;

    m_hasAutoLogicalHeight = shouldHaveAutoLogicalHeight();
    if (hasAutoLogicalHeight())
        incrementAutoLogicalHeightCount();
}
Ejemplo n.º 2
0
void Geometry::loadIniFile(IniFile *iniFile)
{
    QFileInfo fileInfo(QString("%1/geometry.txt").arg(m_filePath));
    int planesPerDimension = iniFile->getInt("planesPerDimension");
    bool loadPrevious = iniFile->getBool("loadPrevious") && fileInfo.exists();
    setRandomWalkFraction(iniFile->getDouble("randomWalkFraction"));
    setIsValid(true);
    setMode(iniFile->getInt("mode"));
    setVerbose(iniFile->getBool("verbose"));

    if(loadPrevious) {
        load(QString("%1/geometry.txt").arg(m_filePath));
        if(this->planesPerDimension() != planesPerDimension) {
            if(m_verbose) qDebug() << "Resizing from " << this->planesPerDimension() << " planes per dimension to " << planesPerDimension;
            resize(planesPerDimension);
        }
    } else {
        setPlanesPerDimension(planesPerDimension);
        reset(2, 19);
    }

    qDebug() << "Geometry loaded ini file with ";
    qDebug() << "  Mode: " << m_mode;
    qDebug() << "  Verbose: " << m_verbose;
    qDebug() << "  Planes per dimension: " << m_planesPerDimension;
    qDebug() << "  Load previous: " << (loadPrevious ? "true" : "false");
    qDebug() << "  Random walk fraction: " << m_randomWalkFraction;
}
CResourceResult::CResourceResult(const CResourceResult& result)
{
	setIsValid(result.getIsValid());
	setIsSuccess(result.getIsSuccess());

	setData(result.getData());
	setDataSize(result.getDataSize());
	setCacheControlStr(result.getCacheControlStr());
	setMessage(result.getMessage());
	setEtag(result.getEtag());
	setMIME(result.getMIME());
}
Ejemplo n.º 4
0
void RenderRegion::attachRegion()
{
    if (documentBeingDestroyed())
        return;

    // A region starts off invalid.
    setIsValid(false);

    if (!m_flowThread)
        return;

    // Only after adding the region to the thread, the region is marked to be valid.
    m_flowThread->addRegionToThread(this);
}
Ejemplo n.º 5
0
void RenderRegion::attachRegion()
{
    if (documentBeingDestroyed())
        return;
    
    // A region starts off invalid.
    setIsValid(false);

    // Initialize the flow thread reference and create the flow thread object if needed.
    // The flow thread lifetime is influenced by the number of regions attached to it,
    // and we are attaching the region to the flow thread.
    installFlowThread();
    
    if (!m_flowThread)
        return;

    // Only after adding the region to the thread, the region is marked to be valid.
    m_flowThread->addRegionToThread(this);
}
Ejemplo n.º 6
0
void RenderRegion::attachRegion()
{
    if (documentBeingDestroyed())
        return;
    
    // A region starts off invalid.
    setIsValid(false);

    // Initialize the flow thread reference and create the flow thread object if needed.
    // The flow thread lifetime is influenced by the number of regions attached to it,
    // and we are attaching the region to the flow thread.
    installFlowThread();
    
    if (!m_flowThread)
        return;

    m_flowThread->addRegionToThread(this);

    // The region just got attached to the flow thread, lets check whether
    // it has region styling rules associated.
    checkRegionStyle();
}