From 8c20dc919f7d54eb48fb60f39ba5e1d466a70763 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Wed, 13 Jan 2021 19:26:24 +0200 Subject: Initial commit Signed-off-by: Mavridis Philippe --- src/frame.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/frame.h (limited to 'src/frame.h') diff --git a/src/frame.h b/src/frame.h new file mode 100644 index 0000000..813db1e --- /dev/null +++ b/src/frame.h @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (C) 2004 by Sashmit Bhaduri * + * smt@vfemail.net * + * * + * Licensed under GPL. * + ***************************************************************************/ + +#ifndef FRAME_H +#define FRAME_H + +#include + +#include + +namespace KPIM +{ + class ProgressItem; +} + +namespace KlamAV +{ + + class Frame : public QObject + { + Q_OBJECT + + public: + Frame(QObject *parent, KParts::ReadOnlyPart *part, QWidget *w, const QString& tit, bool watch=true); + ~Frame(); + + enum {Idle, Started, Completed, Canceled}; + + KParts::ReadOnlyPart *part() const; + QWidget *widget() const; + const QString title() const; + const QString caption() const; + int state() const; + int progress() const; + const QString statusText() const; + + public slots: + void setStarted(); + void setCanceled(const QString &); + void setCompleted(); + void setState(int); + void setProgress(int); + void setCaption(const QString &); + void setTitle(const QString &); + void setStatusText(const QString &); + + signals: + void captionChanged(const QString &); + void started(); + void canceled(const QString &); + void completed(); + void loadingProgress(int); + void statusText(const QString &); + + private: + KParts::ReadOnlyPart *m_part; + QWidget *m_widget; + QString m_title; + QString m_caption; + int m_state; + int m_progress; + QString m_statusText; + QString m_progressId; + KPIM::ProgressItem *m_progressItem; + }; +} + +#endif + + +// vim: set et ts=4 sts=4 sw=4: -- cgit v1.2.1