示例#1
0
BOOL Gradient::SetDlgThing(ParamDlg* dlg)
{
	// JBW: set the appropriate 'thing' sub-object for each
	// secondary dialog
	if (dlg == uvGenDlg)
		uvGenDlg->SetThing(uvGen);
	else if (dlg == texoutDlg)
		texoutDlg->SetThing(texout);
	else 
		return FALSE;
	return TRUE;
}
示例#2
0
BOOL Noise::SetDlgThing(ParamDlg* dlg)
{
	// JBW: set the appropriate 'thing' sub-object for each
	// secondary dialog
	if ((xyzGenDlg!= NULL) && (dlg == xyzGenDlg))
		xyzGenDlg->SetThing(xyzGen);
	else if ((texoutDlg!= NULL) && (dlg == texoutDlg))
		texoutDlg->SetThing(texout);
	else 
		return FALSE;
	return TRUE;
}
示例#3
0
BOOL SampleShaderPlugin::SetDlgThing(ParamDlg* dlg)
{	
	if (dlg == uvGenDlg)
		uvGenDlg->SetThing(uvGen);
	else 
		return FALSE;
	return TRUE;
}
示例#4
0
BOOL CrackVisualizer::SetDlgThing(ParamDlg* dlg)
{	
	if (dlg == uvGenDlg)
		uvGenDlg->SetThing(uvGen);
	else 
		return FALSE;
	return TRUE;
}
示例#5
0
void ParamsList::slotEditItem()
{
    QPushButton *btn = static_cast<QPushButton *>(sender());
    QString name, value;
    QTreeWidgetItem *item = NULL;
    if( btn->property("add").isNull() ) {
        item = currentItem();
        if( item != NULL ) {
            name = item->text(0);
            value = item->text(1);
        }
    }

    ParamDlg *dlg = new ParamDlg(i_Mode, this);
    dlg->setName(name);
    dlg->setValue(value);

    dlg->exec();

    name = dlg->getName();
    value = dlg->getValue();
    int res = dlg->result();
    delete dlg;

    if( res == QDialog::Rejected ) {
        return;
    }

    if( item == NULL ) {
        item = new QTreeWidgetItem(this);
    }

    item->setText(0, name);
    item->setText(1, value);
}