kpilot Library API Documentation

logWidget.h

00001 #ifndef _KPILOT_LOGWIDGET_H
00002 #define _KPILOT_LOGWIDGET_H
00003 /* logWidget.h                          KPilot
00004 **
00005 ** Copyright (C) 2001 by Dan Pilone
00006 **
00007 ** This file defines the log window widget, which logs
00008 ** sync-messages during a HotSync.
00009 */
00010 
00011 /*
00012 ** This program is free software; you can redistribute it and/or modify
00013 ** it under the terms of the GNU General Public License as published by
00014 ** the Free Software Foundation; either version 2 of the License, or
00015 ** (at your option) any later version.
00016 **
00017 ** This program is distributed in the hope that it will be useful,
00018 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 ** GNU General Public License for more details.
00021 **
00022 ** You should have received a copy of the GNU General Public License
00023 ** along with this program in a file called COPYING; if not, write to
00024 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00025 ** MA 02111-1307, USA.
00026 */
00027 
00028 /*
00029 ** Bug reports and questions can be sent to kde-pim@kde.org.
00030 */
00031 
00032 #include "logWidgetDCOP.h"
00033 #include "pilotComponent.h"
00034 
00035 class QLabel;
00036 class QTextEdit;
00037 class QHBox;
00038 class KProgress;
00039 
00040 class LogWidget : public PilotComponent , public LoggerDCOP
00041 {
00042 Q_OBJECT
00043 
00044 public:
00045         LogWidget(QWidget *);
00046         ~LogWidget() { } ;
00047 
00048         // Pilot Component Methods:
00049         //
00050         void initialize();
00051 
00052         bool showTime() const { return fShowTime; } ;
00053         void setShowTime(bool b) { fShowTime=b; } ;
00054 
00058         virtual ASYNC logError(QString);
00059         virtual ASYNC logMessage(QString);
00060         virtual ASYNC logProgress(QString,int);
00061 
00062         // GUI customization hooks
00063         //
00064         //
00065         QHBox *buttonBox() const { return fButtonBox; } ;
00066 
00067 public slots:
00068         void addMessage(const QString &);
00069         void addError(const QString &);
00070         void addProgress(const QString &,int);
00071         void syncDone();
00072 
00073 private slots:
00074         void hideSplash();
00075         void clearLog();
00076         void saveLog();
00077 
00078 private:
00079         bool saveFile(const QString &);
00080 
00081 private:
00082         QTextEdit *fLog;
00083         bool fShowTime;
00084         QLabel *fSplash;
00085         QLabel *fLabel;
00086         KProgress *fProgress;
00087         QHBox *fButtonBox;
00088 } ;
00089 
00090 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001