┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinitemlistcontainer.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-07-30 20:13:09 +0200
committerPeter Penz <[email protected]>2011-07-30 20:13:41 +0200
commitf23e9496f303995557b744c03178f5dbd9b35016 (patch)
tree1139c4340ac173718d1fa847e0124d6175781fd9 /src/views/dolphinitemlistcontainer.h
parent69e4007e5e330f2ca87c0176a186967b5ca156e8 (diff)
Merged very early alpha-version of Dolphin 2.0
Dolphin 2.0 will get a new view-engine with the following improvements: - Better performance - Animated transitions - No clipped filenames due to dynamic item-sizes - Grouping support for all view-modes - Non-rectangular selection areas - Simplified code for better maintenance More details will be provided in a blog-entry during the next days. Please note that the code is in a very early alpha-stage and although the most tricky parts have been implemented already very basic things like drag and drop or selections have not been pushed yet. Those things are rather trivial to implement but this still will take some time.
Diffstat (limited to 'src/views/dolphinitemlistcontainer.h')
-rw-r--r--src/views/dolphinitemlistcontainer.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/views/dolphinitemlistcontainer.h b/src/views/dolphinitemlistcontainer.h
new file mode 100644
index 000000000..599a4bd74
--- /dev/null
+++ b/src/views/dolphinitemlistcontainer.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+ * Copyright (C) 2011 by Peter Penz <[email protected]> *
+ * *
+ * 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 *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+#ifndef DOLPHINITEMLISTCONTAINER_H
+#define DOLPHINITEMLISTCONTAINER_H
+
+#include <kitemviews/kfileitemlistview.h>
+#include <kitemviews/kitemlistcontainer.h>
+
+#include <libdolphin_export.h>
+
+class KDirLister;
+class KFileItemListView;
+
+/**
+ * @brief Extends KItemListContainer by Dolphin specific properties.
+ *
+ * The view and model for KFileItems are created automatically when
+ * instantating KItemListContainer.
+ *
+ * The Dolphin settings of the icons-, compact- and details-view are
+ * converted internally to properties that can be used to configure e.g.
+ * the item-size and visible roles of the KItemListView.
+ */
+class LIBDOLPHINPRIVATE_EXPORT DolphinItemListContainer : public KItemListContainer
+{
+ Q_OBJECT
+
+public:
+ DolphinItemListContainer(KDirLister* dirLister,
+ QWidget* parent = 0);
+
+ virtual ~DolphinItemListContainer();
+
+ void setPreviewsShown(bool show);
+ bool previewsShown() const;
+
+ /**
+ * Sets the visible roles to \p roles. The integer-value defines
+ * the order of the visible role: Smaller values are ordered first.
+ */
+ void setVisibleRoles(const QHash<QByteArray, int>& roles);
+ QHash<QByteArray, int> visibleRoles() const;
+
+ void setZoomLevel(int level);
+ int zoomLevel() const;
+
+ void setItemLayout(KFileItemListView::Layout layout);
+ KFileItemListView::Layout itemLayout() const;
+
+ void beginTransaction();
+ void endTransaction();
+
+private:
+ void updateGridSize();
+
+private:
+ int m_zoomLevel;
+ KFileItemListView* m_fileItemListView;
+};
+
+#endif