# showlistviewitem.cpp

    00001 /***************************************************************************
    00002                           showlistviewitem.cpp  -  description
    00003                              -------------------
    00004     begin                : Son Apr 21 2002
    00005     copyright            : (C) 2002 by Eggert Ehmke
    00006     email                : eggert.ehmke@berlin.de
    00007  ***************************************************************************/
    00008
    00009 /***************************************************************************
    00010  *                                                                         *
    00011  *   This program is free software; you can redistribute it and/or modify  *
    00012  *   it under the terms of the GNU General Public License as published by  *
    00013  *   the Free Software Foundation; either version 2 of the License, or     *
    00014  *   (at your option) any later version.                                   *
    00015  *                                                                         *
    00016  ***************************************************************************/
    00017
    00018 #include "showlistviewitem.h"
    00019
    00020 ShowListViewItem::ShowListViewItem (TQListView * parent,
    00021                   ShowListViewItem* after):
    00022 TQListViewItem (parent, after)
    00023 {}
    00024
    00025 ShowListViewItem::ShowListViewItem( TQListView * parent ) :
    00026     TQListViewItem( parent )
    00027 {
    00028 }
    00029
    00030 ShowListViewItem::~ShowListViewItem()
    00031 {}
    00032
    00033 TQString ShowListViewItem::key (int column, bool /*ascending*/) const
    00034 {
    00035        switch (column)
    00036        {
    00037        case _colNumber:
    00038               return text (_colAccount) + text (_colNumber);
    00039        case _colDate:
    00040               return m_time;
    00041        default:
    00042               return text (column);
    00043        }
    00044 }
    00045
    00050 int ShowListViewItem::compare( TQListViewItem *i, int col,
    00051                                bool ascending ) const
    00052 {
    00053   return key( col, ascending ).compare( i->key( col, ascending) );
    00054 }
    00055
    00056 void ShowListViewItem::setNumber (const TQString& number)
    00057 {
    00058   setText (_colNumber, number);
    00059 }
    00060
    00061 void ShowListViewItem::setAccount(const TQString& account)
    00062 {
    00063   setText (_colAccount, account);
    00064 }
    00065
    00066 void ShowListViewItem::setFrom(const TQString& from)
    00067 {
    00068   setText (_colFrom, from);
    00069 }
    00070
    00071 void ShowListViewItem::setTo(const TQString& to)
    00072 {
    00073   setText (_colTo, to);
    00074 }
    00075
    00076 void ShowListViewItem::setSubject(const TQString& subject)
    00077 {
    00078   setText (_colSubject, subject);
    00079 }
    00080
    00081 void ShowListViewItem::setDate(const TQString& date)
    00082 {
    00083   setText (_colDate, date);
    00084 }
    00085
    00086 void ShowListViewItem::setSize(const TQString& size)
    00087 {
    00088   setText (_colSize, size);
    00089 }
    00090
    00091 void ShowListViewItem::setContent(const TQString& content)
    00092 {
    00093   setText (_colContent, content);
    00094 }
    00095
    00096 void ShowListViewItem::setState(const TQString& state)
    00097 {
    00098   setText (_colState, state);
    00099 }
    00100
    00101 void ShowListViewItem::setTime (const TQString& time)
    00102 {
    00103        m_time = time;
    00104 }
    00105