You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdewebdev/kommander/examples/tutorial/calc.kmdr

272 lines
11 KiB

<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>Form1</class>
<widget class="Dialog">
<property name="name">
<cstring>Form1</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>577</width>
<height>305</height>
</rect>
</property>
<property name="caption">
<string>Simple calculator</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
<string></string>
<string></string>
</stringlist>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="0" column="1">
<property name="name">
<cstring>Layout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class=TQLABEL_OBJECT_NAME_STRING>
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="text">
<string>History:</string>
</property>
</widget>
<widget class="ListBox">
<property name="name">
<cstring>ListBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="tqmaximumSize">
<size>
<width>250</width>
<height>32767</height>
</size>
</property>
</widget>
<widget class="LineEdit">
<property name="name">
<cstring>LineEdit2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<size>
<width>250</width>
<height>32767</height>
</size>
</property>
<property name="paletteBackgroundColor">
<color>
<red>233</red>
<green>233</green>
<blue>233</blue>
</color>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="ExecButton">
<property name="name">
<cstring>ExecButton2</cstring>
</property>
<property name="text">
<string>Cl&amp;ear</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@ListBox1.clear
@LineEdit2.setText("Sum: 0")</string>
</stringlist>
</property>
</widget>
</vbox>
</widget>
<widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="0" column="0">
<property name="name">
<cstring>Layout4</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class=TQLABEL_OBJECT_NAME_STRING row="2" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="text">
<string>Expression:</string>
</property>
</widget>
<widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="4" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<spacer>
<property name="name">
<cstring>Spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="ExecButton">
<property name="name">
<cstring>ExecButton1</cstring>
</property>
<property name="text">
<string>&amp;Calculate</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@ListBox1.insertItem(@expr(@LineEdit1.text), -1)
@LineEdit1.clear
@LineEdit2.setText("Sum: @expr(@String.replace(@ListBox1.text, "\n", "+"))")
</string>
</stringlist>
</property>
</widget>
<spacer>
<property name="name">
<cstring>Spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget class="LineEdit" row="3" column="0">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
</widget>
<spacer row="5" column="0">
<property name="name">
<cstring>Spacer3_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<size>
<width>0</width>
<height>91</height>
</size>
</property>
</spacer>
<spacer row="0" column="0">
<property name="name">
<cstring>Spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<size>
<width>0</width>
<height>91</height>
</size>
</property>
</spacer>
</grid>
</widget>
</grid>
</widget>
<tabstops>
<tabstop>LineEdit1</tabstop>
<tabstop>ExecButton1</tabstop>
<tabstop>ExecButton2</tabstop>
<tabstop>ListBox1</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>