akregator/src
frame.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef FRAME_H
00026 #define FRAME_H
00027
00028 #include <qobject.h>
00029
00030 namespace KParts
00031 {
00032 class ReadOnlyPart;
00033 }
00034
00035 namespace KPIM
00036 {
00037 class ProgressItem;
00038 }
00039
00040 namespace Akregator
00041 {
00042
00043 class Frame : public QObject
00044 {
00045 Q_OBJECT
00046
00047 public:
00048 Frame(QObject *parent, KParts::ReadOnlyPart *part, QWidget *w, const QString& tit, bool watchSignals=true);
00049 virtual ~Frame();
00050
00051 enum {Idle, Started, Completed, Canceled};
00052
00053 KParts::ReadOnlyPart *part() const;
00054 QWidget *widget() const;
00055 const QString& title() const;
00056 const QString& caption() const;
00057 int state() const;
00058 int progress() const;
00059 const QString& statusText() const;
00060
00062 void setAutoDeletePart(bool autoDelete);
00063
00064 public slots:
00065 void setStarted();
00066 void setCanceled(const QString &);
00067 void setCompleted();
00068 void setState(int);
00069 void setProgress(int);
00070 void setCaption(const QString &);
00071 void setTitle(const QString &);
00072 void setStatusText(const QString &);
00073
00074 signals:
00075 void captionChanged(const QString &);
00076 void titleChanged(Frame*, const QString&);
00077 void started();
00078 void canceled(const QString &);
00079 void completed();
00080 void loadingProgress(int);
00081 void statusText(const QString &);
00082
00083 private:
00084 KParts::ReadOnlyPart *m_part;
00085 QWidget *m_widget;
00086 QString m_title;
00087 QString m_caption;
00088 int m_state;
00089 int m_progress;
00090 QString m_statusText;
00091 QString m_progressId;
00092 KPIM::ProgressItem *m_progressItem;
00093 bool m_autoDeletePart;
00094 };
00095 }
00096
00097 #endif
00098
00099
00100
|