1 /***************************************************************************
2 * Copyright (C) 2004 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #include "threadlistviewitem.h"
15 ThreadListViewItem::ThreadListViewItem(int column)
16 : QTableWidgetItem(Qt::ItemIsSelectable), m_column(column)
19 /* public */ /* virtual */
20 bool ThreadListViewItem::operator<(const QTableWidgetItem& other) const
22 QString thisText = text();
23 QString otherText = other.text();
28 return thisText.toInt() > otherText.toInt();
30 return thisText.toInt() > otherText.toInt();
32 return data(Qt::UserRole).toInt() > other.data(Qt::UserRole).toInt();
34 return QString::localeAwareCompare(thisText, otherText) > 0;
36 return thisText.toDouble() * 1000 > otherText.toDouble() * 1000;
38 return QString::localeAwareCompare(thisText, otherText) > 0;