#ifndef KITEMLISTHEADER_H
#define KITEMLISTHEADER_H
-#include <libdolphin_export.h>
+#include "dolphin_export.h"
#include <QHash>
#include <QObject>
* Each column of the header represents a visible role
* accessible by KItemListView::visibleRoles().
*/
-class LIBDOLPHINPRIVATE_EXPORT KItemListHeader : public QObject
+class DOLPHIN_EXPORT KItemListHeader : public QObject
{
Q_OBJECT
public:
- virtual ~KItemListHeader();
+ ~KItemListHeader() override;
/**
* If set to true, KItemListView will automatically adjust the
*/
void setColumnWidths(const QHash<QByteArray, qreal>& columnWidths);
+ /**
+ * @return The column width that is required to show the role unclipped.
+ */
+ qreal preferredColumnWidth(const QByteArray& role) const;
+
signals:
/**
* Is emitted if the width of a column has been adjusted by the user with the mouse
qreal currentWidth,
qreal previousWidth);
+ /**
+ * Is emitted if the user has released the mouse button after adjusting the
+ * width of a visible role.
+ */
+ void columnWidthChangeFinished(const QByteArray& role,
+ qreal currentWidth);
+
private:
KItemListHeader(KItemListView* listView);