┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincategorydrawer.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-07-12 14:00:45 +0000
committerPeter Penz <[email protected]>2009-07-12 14:00:45 +0000
commitfa4680cb38028aceb68d41e1937d27c71d1f121b (patch)
treeda709625c38a42bf448077d985c75b0365a58252 /src/dolphincategorydrawer.cpp
parent2df2d4ea7ee63a43a327b4ffb1c5cddd176aff91 (diff)
Enable Dolphin to show the revision states of files that are under revision control systems like SVN, Git, CVS, ... The current code is an early draft and it is planned that all plugins (SVN, Git, CVS, ...) are maintained outside Dolphin. If the API is stable enough, a discussion will be done at [email protected] regarding the location of the plugins (the current implementation of SubversionPlugin is only temporary located in Dolphin for testing purposes).
RevisionControlObserver is implemented in a way that no recognizable slowdown is given for directories that are not under revision control. CCBUG: 192158 svn path=/trunk/KDE/kdebase/apps/; revision=995351
Diffstat (limited to 'src/dolphincategorydrawer.cpp')
-rw-r--r--src/dolphincategorydrawer.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/dolphincategorydrawer.cpp b/src/dolphincategorydrawer.cpp
index b06f97560..00af90d63 100644
--- a/src/dolphincategorydrawer.cpp
+++ b/src/dolphincategorydrawer.cpp
@@ -193,35 +193,18 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
break;
}
-#ifdef HAVE_NEPOMUK
- case DolphinModel::Rating: {
- paintText = false;
+ case DolphinModel::Revision:
paintIcon = false;
-
- painter->setLayoutDirection( option.direction );
- QRect ratingRect( option.rect );
- ratingRect.setTop(option.rect.top() + (option.rect.height() / 2) - (iconSize / 2));
- ratingRect.setHeight( iconSize );
- KRatingPainter::paintRating( painter, ratingRect, Qt::AlignLeft, category.toInt() );
break;
- }
-
- case DolphinModel::Tags:
- paintIcon = false;
- break;
-#endif
}
if (paintIcon) {
painter->drawPixmap(QRect(option.direction == Qt::LeftToRight ? opt.rect.left()
: opt.rect.right() - icon.width() + (iconSize / 4), opt.rect.top(), icon.width(), icon.height()), icon);
- if (option.direction == Qt::LeftToRight)
- {
+ if (option.direction == Qt::LeftToRight) {
opt.rect.setLeft(opt.rect.left() + icon.width() + (iconSize / 4));
- }
- else
- {
+ } else {
opt.rect.setRight(opt.rect.right() + (iconSize / 4));
}
}
@@ -232,9 +215,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
painter->setPen(color);
QRect textRect = opt.rect;
-
- if (option.direction == Qt::RightToLeft)
- {
+ if (option.direction == Qt::RightToLeft) {
textRect.setWidth(textRect.width() - (paintIcon ? icon.width() + (iconSize / 4)
: -(iconSize / 4)));
}