]> ruin.nu Git - hbs.git/blob - bs/ui/roidseditview.ui.h
Roids/score for planets are now editable
[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 void RoidsEditView::slotValueChanged( const QString & s )
31 {
32         QString type = sender()->name();
33     
34         if (type == "MetalEdit")
35                 type = tr("metal");
36         else if (type == "CrystalEdit")
37                 type = tr("crystal");
38         else if (type == "EoniumEdit")
39                 type = tr("eonium");
40         else if (type == "UninitEdit")
41                 type = tr("uninit");
42   else if (type == "ScoreEdit")
43                 type = tr("score");
44     
45     emit changed(type, s.toInt());
46 }