equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <HbTextItem> |
18 #include <HbTextItem> |
|
19 #include <HbEvent> |
|
20 #include <QApplication> |
19 #include "hgmediawall_p.h" |
21 #include "hgmediawall_p.h" |
20 #include "hgwidgetitem.h" |
22 #include "hgwidgetitem.h" |
21 #include "hgcoverflowcontainer.h" |
23 #include "hgcoverflowcontainer.h" |
22 #include "hgcenteritemarea.h" |
24 #include "hgcenteritemarea.h" |
23 #include "trace.h" |
25 #include "trace.h" |
39 |
41 |
40 Q_Q(HgMediawall); |
42 Q_Q(HgMediawall); |
41 |
43 |
42 mTitleItem = new HbTextItem("", q); |
44 mTitleItem = new HbTextItem("", q); |
43 q->style()->setItemName(mTitleItem, "title"); |
45 q->style()->setItemName(mTitleItem, "title"); |
|
46 mTitleItem->setElideMode(Qt::ElideRight); |
44 |
47 |
45 mDescriptionItem = new HbTextItem("", q); |
48 mDescriptionItem = new HbTextItem("", q); |
46 q->style()->setItemName(mDescriptionItem, "description"); |
49 q->style()->setItemName(mDescriptionItem, "description"); |
47 |
50 mDescriptionItem->setElideMode(Qt::ElideRight); |
|
51 |
48 mCenterItemArea = new HgCenterItemArea(q); |
52 mCenterItemArea = new HgCenterItemArea(q); |
49 q->style()->setItemName(mCenterItemArea, "centeritem"); |
53 q->style()->setItemName(mCenterItemArea, "centeritem"); |
50 |
54 |
51 HgCoverflowContainer* container = new HgCoverflowContainer(q); |
55 HgCoverflowContainer* container = new HgCoverflowContainer(q); |
52 q->style()->setItemName(container, "content"); |
56 q->style()->setItemName(container, "content"); |
125 mTitleItem->setText(item->title()); |
129 mTitleItem->setText(item->title()); |
126 mDescriptionItem->setText(item->description()); |
130 mDescriptionItem->setText(item->description()); |
127 } |
131 } |
128 } |
132 } |
129 |
133 |
|
134 void HgMediawallPrivate::handleThemeChanged() |
|
135 { |
|
136 HgWidgetPrivate::handleThemeChanged(); |
|
137 |
|
138 if (mTitleItem || mDescriptionItem) { |
|
139 Q_Q(HgMediawall); |
|
140 |
|
141 // this is needed to enforce color fetch from CSS |
|
142 HbEvent themeEvent(HbEvent::ThemeChanged); |
|
143 QApplication::sendEvent(q, &themeEvent); |
|
144 } |
|
145 } |
|
146 |
130 // EOF |
147 // EOF |