Changeset View
Changeset View
Standalone View
Standalone View
src/KPropertyEditorDataModel.cpp
Show All 12 Lines | 1 | /* This file is part of the KDE project | |||
---|---|---|---|---|---|
13 | 13 | | |||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License | ||
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "KPropertyEditorDataModel.h" | 20 | #include "KPropertyEditorDataModel.h" | ||
21 | #include "KPropertyFactory.h" | 21 | #include "KPropertyWidgetsFactory.h" | ||
22 | #include "KProperty.h" | 22 | #include "KProperty.h" | ||
23 | #include "kproperty_debug.h" | 23 | #include "kproperty_debug.h" | ||
24 | 24 | | |||
25 | #include <QHash> | 25 | #include <QHash> | ||
26 | 26 | | |||
27 | class KPropertyEditorDataModel::Private | 27 | class KPropertyEditorDataModel::Private | ||
28 | { | 28 | { | ||
29 | public: | 29 | public: | ||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 114 | if (col == 0) { | |||
123 | } | 123 | } | ||
124 | } | 124 | } | ||
125 | else if (col == 1) { | 125 | else if (col == 1) { | ||
126 | KProperty *prop = propertyForItem(index); | 126 | KProperty *prop = propertyForItem(index); | ||
127 | if (role == Qt::EditRole) { | 127 | if (role == Qt::EditRole) { | ||
128 | return prop->value(); | 128 | return prop->value(); | ||
129 | } | 129 | } | ||
130 | else if (role == Qt::DisplayRole) { | 130 | else if (role == Qt::DisplayRole) { | ||
131 | return KPropertyFactoryManager::self()->convertValueToText(prop); | 131 | return KPropertyWidgetsFactoryManager::self()->convertValueToText(prop); | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | return QVariant(); | 134 | return QVariant(); | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | Qt::ItemFlags KPropertyEditorDataModel::flags(const QModelIndex &index) const | 137 | Qt::ItemFlags KPropertyEditorDataModel::flags(const QModelIndex &index) const | ||
138 | { | 138 | { | ||
139 | if (!index.isValid()) | 139 | if (!index.isValid()) | ||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |