X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7f4c3976c0626657362b6324c0dad2867cc24e9b..b889a446bfe851a7f49821d469c5f3041b6e5774:/src/statusbar/spaceinfoobserver.h diff --git a/src/statusbar/spaceinfoobserver.h b/src/statusbar/spaceinfoobserver.h index e1311abde..f46c6cd6f 100644 --- a/src/statusbar/spaceinfoobserver.h +++ b/src/statusbar/spaceinfoobserver.h @@ -1,29 +1,14 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus * - * * - * 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: 2014 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SPACEINFOOBSERVER_H #define SPACEINFOOBSERVER_H #include -#include - class QUrl; class MountPointObserver; @@ -32,26 +17,30 @@ class SpaceInfoObserver : public QObject Q_OBJECT public: - explicit SpaceInfoObserver(const QUrl& url, QObject* parent = 0); - virtual ~SpaceInfoObserver(); + explicit SpaceInfoObserver(const QUrl &url, QObject *parent = nullptr); + ~SpaceInfoObserver() override; quint64 size() const; quint64 available() const; - void setUrl(const QUrl& url); + void setUrl(const QUrl &url); + +public Q_SLOTS: + void update(); -signals: +Q_SIGNALS: /** * This signal is emitted when the size or available space changes. */ void valuesChanged(); -private slots: +private Q_SLOTS: void spaceInfoChanged(quint64 size, quint64 available); private: - MountPointObserver* m_mountPointObserver; + MountPointObserver *m_mountPointObserver; + bool m_hasData; quint64 m_dataSize; quint64 m_dataAvailable; };