Changeset 2eeb21
- Timestamp:
- Sep 2, 2016, 7:56:52 AM (8 years ago)
- Branches:
- Gui_Fixes
- Children:
- f62b00
- Parents:
- e03e9f
- Location:
- src/UIElements/Views/Qt4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtFragmentList.cpp
re03e9f r2eeb21 116 116 ++keyiter,++resultiter,++count) { 117 117 118 QTreeWidgetItem *treeItem = new QtNumericalItem( this);118 QTreeWidgetItem *treeItem = new QtNumericalItem(NUMBER, this); 119 119 treeItem->setText(NUMBER, QString::number(count)); 120 120 { -
src/UIElements/Views/Qt4/QtHomologyList.cpp
re03e9f r2eeb21 179 179 180 180 // create item 181 QTreeWidgetItem *treeItem = new QtNumericalItem( this);181 QTreeWidgetItem *treeItem = new QtNumericalItem(NUMBER, treewidget); 182 182 treeItem->setText(NUMBER, QString::number(count)); 183 183 { -
src/UIElements/Views/Qt4/QtNumericalItem.cpp
re03e9f r2eeb21 44 44 bool QtNumericalItem::operator<(const QTreeWidgetItem &_item) const { 45 45 const int col = treeWidget()->sortColumn(); 46 const int mynr = boost::lexical_cast<int>(QTreeWidgetItem::text(col).toStdString()); 47 const int othernr = boost::lexical_cast<int>(_item.text(col).toStdString()); 48 return mynr < othernr; 46 if (col == view_column) { 47 const int mynr = boost::lexical_cast<int>(QTreeWidgetItem::text(col).toStdString()); 48 const int othernr = boost::lexical_cast<int>(_item.text(col).toStdString()); 49 return mynr < othernr; 50 } else 51 return QTreeWidgetItem::text(col).toStdString() < _item.text(col).toStdString(); 49 52 } 50 53 -
src/UIElements/Views/Qt4/QtNumericalItem.hpp
re03e9f r2eeb21 22 22 { 23 23 public: 24 QtNumericalItem(QTreeWidget *parent = 0) : 25 QTreeWidgetItem(parent) 24 QtNumericalItem(int column, QTreeWidget *parent = 0) : 25 QTreeWidgetItem(parent), 26 view_column(column) 26 27 {} 27 28 28 29 bool operator<(const QTreeWidgetItem &_item) const; 30 31 private: 32 //!> such that we know that we need to check 33 const int view_column; 29 34 }; 30 35
Note:
See TracChangeset
for help on using the changeset viewer.