X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9aee5d22513f0367febab54b38b3a7dc58d120bb..e9bd295b:/src/kitemviews/kitemlistheader.h diff --git a/src/kitemviews/kitemlistheader.h b/src/kitemviews/kitemlistheader.h index cc2b74793..e2653e41e 100644 --- a/src/kitemviews/kitemlistheader.h +++ b/src/kitemviews/kitemlistheader.h @@ -1,26 +1,14 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz * - * * - * 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 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTHEADER_H #define KITEMLISTHEADER_H #include "dolphin_export.h" + #include #include @@ -38,7 +26,7 @@ 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,16 @@ public: */ qreal preferredColumnWidth(const QByteArray& role) const; -signals: + /** + * Sets the width of the column *before* the first column. + * This is intended to facilitate an empty region for deselection in the main viewport. + */ + void setLeadingPadding(qreal width); + qreal leadingPadding() const; + +Q_SIGNALS: + void leadingPaddingChanged(qreal width); + /** * 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 +76,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;