Clear session button and changed layout

Added a button to clear the current session

changed the disposition of the operator buttons, to take up less
vertical space. Now it should be better to fit smaller screens.
master
Salvo 'LtWorf' Tomaselli 2015-09-09 12:42:00 +07:00
parent 66855ad50c
commit 862c71fdfb
1 changed files with 364 additions and 153 deletions

@ -43,135 +43,180 @@
</item> </item>
<item> <item>
<widget class="QFrame" name="groupOperators"> <widget class="QFrame" name="groupOperators">
<layout class="QVBoxLayout" name="verticalLayout_10"> <layout class="QGridLayout" name="gridLayout_2">
<item> <item row="1" column="0">
<widget class="QPushButton" name="cmdProduct">
<property name="toolTip">
<string>Product</string>
</property>
<property name="text">
<string notr="true">*</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdDifference"> <widget class="QPushButton" name="cmdDifference">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Difference</string> <string>Difference</string>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">-</string> <string notr="true">-</string>
</property> </property>
</widget> <property name="flat">
</item> <bool>true</bool>
<item>
<widget class="QPushButton" name="cmdUnion">
<property name="toolTip">
<string>Union</string>
</property>
<property name="text">
<string notr="true"></string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="8" column="0">
<widget class="QPushButton" name="cmdIntersection">
<property name="toolTip">
<string>Intersection</string>
</property>
<property name="text">
<string notr="true">∩</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdDivision">
<property name="toolTip">
<string>Division</string>
</property>
<property name="text">
<string notr="true">÷</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdJoin">
<property name="toolTip">
<string>Natural join</string>
</property>
<property name="text">
<string notr="true">⋈</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdOuterLeft">
<property name="toolTip">
<string>Left outer join</string>
</property>
<property name="text">
<string notr="true">⧑</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdOuterRight">
<property name="toolTip">
<string>Right outer join</string>
</property>
<property name="text">
<string notr="true">⧒</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cmdOuter"> <widget class="QPushButton" name="cmdOuter">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Full outer join</string> <string>Full outer join</string>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">⧓</string> <string notr="true">⧓</string>
</property> </property>
<property name="flat">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item row="4" column="0">
<widget class="QPushButton" name="cmdProjection"> <widget class="QPushButton" name="cmdDivision">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Projection</string> <string>Division</string>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">π</string> <string notr="true">÷</string>
</property>
<property name="flat">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="0" column="0">
<widget class="QPushButton" name="cmdProduct">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Product</string>
</property>
<property name="text">
<string notr="true">*</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QPushButton" name="cmdSelection"> <widget class="QPushButton" name="cmdSelection">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Selection</string> <string>Selection</string>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">σ</string> <string notr="true">σ</string>
</property> </property>
</widget> <property name="flat">
</item> <bool>true</bool>
<item>
<widget class="QPushButton" name="cmdRename">
<property name="toolTip">
<string>Rename</string>
</property>
<property name="text">
<string notr="true">ρ</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item row="12" column="0">
<widget class="QPushButton" name="cmdArrow"> <widget class="QPushButton" name="cmdArrow">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="text"> <property name="text">
<string notr="true">➡</string> <string notr="true">➡</string>
</property> </property>
<property name="flat">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item row="6" column="0">
<widget class="QPushButton" name="cmdOuterLeft">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Left outer join</string>
</property>
<property name="text">
<string notr="true">⧑</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="13" column="0">
<spacer name="verticalSpacer_2"> <spacer name="verticalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -184,6 +229,156 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="1">
<widget class="QPushButton" name="cmdUnion">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Union</string>
</property>
<property name="text">
<string notr="true"></string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cmdIntersection">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Intersection</string>
</property>
<property name="text">
<string notr="true">∩</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="cmdJoin">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Natural join</string>
</property>
<property name="text">
<string notr="true">⋈</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QPushButton" name="cmdOuterRight">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Right outer join</string>
</property>
<property name="text">
<string notr="true">⧒</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QPushButton" name="cmdProjection">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Projection</string>
</property>
<property name="text">
<string notr="true">π</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QPushButton" name="cmdRename">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Rename</string>
</property>
<property name="text">
<string notr="true">ρ</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -420,7 +615,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="1">
<widget class="QPushButton" name="cmdNewSession">
<property name="text">
<string>Unload all</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="cmdUnload"> <widget class="QPushButton" name="cmdUnload">
<property name="text"> <property name="text">
<string>Unload</string> <string>Unload</string>
@ -540,7 +742,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>21</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -675,16 +877,10 @@
<tabstop>cmdSurvey</tabstop> <tabstop>cmdSurvey</tabstop>
<tabstop>cmdProduct</tabstop> <tabstop>cmdProduct</tabstop>
<tabstop>cmdDifference</tabstop> <tabstop>cmdDifference</tabstop>
<tabstop>cmdUnion</tabstop>
<tabstop>cmdIntersection</tabstop>
<tabstop>cmdDivision</tabstop> <tabstop>cmdDivision</tabstop>
<tabstop>cmdJoin</tabstop>
<tabstop>cmdOuterLeft</tabstop> <tabstop>cmdOuterLeft</tabstop>
<tabstop>cmdOuterRight</tabstop>
<tabstop>cmdOuter</tabstop> <tabstop>cmdOuter</tabstop>
<tabstop>cmdProjection</tabstop>
<tabstop>cmdSelection</tabstop> <tabstop>cmdSelection</tabstop>
<tabstop>cmdRename</tabstop>
<tabstop>cmdArrow</tabstop> <tabstop>cmdArrow</tabstop>
<tabstop>table</tabstop> <tabstop>table</tabstop>
<tabstop>lstHistory</tabstop> <tabstop>lstHistory</tabstop>
@ -696,7 +892,6 @@
<tabstop>cmdExecuteMultiline</tabstop> <tabstop>cmdExecuteMultiline</tabstop>
<tabstop>lstRelations</tabstop> <tabstop>lstRelations</tabstop>
<tabstop>cmdEdit</tabstop> <tabstop>cmdEdit</tabstop>
<tabstop>cmdUnload</tabstop>
<tabstop>lstAttributes</tabstop> <tabstop>lstAttributes</tabstop>
<tabstop>txtResult</tabstop> <tabstop>txtResult</tabstop>
<tabstop>txtQuery</tabstop> <tabstop>txtQuery</tabstop>
@ -728,8 +923,8 @@
<slot>showSurvey()</slot> <slot>showSurvey()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>63</x> <x>78</x>
<y>96</y> <y>132</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>99</x> <x>99</x>
@ -744,8 +939,8 @@
<slot>unloadRelation()</slot> <slot>unloadRelation()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>785</x> <x>677</x>
<y>387</y> <y>396</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>773</x> <x>773</x>
@ -760,8 +955,8 @@
<slot>saveRelation()</slot> <slot>saveRelation()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>785</x> <x>783</x>
<y>325</y> <y>322</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>760</x> <x>760</x>
@ -776,8 +971,8 @@
<slot>loadRelation()</slot> <slot>loadRelation()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>785</x> <x>677</x>
<y>294</y> <y>322</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>753</x> <x>753</x>
@ -904,8 +1099,8 @@
<slot>editRelation()</slot> <slot>editRelation()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>785</x> <x>783</x>
<y>356</y> <y>359</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -936,8 +1131,8 @@
<slot>newRelation()</slot> <slot>newRelation()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>785</x> <x>677</x>
<y>263</y> <y>359</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1000,8 +1195,8 @@
<slot>clear()</slot> <slot>clear()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>518</x> <x>556</x>
<y>564</y> <y>608</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>432</x> <x>432</x>
@ -1016,8 +1211,8 @@
<slot>execute()</slot> <slot>execute()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>550</x> <x>556</x>
<y>596</y> <y>646</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>795</x> <x>795</x>
@ -1032,12 +1227,12 @@
<slot>clear()</slot> <slot>clear()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>674</x> <x>696</x>
<y>639</y> <y>700</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>590</x> <x>606</x>
<y>644</y> <y>699</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
@ -1048,8 +1243,8 @@
<slot>clear()</slot> <slot>clear()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>492</x> <x>556</x>
<y>511</y> <y>556</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>490</x> <x>490</x>
@ -1064,8 +1259,8 @@
<slot>optimize()</slot> <slot>optimize()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>161</x> <x>263</x>
<y>517</y> <y>556</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>130</x> <x>130</x>
@ -1080,8 +1275,8 @@
<slot>undoOptimize()</slot> <slot>undoOptimize()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>369</x> <x>409</x>
<y>509</y> <y>556</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>544</x> <x>544</x>
@ -1096,8 +1291,8 @@
<slot>execute()</slot> <slot>execute()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>740</x> <x>786</x>
<y>636</y> <y>700</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>797</x> <x>797</x>
@ -1112,8 +1307,8 @@
<slot>execute()</slot> <slot>execute()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>484</x> <x>606</x>
<y>642</y> <y>699</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>796</x> <x>796</x>
@ -1144,8 +1339,8 @@
<slot>addProduct()</slot> <slot>addProduct()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>138</y> <y>183</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1160,8 +1355,8 @@
<slot>addDifference()</slot> <slot>addDifference()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>169</y> <y>220</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1176,8 +1371,8 @@
<slot>addUnion()</slot> <slot>addUnion()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>200</y> <y>257</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1192,8 +1387,8 @@
<slot>addIntersection()</slot> <slot>addIntersection()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>231</y> <y>294</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1208,8 +1403,8 @@
<slot>addDivision()</slot> <slot>addDivision()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>262</y> <y>331</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1224,8 +1419,8 @@
<slot>addOuter()</slot> <slot>addOuter()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>386</y> <y>479</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1240,8 +1435,8 @@
<slot>addOLeft()</slot> <slot>addOLeft()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>324</y> <y>405</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1256,8 +1451,8 @@
<slot>addORight()</slot> <slot>addORight()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>355</y> <y>442</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1272,8 +1467,8 @@
<slot>addJoin()</slot> <slot>addJoin()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>293</y> <y>368</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1288,8 +1483,8 @@
<slot>addProjection()</slot> <slot>addProjection()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>417</y> <y>516</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1304,8 +1499,8 @@
<slot>addSelection()</slot> <slot>addSelection()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>448</y> <y>553</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1320,8 +1515,8 @@
<slot>addRename()</slot> <slot>addRename()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>479</y> <y>590</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1336,8 +1531,8 @@
<slot>addArrow()</slot> <slot>addArrow()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>54</x> <x>67</x>
<y>510</y> <y>627</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>399</x> <x>399</x>
@ -1345,6 +1540,22 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>cmdNewSession</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>newSession()</slot>
<hints>
<hint type="sourcelabel">
<x>736</x>
<y>378</y>
</hint>
<hint type="destinationlabel">
<x>796</x>
<y>396</y>
</hint>
</hints>
</connection>
</connections> </connections>
<slots> <slots>
<slot>execute()</slot> <slot>execute()</slot>