]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.h
Fix selection rect after porting from QFontMetrics::width()
[dolphin.git] / src / kitemviews / kitemlistview.h
index e3793e10ef55a513757c52b9000e34a4884451d6..2a3b7ada27569f3e4544936b158a801384d398f3 100644 (file)
@@ -1,8 +1,7 @@
 /***************************************************************************
  *   Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com>             *
  *                                                                         *
- *   Based on the Itemviews NG project from Trolltech Labs:                *
- *   http://qt.gitorious.org/qt-labs/itemviews-ng                          *
+ *   Based on the Itemviews NG project from Trolltech Labs                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
 #define KITEMLISTVIEW_H
 
 #include "dolphin_export.h"
+#include "kitemviews/kitemliststyleoption.h"
+#include "kitemviews/kitemlistwidget.h"
+#include "kitemviews/kitemmodelbase.h"
+#include "kitemviews/kstandarditemlistgroupheader.h"
+#include "kitemviews/private/kitemlistviewanimation.h"
 
-#include <kitemviews/kstandarditemlistgroupheader.h>
-#include <kitemviews/kitemliststyleoption.h>
-#include <kitemviews/kitemlistwidget.h>
-#include <kitemviews/kitemmodelbase.h>
-#include <kitemviews/private/kitemlistviewanimation.h>
 #include <QGraphicsWidget>
 #include <QSet>
 
@@ -67,7 +66,7 @@ class DOLPHIN_EXPORT KItemListView : public QGraphicsWidget
     Q_PROPERTY(qreal itemOffset READ itemOffset WRITE setItemOffset)
 
 public:
-    KItemListView(QGraphicsWidget* parent = nullptr);
+    explicit KItemListView(QGraphicsWidget* parent = nullptr);
     ~KItemListView() override;
 
     /**
@@ -158,11 +157,6 @@ public:
      */
     QSizeF itemSize() const;
 
-    /**
-     * @return The size hint of all items. It is provided by the KItemListSizeHintResolver.
-     */
-    QSizeF itemSizeHint() const;
-
     const KItemListStyleOption& styleOption() const;
 
     void setGeometry(const QRectF& rect) override;
@@ -210,7 +204,7 @@ public:
 
     /**
      * If set to true, items having child-items can be expanded to show the child-items as
-     * part of the view. Per default the expanding of items is is disabled. If expanding of
+     * part of the view. Per default the expanding of items is disabled. If expanding of
      * items is enabled, the methods KItemModelBase::setExpanded(), KItemModelBase::isExpanded(),
      * KItemModelBase::isExpandable() and KItemModelBase::expandedParentsCount()
      * must be reimplemented. The view-implementation
@@ -229,7 +223,7 @@ public:
     /**
      * @return The context rectangle of the item relative to the top/left of
      *         the currently visible area (see KItemListView::offset()). The
-     *         context rectangle is defined by by the united rectangle of
+     *         context rectangle is defined by the united rectangle of
      *         the icon rectangle and the text rectangle (see KItemListWidget::iconRect()
      *         and KItemListWidget::textRect()) and is useful as reference for e.g. aligning
      *         a tooltip or a context-menu for an item. Note that a context rectangle will