! * get list of all theme names */
| 96 | * get list of all theme names |
| 97 | */ |
| 98 | QStringList ThemeHandler::themes() { |
| 99 | DEBUG(Q_FUNC_INFO); |
| 100 | QStringList themePaths = themeList(); |
| 101 | |
| 102 | QStringList themes; |
| 103 | for (int i = 0; i < themePaths.size(); ++i) { |
| 104 | QFileInfo fileinfo(themePaths.at(i)); |
| 105 | themes.append(fileinfo.fileName().split(QLatin1Char('.')).at(0)); |
| 106 | } |
| 107 | |
| 108 | if (!themes.isEmpty()) { |
| 109 | DEBUG(" first theme: " << STDSTRING(themes.first())); |
| 110 | QDEBUG(" themes = " << themes); |
| 111 | } |
| 112 | |
| 113 | themes.sort(); |
| 114 | |
| 115 | return themes; |
| 116 | } |
| 117 | |
| 118 | /*! |
| 119 | * get path for theme of name 'name' |