diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2015-04-14 12:50:55 +0200 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2015-04-15 10:53:25 +0200 |
commit | 9d3babea67fb5463e5b5bbd69a31131516476b96 (patch) | |
tree | 6725ffa4aa08d6a4df6af26068c113f00be46975 /src/gui/historylistview.cpp | |
parent | 10478170cb97e558899dcbdd3a6fef6a0e79a124 (diff) | |
download | twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.gz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.lz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.tar.xz twinkle-9d3babea67fb5463e5b5bbd69a31131516476b96.zip |
Qt4 port step 2: apply qt3toqt4
Diffstat (limited to 'src/gui/historylistview.cpp')
-rw-r--r-- | src/gui/historylistview.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/historylistview.cpp b/src/gui/historylistview.cpp index 2f9806c..575801c 100644 --- a/src/gui/historylistview.cpp +++ b/src/gui/historylistview.cpp @@ -21,9 +21,11 @@ #include "userintf.h" #include "qpixmap.h" +//Added by qt3to4: +#include <q3mimefactory.h> -HistoryListViewItem::HistoryListViewItem( QListView * parent, const t_call_record &cr, t_user *user_config, time_t _last_viewed) : - QListViewItem(parent, +HistoryListViewItem::HistoryListViewItem( Q3ListView * parent, const t_call_record &cr, t_user *user_config, time_t _last_viewed) : + Q3ListViewItem(parent, time2str(cr.time_start, "%d %b %Y %H:%M:%S").c_str(), cr.get_direction().c_str(), (cr.direction == t_call_record::DIR_IN ? @@ -39,13 +41,13 @@ HistoryListViewItem::HistoryListViewItem( QListView * parent, const t_call_recor // Set direction icon setPixmap(HISTCOL_DIRECTION, (cr.direction == t_call_record::DIR_IN ? - QPixmap::fromMimeSource("1leftarrow-yellow.png") : - QPixmap::fromMimeSource("1rightarrow.png"))); + qPixmapFromMimeSource("1leftarrow-yellow.png") : + qPixmapFromMimeSource("1rightarrow.png"))); // Set status icon setPixmap(HISTCOL_STATUS, (cr.invite_resp_code < 300 ? - QPixmap::fromMimeSource("ok.png") : - QPixmap::fromMimeSource("cancel.png"))); + qPixmapFromMimeSource("ok.png") : + qPixmapFromMimeSource("cancel.png"))); } void HistoryListViewItem::paintCell(QPainter *painter, const QColorGroup &cg, @@ -60,14 +62,14 @@ void HistoryListViewItem::paintCell(QPainter *painter, const QColorGroup &cg, // Highlight missed calls since last view grp.setColor(QColorGroup::Base, QColor("yellow")); } - QListViewItem::paintCell(painter, grp, column, width, align); + Q3ListViewItem::paintCell(painter, grp, column, width, align); painter->restore(); } -int HistoryListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const +int HistoryListViewItem::compare ( Q3ListViewItem * i, int col, bool ascending ) const { if (col != HISTCOL_TIMESTAMP) { - return QListViewItem::compare(i, col, ascending); + return Q3ListViewItem::compare(i, col, ascending); } if (call_record.time_start < ((HistoryListViewItem *)i)->get_time_start()) { return -1; |