equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: An interface to output log string. |
|
15 * |
|
16 */ |
|
17 #include <logoutput.h> |
|
18 #include <QString> |
|
19 |
|
20 class LogOutputPrivate |
|
21 { |
|
22 public: |
|
23 LogOutputPrivate(Logger *parentLogger = 0) : mParentLogger(parentLogger) |
|
24 { |
|
25 } |
|
26 Logger *mParentLogger; |
|
27 QString mName; |
|
28 }; |
|
29 |
|
30 |
|
31 //LogOutput |
|
32 LogOutput::LogOutput(Logger *parentLogger /*= 0*/) |
|
33 : d_ptr(new LogOutputPrivate(parentLogger)) |
|
34 { |
|
35 } |
|
36 |
|
37 LogOutput::~LogOutput() |
|
38 { |
|
39 delete d_ptr; |
|
40 } |
|
41 |
|
42 bool LogOutput::load(QSettings &settings) |
|
43 { |
|
44 if (!doLoad(settings)) { |
|
45 return false; |
|
46 } |
|
47 return init(); |
|
48 } |
|
49 |
|
50 Logger *LogOutput::parentLogger() |
|
51 { |
|
52 return d_ptr->mParentLogger; |
|
53 } |
|
54 |
|
55 void LogOutput::setParentLogger(Logger *parentLogger) |
|
56 { |
|
57 d_ptr->mParentLogger = parentLogger; |
|
58 } |
|
59 |
|
60 QString LogOutput::name() const |
|
61 { |
|
62 return d_ptr->mName; |
|
63 } |
|
64 |
|
65 void LogOutput::setName(const QString &name) |
|
66 { |
|
67 d_ptr->mName = name; |
|
68 } |
|
69 |
|