diff options
| author | Peter Penz <[email protected]> | 2009-08-13 20:48:58 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-13 20:48:58 +0000 |
| commit | d84909dc36acbd91c37de76e793f81dca9b2ace9 (patch) | |
| tree | fc4b3e4bd70e2f0cfa9b1f0f77fb2ae9b1c47f05 /src/dolphinfileitemdelegate.cpp | |
| parent | 54093338c413b578cff2377503940dbc2ab0238e (diff) | |
* Use the term "version control" instead of "revision control" to be consistent with the naming in kdevplatform.
* Renamed VersionControlPlugin to KVersionControlPlugin so that the interface can be moved out of Dolphin.
svn path=/trunk/KDE/kdebase/apps/; revision=1011058
Diffstat (limited to 'src/dolphinfileitemdelegate.cpp')
| -rw-r--r-- | src/dolphinfileitemdelegate.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dolphinfileitemdelegate.cpp b/src/dolphinfileitemdelegate.cpp index d0c84a6bb..5060dd0d7 100644 --- a/src/dolphinfileitemdelegate.cpp +++ b/src/dolphinfileitemdelegate.cpp @@ -59,15 +59,15 @@ void DolphinFileItemDelegate::paint(QPainter* painter, KFileItemDelegate::paint(painter, option, index); } - if (dolphinModel->hasRevisionData() && isNameColumn) { + if (dolphinModel->hasVersionData() && isNameColumn) { // The currently shown items are under revision control. Show the current revision // state by adding an emblem. const QModelIndex dirIndex = proxyModel->mapToSource(index); - const QModelIndex revisionIndex = dolphinModel->index(dirIndex.row(), DolphinModel::Revision, dirIndex.parent()); + const QModelIndex revisionIndex = dolphinModel->index(dirIndex.row(), DolphinModel::Version, dirIndex.parent()); const QVariant data = dolphinModel->data(revisionIndex, Qt::DecorationRole); - const RevisionControlPlugin::RevisionState state = static_cast<RevisionControlPlugin::RevisionState>(data.toInt()); + const KVersionControlPlugin::VersionState state = static_cast<KVersionControlPlugin::VersionState>(data.toInt()); - if (state != RevisionControlPlugin::UnversionedRevision) { + if (state != KVersionControlPlugin::UnversionedVersion) { const QRect rect = iconRect(option, index); const QPixmap emblem = emblemForState(state, rect.size()); painter->drawPixmap(rect.x(), rect.y() + rect.height() - emblem.height(), emblem); @@ -105,11 +105,11 @@ void DolphinFileItemDelegate::adjustOptionWidth(QStyleOptionViewItemV4& option, } } -QPixmap DolphinFileItemDelegate::emblemForState(RevisionControlPlugin::RevisionState state, const QSize& size) const +QPixmap DolphinFileItemDelegate::emblemForState(KVersionControlPlugin::VersionState state, const QSize& size) const { // TODO: all icons that are use here will be replaced by revision control emblems provided by the // Oxygen team before KDE 4.4 - Q_ASSERT(state <= RevisionControlPlugin::ConflictingRevision); + Q_ASSERT(state <= KVersionControlPlugin::ConflictingVersion); if ((m_cachedSize != size) || !m_cachedEmblems[state].isNull()) { m_cachedSize = size; @@ -127,14 +127,14 @@ QPixmap DolphinFileItemDelegate::emblemForState(RevisionControlPlugin::RevisionS } const QSize emblemSize(emblemHeight, emblemHeight); - for (int i = 0; i <= RevisionControlPlugin::ConflictingRevision; ++i) { + for (int i = 0; i <= KVersionControlPlugin::ConflictingVersion; ++i) { QString iconName; switch (state) { - case RevisionControlPlugin::NormalRevision: iconName = "dialog-ok-apply"; break; - case RevisionControlPlugin::UpdateRequiredRevision: iconName = "rating"; break; - case RevisionControlPlugin::LocallyModifiedRevision: iconName = "emblem-important"; break; - case RevisionControlPlugin::AddedRevision: iconName = "list-add"; break; - case RevisionControlPlugin::ConflictingRevision: iconName = "application-exit"; break; + case KVersionControlPlugin::NormalVersion: iconName = "dialog-ok-apply"; break; + case KVersionControlPlugin::UpdateRequiredVersion: iconName = "rating"; break; + case KVersionControlPlugin::LocallyModifiedVersion: iconName = "emblem-important"; break; + case KVersionControlPlugin::AddedVersion: iconName = "list-add"; break; + case KVersionControlPlugin::ConflictingVersion: iconName = "application-exit"; break; default: Q_ASSERT(false); break; } |
