controlpanel/controlpanel_plat/inc/logoutput.h
branchRCL_3
changeset 54 7e0eff37aedb
parent 53 8ee96d21d9bf
child 57 e78c61e77b1a
equal deleted inserted replaced
53:8ee96d21d9bf 54:7e0eff37aedb
     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 #ifndef LOGOUTPUT_H
       
    18 #define LOGOUTPUT_H
       
    19 
       
    20 #include <loggerglobal.h>
       
    21 #include <QObject>
       
    22 
       
    23 class QString;
       
    24 class QSettings;
       
    25 class Logger;
       
    26 
       
    27 class LogOutputPrivate;
       
    28 class LOGGER_EXPORT LogOutput : public QObject
       
    29 {
       
    30     Q_OBJECT
       
    31     Q_PROPERTY(QString name READ name WRITE setName)
       
    32 public:
       
    33     virtual ~LogOutput();
       
    34     virtual void output(const QString &log) = 0;
       
    35     virtual bool init() = 0;
       
    36     bool load(QSettings &settings);
       
    37 
       
    38     Logger *parentLogger();
       
    39     void setParentLogger(Logger *parentLogger);
       
    40 
       
    41     QString name() const;
       
    42     void setName(const QString &name);
       
    43 private:
       
    44     virtual bool doLoad(QSettings &settings) = 0;
       
    45 protected:
       
    46     LogOutput(Logger *parentLogger = 0);
       
    47 private:
       
    48     LogOutputPrivate *d_ptr;
       
    49 };
       
    50 
       
    51 #endif //LOGOUTPUT_H