summaryrefslogtreecommitdiffstats
path: root/kcron/ktlistitem.h
blob: 718fb79c7a42bceae243d76b3805f97f468a349a (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
/***************************************************************************
 *   KT list view item abstract base class.                                *
 *   --------------------------------------------------------------------  *
 *   Copyright (C) 1999, Gary Meyer <gary@meyer.net>                       *
 *   --------------------------------------------------------------------  *
 *   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.                                   * 
 ***************************************************************************/

#ifndef KTLISTITEM_H
#define KTLISTITEM_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif 

#include <tqlistview.h>

class KTPrint;
class CTCron;

/**
  * An enhanced TQListViewItem that ensures all list view items have the
  * same interface.
  */
class KTListItem : public QListViewItem
{
public:

/**
  * Construct a root list view item from a CTCron.
  */
  KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron);

/**
  * Construct a non-root list view item from a CTCron.
  */
  KTListItem(TQListView* parent, const char* name, CTCron* _ctcron);

/**
  * Destructor.
  */
  virtual ~KTListItem();

/**
  * Create.
  */
  virtual void create();

/**
  * Edit.
  */
  virtual void edit();

/**
  * Refresh.
  */
  virtual void refresh() = 0;

/**
  * Print.
  */
  virtual void print(KTPrint &printer) const =0;

/**
  * Get the user's crontab.
  */
  CTCron* getCTCron() const;

private:

/**
  * User's crontab.
  */
  CTCron* ctcron;

};

#endif // KTLISTITEM_H