equal
deleted
inserted
replaced
49 QStringList themePaths = CpThemeUtil::themeDirectories(mThemeList); |
49 QStringList themePaths = CpThemeUtil::themeDirectories(mThemeList); |
50 if(!themePaths.empty()) { |
50 if(!themePaths.empty()) { |
51 mFileWatcher->addPaths(themePaths); |
51 mFileWatcher->addPaths(themePaths); |
52 } |
52 } |
53 |
53 |
54 connect(mFileWatcher, SIGNAL(directoryChanged(QString&)), |
54 connect(mFileWatcher, SIGNAL(directoryChanged(QString)), |
55 this, SLOT(themeListChanged())); |
55 this, SLOT(themeListChanged())); |
56 |
56 |
57 // data for the list which appears after the themes: |
57 // data for the list which appears after the themes: |
58 CpThemeInfo fetchFromStore; |
58 CpThemeInfo fetchFromStore; |
59 fetchFromStore.setName(hbTrId("txt_cp_list_get_more_tones")); |
59 fetchFromStore.setName(hbTrId("txt_cp_list_get_more_tones")); |
111 if (list) { |
111 if (list) { |
112 switch (role) { |
112 switch (role) { |
113 case Qt::DisplayRole: |
113 case Qt::DisplayRole: |
114 retVal = list->at(row).name(); |
114 retVal = list->at(row).name(); |
115 break; |
115 break; |
116 |
116 #ifdef CP_THEME_PREVIEW_DEFINED |
117 case Qt::DecorationRole: |
117 case Qt::DecorationRole: |
118 retVal = list->at(row).icon(); |
118 retVal = list->at(row).icon(); |
119 break; |
|
120 |
|
121 case Qt::SizeHintRole: |
|
122 retVal = list->at(row).icon().size(); |
|
123 break; |
119 break; |
124 |
120 |
125 case PortraitPreviewRole: |
121 case PortraitPreviewRole: |
126 retVal = list->at(row).portraitPreviewIcon(); |
122 retVal = list->at(row).portraitPreviewIcon(); |
127 break; |
123 break; |
128 |
124 |
129 case LandscapePreviewRole: |
125 case LandscapePreviewRole: |
130 retVal = list->at(row).landscapePreviewIcon(); |
126 retVal = list->at(row).landscapePreviewIcon(); |
131 break; |
127 break; |
132 |
128 #endif |
|
129 case Qt::SizeHintRole: |
|
130 retVal = list->at(row).icon().size(); |
|
131 break; |
|
132 |
133 case ItemDataRole: |
133 case ItemDataRole: |
134 retVal = list->at(row).itemData(); |
134 retVal = list->at(row).itemData(); |
135 break; |
135 break; |
136 |
136 |
137 case ItemTypeRole: |
137 case ItemTypeRole: |