summaryrefslogtreecommitdiffstats
path: root/src/detailedentryitem.h
blob: dfff52054994a92215e6c497444be978f65078a7 (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
/***************************************************************************
    copyright            : (C) 2005-2007 by Robby Stephenson
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License as  *
 *   published by the Free Software Foundation;                            *
 *                                                                         *
 ***************************************************************************/

#ifndef TELLICO_DETAILEDENTRYITEM_H
#define TELLICO_DETAILEDENTRYITEM_H

class TQTime;
class TQTimer;

#include "entryitem.h"

namespace Tellico {

class DetailedListView;

/**
 * @author Robby Stephenson
 */
class DetailedEntryItem : public EntryItem {
public:
  enum State { Normal, New, Modified };

  DetailedEntryItem(DetailedListView* parent, Data::EntryPtr entry);
  ~DetailedEntryItem();

  void setState(State state);

  virtual TQColor backgroundColor(int column);
  virtual void paintCell(TQPainter* p, const TQColorGroup& cg,
                         int column, int width, int align);

private:
  /**
   * Paints a focus indicator on the rectangle (current item). Disable for current items.
   */
  void paintFocus(TQPainter*, const TQColorGroup&, const TQRect&);

  State m_state;
  TQTime* m_time;
  TQTimer* m_timer;
};

}

#endif