]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemliststyleoption.cpp
Refactoring: add shouldClearSearchIfInputTimeReached to KItemListKeyboardSearchManager
[dolphin.git] / src / kitemviews / kitemliststyleoption.cpp
index c512fa43ec09f0caf3ee05243bdfceb2a937fad3..bcfb86064b39182175d0234ed5d414efb87e4d49 100644 (file)
 
 #include "kitemliststyleoption.h"
 
-#include <KIconLoader>
 
 KItemListStyleOption::KItemListStyleOption() :
     rect(),
     font(),
     fontMetrics(QFont()),
     palette(),
-    padding(0),
-    horizontalMargin(0),
-    verticalMargin(0),
-    iconSize(KIconLoader::SizeMedium),
-    extendedSelectionRegion(false)
+    padding(-1),
+    horizontalMargin(-1),
+    verticalMargin(-1),
+    iconSize(-1),
+    extendedSelectionRegion(false),
+    maxTextLines(0),
+    maxTextWidth(0)
 {
 }
 
@@ -43,10 +44,32 @@ KItemListStyleOption::KItemListStyleOption(const KItemListStyleOption& other) :
     horizontalMargin(other.horizontalMargin),
     verticalMargin(other.verticalMargin),
     iconSize(other.iconSize),
-    extendedSelectionRegion(other.extendedSelectionRegion)
+    extendedSelectionRegion(other.extendedSelectionRegion),
+    maxTextLines(other.maxTextLines),
+    maxTextWidth(other.maxTextWidth)
 {
 }
 
 KItemListStyleOption::~KItemListStyleOption()
 {
 }
+
+bool KItemListStyleOption::operator==(const KItemListStyleOption& other) const
+{
+    return rect == other.rect
+            && font == other.font
+            && fontMetrics == other.fontMetrics
+            && palette == other.palette
+            && padding == other.padding
+            && horizontalMargin == other.horizontalMargin
+            && verticalMargin == other.verticalMargin
+            && iconSize == other.iconSize
+            && extendedSelectionRegion == other.extendedSelectionRegion
+            && maxTextLines == other.maxTextLines
+            && maxTextWidth == other.maxTextWidth;
+}
+
+bool KItemListStyleOption::operator!=(const KItemListStyleOption& other) const
+{
+    return !(*this == other);
+}