Beispiel #1
0
void EditMode::accept()
{
	QLCPhysical physical = m_mode->physical();

	physical.setBulbType(m_bulbTypeCombo->currentText());
	physical.setBulbLumens(m_bulbLumensSpin->value());
	physical.setBulbColourTemperature(m_bulbTempCombo->currentText().toInt());
	physical.setWeight(m_weightSpin->value());
	physical.setWidth(m_widthSpin->value());
	physical.setHeight(m_heightSpin->value());
	physical.setDepth(m_depthSpin->value());
	physical.setLensName(m_lensNameCombo->currentText());
	physical.setLensDegreesMin(m_lensDegreesMinSpin->value());
	physical.setLensDegreesMax(m_lensDegreesMaxSpin->value());
	physical.setFocusType(m_focusTypeCombo->currentText());
	physical.setFocusPanMax(m_panMaxSpin->value());
	physical.setFocusTiltMax(m_tiltMaxSpin->value());
	physical.setPowerConsumption(m_powerConsumptionSpin->value());
	physical.setDmxConnector(m_dmxConnectorCombo->currentText());

	m_mode->setPhysical(physical);
	m_mode->setName(m_modeNameEdit->text());

	QDialog::accept();
}
void QLCFixtureMode_Test::physical()
{
    /* Verify that a QLCPhysical can be set & get for the mode */
    QLCFixtureMode* mode = new QLCFixtureMode(m_fixtureDef);
    QVERIFY(mode->physical().bulbType().isEmpty());

    QLCPhysical p;
    p.setBulbType("Foobar");
    mode->setPhysical(p);
    QVERIFY(mode->physical().bulbType() == "Foobar");

    delete mode;
}
Beispiel #3
0
/****************************************************************************
 * Physical page functions
 ****************************************************************************/
void EditMode::slotBulbTypeChanged(const QString &type)
{
	QLCPhysical physical = m_mode->physical();
	physical.setBulbType(type);
	m_mode->setPhysical(physical);
}