Пример #1
0
void MainWindow::on_movieConverterThread_startConvert(MovieInfo const & movieInfo) {
    ui->statusBar->showMessage("Converting " + movieInfo.name());
    QListWidgetItem* item = getListItem(movieInfo);
    if (item) {
        item->setForeground(QBrush(Qt::blue, Qt::SolidPattern));
    }
}
Пример #2
0
void MainWindow::on_movieConverterThread_finishedConvert(MovieInfo const & movieInfo, bool ok) {
    ui->statusBar->clearMessage();
    QListWidgetItem* item = getListItem(movieInfo);
    if (item) {
        if (ok)
            item->setForeground(QBrush(Qt::green, Qt::SolidPattern));
        else
            item->setForeground(QBrush(Qt::red, Qt::SolidPattern));
    }
}
Пример #3
0
	std::pair<int, int> CMazeGameMenu::getChosenResolution()
	{
		
		auto resList = getGuiElement<irr::gui::IGUIListBox>(MenuElement::ResolutionDropDown);
		std::wstring resStr(resList->getListItem(resList->getSelected()));
		auto xPosition = resStr.find(L"x");
		auto widthStr = resStr.substr(0, xPosition);
		auto heightStr = resStr.substr(xPosition + 1);
		LOG(DEBUG) << "Got resolution of: " << widthStr << "," << heightStr;
		return std::make_pair<int, int>(std::stoi(widthStr), std::stoi(heightStr));
	}
Пример #4
0
void OutlinePalette::slotShowSelect(uint SNr, int Nr)
{
	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
		return;
	if (currDoc==NULL)
		return;
	if (currDoc->isLoading())
		return;
	if (selectionTriggered)
		return;
	disconnect(reportDisplay, SIGNAL(itemSelectionChanged()), this, SLOT(slotMultiSelect()));
	reportDisplay->clearSelection();
	if (currDoc->m_Selection->count() > 0)
	{
		QList<QTreeWidgetItem*> itemSelection;
		uint docSelectionCount = currDoc->m_Selection->count();
		for (uint a = 0; a < docSelectionCount; a++)
		{
			PageItem *item = currDoc->m_Selection->itemAt(a);
			QTreeWidgetItem *retVal = getListItem(item->OwnPage, item->ItemNr);
			if (retVal != 0)
				itemSelection.append(retVal);
		}
		reportDisplay->selectItems(itemSelection);
	}
	else
	{
		QTreeWidgetItem *retVal = getListItem(SNr, Nr);
		if (retVal != 0)
			retVal->setSelected(true);
	}
	QList<QTreeWidgetItem *> items = reportDisplay->selectedItems();
	if (items.count() > 0)
		reportDisplay->scrollToItem(items[0], QAbstractItemView::EnsureVisible);
	connect(reportDisplay, SIGNAL(itemSelectionChanged()), this, SLOT(slotMultiSelect()));
}
Пример #5
0
AnimationStateMachineNode* AnimationStateMachine::addNode(
    const char* name,
    izanagi::IAnimation* anm,
    IZ_BOOL isLoopAnm/*= IZ_TRUE*/)
{
    auto node = getNode(name);

    if (!node) {
        node = AnimationStateMachineNode::create(m_Allocator, name);
        IZ_ASSERT(node);

        m_nodes.AddTail(node->getListItem());

        node->setAnimation(anm, isLoopAnm);
    }

    return node;
}
Пример #6
0
AnimationStateMachineConditionValue* AnimationStateMachine::addConditionValue(const char* name)
{
    auto item = m_values.GetTop();

    while (item) {
        auto value = item->GetData();

        if (value->isSame(name)) {
            return value;
        }

        item = item->GetNext();
    }

    auto value = AnimationStateMachineConditionValue::create(
                     m_Allocator,
                     name);
    IZ_ASSERT(value);

    m_values.AddTail(value->getListItem());

    return value;
}