summaryrefslogtreecommitdiffstats
path: root/konversation/src/nick.h
blob: 4b96f0c62c957689552f6706e31f1eb63002337c (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
/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
*/

/*
  begin:     Fri Jan 25 2002
  copyright: (C) 2002 by Dario Abatianni
             (C) 2007 Peter Simonsson <peter.simonsson@gmail.com>
  email:     eisfuchs@tigress.com
*/

#ifndef NICK_H
#define NICK_H

#include <tqobject.h>
#include <tdelistview.h>

#include "channelnick.h"

class Nick : public TQObject, public TDEListViewItem
{
    Q_OBJECT
  
    public:
        Nick(TDEListView *listView,
            const ChannelNickPtr& channelnick);
        ~Nick();

        ChannelNickPtr getChannelNick() const;
        int getSortingValue() const;

        virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align);
        virtual int compare(TQListViewItem* item,int col,bool ascending) const;

    public slots:
        void refresh();

    signals:
        void refreshed();

    protected:
        TQString calculateLabel1();
        TQString calculateLabel2();

    protected:
        ChannelNickPtr m_channelnickptr;

        TQString label;
        int m_height;
        int m_flags;
        bool m_away;
};
#endif