equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "cpthemechanger.h" |
18 #include "cpthemechanger.h" |
19 #include "cpthemechanger_p.h" |
19 #include "cpthemechanger_p.h" |
|
20 #include "cpthemelistmodel.h" |
20 |
21 |
21 /*! |
22 /*! |
22 @alpha |
23 @alpha |
23 @hbcore |
|
24 \class CpThemeChanger |
24 \class CpThemeChanger |
25 |
25 |
26 \brief CpThemeChanger provides an interface for changing the current |
26 \brief CpThemeChanger provides an interface for changing the current |
27 theme and enumerating the available themes (e.g., for the UI to provide |
27 theme and enumerating the available themes (e.g., for the UI to provide |
28 a list of themes to show). |
28 a list of themes to show). |
44 Provides a list of themes as a const QAbstractItemModel*. |
44 Provides a list of themes as a const QAbstractItemModel*. |
45 */ |
45 */ |
46 QAbstractItemModel& CpThemeChanger::model() |
46 QAbstractItemModel& CpThemeChanger::model() |
47 { |
47 { |
48 Q_D(CpThemeChanger); |
48 Q_D(CpThemeChanger); |
49 |
49 |
50 return d->model; |
50 return d->mModel; |
51 } |
51 } |
52 |
52 |
53 |
53 |
54 /*! |
54 /*! |
55 Creates a connection to the theme server for the purpose of |
55 Creates a connection to the theme server for the purpose of |
81 uninitialized. |
81 uninitialized. |
82 */ |
82 */ |
83 const CpThemeChanger::ThemeInfo& CpThemeChanger::currentTheme() const |
83 const CpThemeChanger::ThemeInfo& CpThemeChanger::currentTheme() const |
84 { |
84 { |
85 Q_D(const CpThemeChanger); |
85 Q_D(const CpThemeChanger); |
86 |
86 |
87 return d->currentTheme(); |
87 return d->currentTheme(); |
88 } |
88 } |
89 |
89 |
|
90 /* |
|
91 * Returns index of theme from the theme list (not the model). |
|
92 */ |
90 int CpThemeChanger::indexOf(const ThemeInfo& theme) const |
93 int CpThemeChanger::indexOf(const ThemeInfo& theme) const |
91 { |
94 { |
92 Q_D(const CpThemeChanger); |
95 Q_D(const CpThemeChanger); |
|
96 |
93 return d->indexOf(theme); |
97 return d->indexOf(theme); |
94 } |
98 } |
95 |
99 |
96 /*! |
100 /*! |
97 Change a theme. Returns true on success, false otherwise. |
101 Change a theme. Returns true on success, false otherwise. |