15 * |
15 * |
16 */ |
16 */ |
17 #ifndef NMATTACHMENTLISTWIDGET_H_ |
17 #ifndef NMATTACHMENTLISTWIDGET_H_ |
18 #define NMATTACHMENTLISTWIDGET_H_ |
18 #define NMATTACHMENTLISTWIDGET_H_ |
19 |
19 |
|
20 #include <QColor> |
|
21 |
20 #include <hbwidget.h> |
22 #include <hbwidget.h> |
21 #include "nmailuiwidgetsdef.h" |
23 #include "nmailuiwidgetsdef.h" |
22 |
24 |
23 class NmAttachmentListItem; |
25 class NmAttachmentListItem; |
24 class QGraphicsGridLayout; |
26 class QGraphicsGridLayout; |
|
27 class QStyleOptionGraphicsItem; |
|
28 class QPainter; |
25 |
29 |
26 class NMAILUIWIDGETS_EXPORT NmAttachmentListWidget : public HbWidget |
30 class NMAILUIWIDGETS_EXPORT NmAttachmentListWidget : public HbWidget |
27 { |
31 { |
28 Q_OBJECT |
32 Q_OBJECT |
29 |
33 |
30 public: |
34 public: |
31 NmAttachmentListWidget(QGraphicsItem *parent = 0); |
35 NmAttachmentListWidget(QGraphicsItem *parent = 0); |
32 virtual ~NmAttachmentListWidget(); |
36 virtual ~NmAttachmentListWidget(); |
|
37 void setTextColor(const QColor color); |
33 void insertAttachment(const int index, const QString &fileName, const QString &fileSize); |
38 void insertAttachment(const int index, const QString &fileName, const QString &fileSize); |
34 void removeAttachment(const int index); |
39 void removeAttachment(const int index); |
|
40 void setAttachmentSize(int index, const QString &fileSize); |
35 int count() const; |
41 int count() const; |
36 int progressValue(int index) const; |
42 int progressValue(int index) const; |
|
43 void paint(QPainter *painter,const QStyleOptionGraphicsItem *option,QWidget *widget); |
37 |
44 |
38 public slots: |
45 public slots: |
39 void setProgressBarValue(int index, int value); |
46 void setProgressBarValue(int index, int value); |
40 |
47 |
41 private slots: |
48 private slots: |
57 private: |
64 private: |
58 Q_DISABLE_COPY(NmAttachmentListWidget) |
65 Q_DISABLE_COPY(NmAttachmentListWidget) |
59 QList<NmAttachmentListItem*> mItemList; //owned |
66 QList<NmAttachmentListItem*> mItemList; //owned |
60 QGraphicsGridLayout *mLayout; |
67 QGraphicsGridLayout *mLayout; |
61 Qt::Orientation mOrientation; |
68 Qt::Orientation mOrientation; |
|
69 QColor mTextColor; |
62 }; |
70 }; |
63 |
71 |
64 #endif // NMATTACHMENTLISTWIDGET_H_ |
72 #endif // NMATTACHMENTLISTWIDGET_H_ |