]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistheader.h
Build with QT_NO_KEYWORDS
[dolphin.git] / src / kitemviews / kitemlistheader.h
index b361b912bacbe5b474a2047383966e529ab06936..6875a0f5e75cd804a51a72c2d27bf9b8a35f696c 100644 (file)
@@ -1,26 +1,14 @@
-/***************************************************************************
- *   Copyright (C) 2012 by Peter Penz <peter.penz19@gmail.com>             *
- *                                                                         *
- *   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            *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2012 Peter Penz <peter.penz19@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #ifndef KITEMLISTHEADER_H
 #define KITEMLISTHEADER_H
 
-#include "libdolphin_export.h"
+#include "dolphin_export.h"
+
 #include <QHash>
 #include <QObject>
 
@@ -33,12 +21,12 @@ class KItemListView;
  * 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
@@ -70,7 +58,7 @@ public:
      */
     qreal preferredColumnWidth(const QByteArray& role) const;
 
-signals:
+Q_SIGNALS:
     /**
      * Is emitted if the width of a column has been adjusted by the user with the mouse
      * (no signal is emitted if KItemListHeader::setColumnWidth() is invoked).
@@ -79,8 +67,15 @@ signals:
                             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);
+    explicit KItemListHeader(KItemListView* listView);
 
 private:
     KItemListView* m_view;