Applets
jobwidget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef JOBWIDGET_H
00021 #define JOBWIDGET_H
00022
00023 #include "../core/job.h"
00024
00025 #include <KJob>
00026
00027 #include <QGraphicsWidget>
00028
00029 #include <Plasma/Service>
00030 #include <Plasma/ExtenderItem>
00031 #include <plasma/dataengine.h>
00032
00033 namespace Plasma
00034 {
00035 class ExtenderItem;
00036 class Label;
00037 class Meter;
00038 }
00039
00040 namespace SystemTray
00041 {
00042 class Job;
00043 }
00044
00045 class JobWidget : public QGraphicsWidget
00046 {
00047 Q_OBJECT
00048
00049 public:
00050 explicit JobWidget(SystemTray::Job *job, Plasma::ExtenderItem *parent);
00051 ~JobWidget();
00052
00053 public Q_SLOTS:
00054 void destroy();
00055 void updateJob();
00056
00057 protected:
00058 void resizeEvent(QGraphicsSceneResizeEvent *event);
00059
00060 private:
00061 void updateLabels();
00062
00063 Plasma::ExtenderItem *m_extenderItem;
00064 SystemTray::Job *m_job;
00065
00066 Plasma::Meter *m_meter;
00067 Plasma::Label *m_fromNameLabel;
00068 Plasma::Label *m_fromLabel;
00069 Plasma::Label *m_toNameLabel;
00070 Plasma::Label *m_toLabel;
00071 Plasma::Label *m_speedLabel;
00072 Plasma::Label *m_processedLabel;
00073 Plasma::Label *m_totalBytesLabel;
00074
00075 QString labelName0;
00076 QString labelName1;
00077 QString label0;
00078 QString label1;
00079 };
00080
00081 #endif