示例#1
0
void djvFileBrowserModel::setThumbnails(THUMBNAILS thumbnails)
{
    if (thumbnails == _p->thumbnails)
        return;

    _p->thumbnails = thumbnails;

    modelUpdate();

    Q_EMIT thumbnailsChanged(_p->thumbnails);
    Q_EMIT optionChanged();
}
示例#2
0
void djvFileBrowserModel::setThumbnailsSize(THUMBNAILS_SIZE size)
{
    if (size == _p->thumbnailsSize)
        return;

    _p->thumbnailsSize = size;

    modelUpdate();

    Q_EMIT thumbnailsSizeChanged(_p->thumbnailsSize);
    Q_EMIT optionChanged();
}
示例#3
0
void djvFileBrowserModel::setReverseSort(bool value)
{
    if (value == _p->reverseSort)
        return;

    _p->reverseSort = value;

    modelUpdate();

    Q_EMIT reverseSortChanged(_p->reverseSort);
    Q_EMIT optionChanged();
}
示例#4
0
void djvFileBrowserModel::setSortDirsFirst(bool sort)
{
    if (sort == _p->sortDirsFirst)
        return;

    _p->sortDirsFirst = sort;

    modelUpdate();

    Q_EMIT sortDirsFirstChanged(_p->sortDirsFirst);
    Q_EMIT optionChanged();
}
示例#5
0
void djvFileBrowserModel::setShowHidden(bool show)
{
    if (show == _p->showHidden)
        return;

    _p->showHidden = show;
    
    modelUpdate();

    Q_EMIT showHiddenChanged(_p->showHidden);
    Q_EMIT optionChanged();
}
示例#6
0
void djvFileBrowserModel::setSort(COLUMNS sort)
{
    if (sort == _p->sort)
        return;

    _p->sort = sort;

    modelUpdate();

    Q_EMIT sortChanged(_p->sort);
    Q_EMIT optionChanged();
}
示例#7
0
void djvFileBrowserModel::setFilterText(const QString & text)
{
    if (text == _p->filterText)
        return;

    _p->filterText = text;

    modelUpdate();
    
    Q_EMIT filterTextChanged(_p->filterText);
    Q_EMIT optionChanged();
}
示例#8
0
void djvFileBrowserModel::setPath(const QString & path)
{
    if (path == _p->path)
        return;
    
    _p->path = path;
    
    dirUpdate();
    modelUpdate();
    
    Q_EMIT pathChanged(_p->path);
}
示例#9
0
void djvFileBrowserModel::setSequence(djvSequence::COMPRESS in)
{
    if (in == _p->sequence)
        return;

    _p->sequence = in;

    dirUpdate();
    modelUpdate();
    
    Q_EMIT sequenceChanged(_p->sequence);
    Q_EMIT optionChanged();
}
示例#10
0
// Agent's playout policy. Generate percepts from context tree and choose
// actions uniformly at random.
reward_t Agent::playout(int horizon) {

	reward_t reward = 0.0;
	while (horizon-- > 0) {
		// Execute an action chosen uniformly at random.
		action_t a = genRandomAction();
		modelUpdate(a);

		// Sample a percept.
		percept_t o, r;
		genPerceptAndUpdate(o, r);
		reward += r;
	}

	return reward;
}
示例#11
0
void djvFileBrowserModel::reload()
{
    dirUpdate();
    modelUpdate();
}