Move top-view properties to .ui file, enable alternating row colors
authorMilian Wolff <milian.wolff@kdab.com>
Thu, 23 Feb 2017 09:25:59 +0000 (10:25 +0100)
committerMilian Wolff <milian.wolff@kdab.com>
Thu, 23 Feb 2017 09:25:59 +0000 (10:25 +0100)
src/analyze/gui/mainwindow.cpp
src/analyze/gui/mainwindow.ui

index 0a3dea6..4f8106c 100644 (file)
@@ -99,8 +99,6 @@ void setupTopView(TreeModel* source, QTreeView* view, TopProxy::Type type)
     proxy->setSourceModel(source);
     proxy->setSortRole(TreeModel::SortRole);
     view->setModel(proxy);
-    view->setRootIsDecorated(false);
-    view->setUniformRowHeights(true);
     view->sortByColumn(0);
     view->header()->setStretchLastSection(true);
     addContextMenu(view, TreeModel::LocationRole);
index e367cb6..a7dd7b9 100644 (file)
                      <property name="toolTip">
                       <string>List of functions that allocated the most memory at a given time.</string>
                      </property>
+                     <property name="alternatingRowColors">
+                      <bool>true</bool>
+                     </property>
+                     <property name="rootIsDecorated">
+                      <bool>false</bool>
+                     </property>
+                     <property name="uniformRowHeights">
+                      <bool>true</bool>
+                     </property>
                     </widget>
                    </item>
                   </layout>
                      <property name="toolTip">
                       <string>List of functions that leak the most memory.</string>
                      </property>
+                     <property name="alternatingRowColors">
+                      <bool>true</bool>
+                     </property>
+                     <property name="rootIsDecorated">
+                      <bool>false</bool>
+                     </property>
+                     <property name="uniformRowHeights">
+                      <bool>true</bool>
+                     </property>
                     </widget>
                    </item>
                   </layout>
                      <property name="toolTip">
                       <string>List of functions that allocate memory most often.</string>
                      </property>
+                     <property name="alternatingRowColors">
+                      <bool>true</bool>
+                     </property>
+                     <property name="rootIsDecorated">
+                      <bool>false</bool>
+                     </property>
+                     <property name="uniformRowHeights">
+                      <bool>true</bool>
+                     </property>
                     </widget>
                    </item>
                   </layout>
                      <property name="toolTip">
                       <string>List of functions that produced the most temporary memory allocations.</string>
                      </property>
+                     <property name="alternatingRowColors">
+                      <bool>true</bool>
+                     </property>
+                     <property name="rootIsDecorated">
+                      <bool>false</bool>
+                     </property>
+                     <property name="uniformRowHeights">
+                      <bool>true</bool>
+                     </property>
                     </widget>
                    </item>
                   </layout>
                      <property name="toolTip">
                       <string>List of functions that allocated the most memory overall, ignoring deallocations.</string>
                      </property>
+                     <property name="alternatingRowColors">
+                      <bool>true</bool>
+                     </property>
+                     <property name="rootIsDecorated">
+                      <bool>false</bool>
+                     </property>
+                     <property name="uniformRowHeights">
+                      <bool>true</bool>
+                     </property>
                     </widget>
                    </item>
                   </layout>