void KisNodeProgressProxy::setRange(int _minimum, int _maximum)
{
    d->minimum = _minimum;
    d->maximum = _maximum;
    if (d->node && d->computePercentage()) {
        emit(percentageChanged(d->percentage, d->node));
    }
}
void KisNodeProgressProxy::setValue(int _value)
{
    //QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    d->value = _value;
    if (d->node && d->computePercentage()) {
        emit(percentageChanged(d->percentage, d->node));
    }
}
Exemplo n.º 3
0
void KProgress::setProgress(int progress)
{
    QProgressBar::setProgress(progress);

    if (totalSteps())
    {
        emit percentageChanged((progress * 100) / totalSteps());
    }
}
Exemplo n.º 4
0
void KProgress::setTotalSteps(int totalSteps)
{
    QProgressBar::setTotalSteps(totalSteps);

    if (totalSteps)
    {
        emit percentageChanged((progress() * 100) / totalSteps);
    }
}
Exemplo n.º 5
0
void CUiPercentPicker::onActionTriggered(QAction* act)
{
	int				i = 0;
	for (i = 0; i < m_actions.length(); ++i)
	{
		if (act == m_actions[i])
			break;
	}
	emit percentageChanged( m_percs[i] );
}
Exemplo n.º 6
0
void MapRipper::run()
{
    int countOk = 0;
    bool goodtile=false;
    //  Stuff.Shuffle<Point>(ref list);
    QVector<core::MapType::Types> types = OPMaps::Instance()->GetAllLayersOfType(type);
    int all=points.count();
    for(int i = 0; i < all; i++)
    {
        emit numberOfTilesChanged(all,i+1);
        if(cancel)
            break;

        core::Point p = points[i];
        {
            //qDebug()<<"offline fetching:"<<p.ToString();
            foreach(core::MapType::Types type,types)
            {
                emit providerChanged(core::MapType::StrByType(type),zoom);
                QByteArray img = OPMaps::Instance()->GetImageFrom(type, p, zoom);
                if(img.length()!=0)
                {
                    goodtile=true;
                    img=NULL;
                }
                else
                    goodtile=false;
            }
            if(goodtile)
            {
                countOk++;
            }
            else
            {
                i--;
                QThread::msleep(1000);
                continue;
            }
        }
        emit percentageChanged((int) ((i+1)*100/all));//, i+1);
        // worker.ReportProgress((int) ((i+1)*100/all), i+1);

        QThread::msleep(sleep);
    }
Exemplo n.º 7
0
void KGameProgress::rangeChange()
{
	repaint(contentsRect(), FALSE);
	emit percentageChanged(recalcValue(100));
}
Exemplo n.º 8
0
void KJobProgressBar::updateJobStatus( KJob * job, unsigned long value )
{
    Q_UNUSED( job );
    setValue( value );
    emit( percentageChanged( percentage() ) );
}