1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
4 ** If you wish to add, delete or rename slots use Qt Designer which will
5 ** update this file, preserving your code. Create an init() slot in place of
6 ** a constructor, and a destroy() slot in place of a destructor.
7 *****************************************************************************/
9 void RoidsEditView::init()
14 void RoidsEditView::setValue( const QString & type, unsigned value )
16 if (type == tr("metal"))
17 MetalEdit->setText(QString("%1").arg(value));
18 else if (type == tr("crystal"))
19 CrystalEdit->setText(QString("%1").arg(value));
20 else if (type == tr("eonium"))
21 EoniumEdit->setText(QString("%1").arg(value));
22 else if (type == tr("uninit"))
23 UninitEdit->setText(QString("%1").arg(value));
24 else if (type == tr("score"))
25 ScoreEdit->setText(QString("%1").arg(value));
31 void RoidsEditView::slotValueChanged( const QString & s )
33 QString type = sender()->name();
35 if (type == "MetalEdit")
37 else if (type == "CrystalEdit")
39 else if (type == "EoniumEdit")
41 else if (type == "UninitEdit")
43 else if (type == "ScoreEdit")
46 emit changed(type, s.toInt());
50 void RoidsEditView::slotSetLost( QString type, float i )
52 if (type == tr("metal"))
53 MetalLostEdit->setText(QString("%1").arg(i));
54 else if (type == tr("crystal"))
55 CrystalLostEdit->setText(QString("%1").arg(i));
56 else if (type == tr("eonium"))
57 EoniumLostEdit->setText(QString("%1").arg(i));
58 else if (type == tr("uninit"))
59 UninitLostEdit->setText(QString("%1").arg(i));
60 else if (type == tr("scorelost"))
61 ScoreLostEdit->setText(QString("%1").arg(i));
62 else if (type == tr("capping"))
63 CappingEdit->setText(QString("%1\%").arg(i*100));