]> ruin.nu Git - hbs.git/blob - bs/ui/roidseditview.ui.h
smaller changes
[hbs.git] / bs / ui / roidseditview.ui.h
1 /****************************************************************************
2 ** ui.h extension file, included from the uic-generated form implementation.
3 **
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 *****************************************************************************/
8
9 void RoidsEditView::init()
10 {
11
12 }
13
14 void RoidsEditView::setValue( const QString & type, unsigned value )
15 {
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));
26      
27     
28
29 }
30
31 void RoidsEditView::slotValueChanged()
32 {
33         QString type = sender()->name();
34         
35         if (type == "MetalEdit")
36                 type = tr("metal");
37         else if (type == "CrystalEdit")
38                 type = tr("crystal");
39         else if (type == "EoniumEdit")
40                 type = tr("eonium");
41         else if (type == "UninitEdit")
42                 type = tr("uninit");
43         else if (type == "ScoreEdit")
44                 type = tr("score");
45         test = type;
46         const QLineEdit *le = dynamic_cast<const QLineEdit*>(sender());
47         if (le)
48             emit changed(type, le->text().toInt());
49 }
50
51
52 void RoidsEditView::slotSetLost( QString type, float i )
53
54     if (type == tr("metal"))
55         MetalLostEdit->setText(QString("%1").arg(i));
56     else if (type == tr("crystal"))
57         CrystalLostEdit->setText(QString("%1").arg(i));
58     else if (type == tr("eonium"))
59         EoniumLostEdit->setText(QString("%1").arg(i));
60     else if (type == tr("uninit"))
61         UninitLostEdit->setText(QString("%1").arg(i));
62     else if (type == tr("scorelost"))
63         ScoreLostEdit->setText(QString("%1").arg(i));
64     else if (type == tr("capping"))
65         CappingEdit->setText(QString("%1\%").arg(i*100));
66 }