int lost;
int before;
int after;
+
+ int init = 0;
before = m_Fleet->resource(tr("metal").latin1(),m_iMinTick);
after = m_Fleet->resource(tr("metal").latin1(),m_iMaxTick);
lost = after - before;
+ init += lost;
m_ResourceView->setLines(tr("metal"),lost);
before = m_Fleet->resource(tr("crystal").latin1(),m_iMinTick);
after = m_Fleet->resource(tr("crystal").latin1(),m_iMaxTick);
lost = after - before;
+ init += lost;
m_ResourceView->setLines(tr("crystal"),lost);
before = m_Fleet->resource(tr("eonium").latin1(),m_iMinTick);
after = m_Fleet->resource(tr("eonium").latin1(),m_iMaxTick);
lost = after - before;
+ init += lost;
m_ResourceView->setLines(tr("eonium"),lost);
before = m_Fleet->resource(tr("uninit").latin1(),m_iMinTick);
lost = after - before;
m_ResourceView->setLines(tr("score"),after);
m_ResourceView->setLines(tr("lost"),lost);
+ float cost = (before - after) / float(init) / 1000;
+ m_ResourceView->setLines(tr("cost"),cost);
+
Planet* pl;
<rect>
<x>0</x>
<y>0</y>
- <width>222</width>
+ <width>551</width>
<height>105</height>
</rect>
</property>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="1">
+ <widget class="QLabel" row="0" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>crystalLabel</cstring>
</property>
<string>Crystal</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="QLabel" row="0" column="4" rowspan="1" colspan="2">
<property name="name">
<cstring>eoniumLabel</cstring>
</property>
<string>Eonium</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="3">
+ <widget class="QLineEdit" row="1" column="6" rowspan="1" colspan="2">
<property name="name">
<cstring>EoniumEdit</cstring>
</property>
<bool>true</bool>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="QLineEdit" row="1" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>CrystalEdit</cstring>
</property>
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>metalLabel</cstring>
</property>
<string>Metal</string>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="2">
+ <widget class="QLineEdit" row="1" column="4" rowspan="1" colspan="2">
<property name="name">
<cstring>UninitEdit</cstring>
</property>
<bool>true</bool>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="QLineEdit" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>ScoreEdit</cstring>
+ <cstring>MetalEdit</cstring>
</property>
<property name="focusPolicy">
<enum>NoFocus</enum>
<bool>true</bool>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="0">
+ <widget class="QLabel" row="2" column="0">
<property name="name">
- <cstring>MetalEdit</cstring>
+ <cstring>ScoreLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Score:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ScoreEdit</cstring>
</property>
<property name="focusPolicy">
<enum>NoFocus</enum>
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="3">
+ <widget class="QLabel" row="2" column="3">
+ <property name="name">
+ <cstring>ScoreLostLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Lost</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="6" rowspan="1" colspan="2">
<property name="name">
<cstring>uninitLabel</cstring>
</property>
<string>Uninit</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="QLineEdit" row="2" column="4">
<property name="name">
- <cstring>ScoreLabel</cstring>
+ <cstring>ScoreLostEdit</cstring>
</property>
- <property name="text">
- <string>Score:</string>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="QLabel" row="2" column="5" rowspan="1" colspan="2">
<property name="name">
- <cstring>ScoreLostLabel</cstring>
+ <cstring>CostLabel</cstring>
</property>
<property name="text">
- <string>Lost</string>
+ <string>Cost</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The cost in k score / init roid</string>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="3">
+ <widget class="QLineEdit" row="2" column="7">
<property name="name">
- <cstring>ScoreLostEdit</cstring>
+ <cstring>CostEdit</cstring>
</property>
<property name="focusPolicy">
<enum>NoFocus</enum>
<include location="local" impldecl="in implementation">resourceview.ui.h</include>
</includes>
<slots>
- <slot>setLines( QString type, int i )</slot>
+ <slot>setLines( QString type, float i )</slot>
</slots>
<pixmapinproject/>
<layoutdefaults spacing="6" margin="11"/>