kpilot/kpilot
logWidget.h00001 #ifndef _KPILOT_LOGWIDGET_H
00002 #define _KPILOT_LOGWIDGET_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "loggerDCOP.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
00049
00050 bool showTime() const { return fShowTime; } ;
00051 void setShowTime(bool b) { fShowTime=b; } ;
00052
00056 virtual ASYNC logError(QString);
00057 virtual ASYNC logMessage(QString);
00058 virtual ASYNC logProgress(QString,int);
00059 virtual ASYNC logStartSync();
00060 virtual ASYNC logEndSync();
00061
00062
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
|