dtkLogDestination.h 2.64 KB
Newer Older
1
2
3
4
5
6
/* dtkLogDestination.h --- 
 * 
 * Author: Julien Wintz
 * Copyright (C) 2008-2011 - Julien Wintz, Inria.
 * Created: Thu Mar  1 15:10:22 2012 (+0100)
 * Version: $Id$
7
8
9
 * Last-Updated: Wed Apr  4 10:00:13 2012 (+0200)
 *           By: tkloczko
 *     Update #: 49
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 */

/* Commentary: 
 * 
 */

/* Change log:
 * 
 */

#ifndef DTKLOGDESTINATION_H
#define DTKLOGDESTINATION_H

#include "dtkLogExport.h"

#include <QtCore>
26
#include <QtGui>
27

Julien Wintz's avatar
Julien Wintz committed
28
29
class dtkLogModel;

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
// /////////////////////////////////////////////////////////////////
// dtkLogDestination
// /////////////////////////////////////////////////////////////////

class DTKLOG_EXPORT dtkLogDestination
{
public:
    virtual ~dtkLogDestination(void);

public:
    virtual void write(const QString& message) = 0;
};

// /////////////////////////////////////////////////////////////////
// dtkLogDestinationConsole
// /////////////////////////////////////////////////////////////////

class DTKLOG_EXPORT dtkLogDestinationConsole : public dtkLogDestination
{
public:
    void write(const QString& message);
};

// /////////////////////////////////////////////////////////////////
// dtkLogDestinationFile
// /////////////////////////////////////////////////////////////////

class dtkLogDestinationFilePrivate;

class DTKLOG_EXPORT dtkLogDestinationFile : public dtkLogDestination
{
public:
     dtkLogDestinationFile(const QString& path);
    ~dtkLogDestinationFile(void);

public:
    void write(const QString& message);

private:
    dtkLogDestinationFilePrivate *d;
};

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// /////////////////////////////////////////////////////////////////
// dtkLogDestinationText
// /////////////////////////////////////////////////////////////////

class dtkLogDestinationTextPrivate;

class DTKLOG_EXPORT dtkLogDestinationText : public dtkLogDestination
{
public:
     dtkLogDestinationText(QPlainTextEdit *editor);
    ~dtkLogDestinationText(void);

public:
    void write(const QString& message);

private:
    dtkLogDestinationTextPrivate *d;
};

Julien Wintz's avatar
Julien Wintz committed
91
92
93
94
// /////////////////////////////////////////////////////////////////
// dtkLogDestinationList
// /////////////////////////////////////////////////////////////////

Julien Wintz's avatar
Julien Wintz committed
95
class dtkLogDestinationModelPrivate;
Julien Wintz's avatar
Julien Wintz committed
96

Julien Wintz's avatar
Julien Wintz committed
97
class DTKLOG_EXPORT dtkLogDestinationModel : public dtkLogDestination
Julien Wintz's avatar
Julien Wintz committed
98
99
{
public:
Julien Wintz's avatar
Julien Wintz committed
100
101
     dtkLogDestinationModel(dtkLogModel *model);
    ~dtkLogDestinationModel(void);
Julien Wintz's avatar
Julien Wintz committed
102
103
104
105
106

public:
    void write(const QString& message);

private:
Julien Wintz's avatar
Julien Wintz committed
107
    dtkLogDestinationModelPrivate *d;
Julien Wintz's avatar
Julien Wintz committed
108
109
};

110
111
112
113
114
115
116
// /////////////////////////////////////////////////////////////////
// dtkLogDestinationPointer
// /////////////////////////////////////////////////////////////////

typedef QSharedPointer<dtkLogDestination> dtkLogDestinationPointer;

#endif