summaryrefslogtreecommitdiffstats
path: root/kshowmail/filterlogviewmoveditem.h
blob: 4c1be06f20cd6aa25877807a80d62563a50b1935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// C++ Interface: filterlogviewmoveditem
//
// Description:
//
//
// Author: Ulrich Weigelt <ulrich.weigelt@gmx.de>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef FILTERLOGVIEWMOVEDITEM_H
#define FILTERLOGVIEWMOVEDITEM_H

//TQt Headers
#include <tqdatetime.h>

//KDE headers
#include <tdelistview.h>

/**
 * @brief Item of the filter log view of moved mails
 * @author Ulrich Weigelt <ulrich.weigelt@gmx.de>
 */
class FilterLogViewMovedItem : public TDEListViewItem
{

  public:

  /**
   * Column Numbers.
   */
    enum Column{ ColDate = 0, ColSender = 1, ColAccount = 2, ColMailbox = 3, ColSubject = 4 };

    /**
     * Constructor
     * @param parent the log view of this items
     */
    FilterLogViewMovedItem( TDEListView* parent);

    /**
     * Destructor
     */
    ~FilterLogViewMovedItem();

    /**
     * Sets the column values.
     * @param date date and time at which the mail was sent
     * @param sender sender of the mail
     * @param account account
     * @param mailbox mailbox to which the mail was moved
     * @param subject mail subject
     */
    void setValues( TQDateTime date, TQString sender, TQString account, TQString mailbox, TQString subject );

    /**
     * Reimplemantation of TQListViewItem::compare.
     * Compares this list view item to i using the column col in ascending order. Returns <0 if this item is less than i,
     * 0 if they are equal and >0 if this item is greater than i. The parameter ascneding will be ignored.
     * @param i pointer to the second view item
     * @param col number of the sorted column
     * @param ascending ignored
     */
    virtual int compare( TQListViewItem* i, int col, bool ascending ) const;

    /**
     * Returns the date of sent
     * @return date of sent
     */
    TQDateTime getDate();


  private:

    /**
   * sent date and time
     */
    TQDateTime date;

    /**
     * sender of the mail
     */
    TQString sender;

    /**
     * Account
     */
    TQString account;

    /**
     * mail subject
     */
    TQString subject;

    /**
     * mailbox
     */
    TQString mailbox;
};

#endif