Pimcommon

broadcaststatus.h
1/*
2 broadcaststatus.h
3
4 This file is part of libkdepim.
5
6 SPDX-FileCopyrightText: 2000 Don Sanders <sanders@kde.org>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
13#include "pimcommon_export.h"
14#include <QObject>
15#include <memory>
16#undef None
17
18namespace PimCommon
19{
20/**
21 Provides a singleton which broadcasts status messages by emitting
22 signals. Interested mainwindows can connect to the statusMsg()
23 signal and update statusBars or whatever they use for showing status.
24*/
25class BroadcastStatusPrivate;
26class PIMCOMMON_EXPORT BroadcastStatus : public QObject
27{
28 Q_OBJECT
29
30public:
31 ~BroadcastStatus() override;
32
33 /** Return the instance of the singleton object for this class */
34 static BroadcastStatus *instance();
35
36public Q_SLOTS:
37 /**
38 Emit an update status bar signal. It's a slot so it can be hooked up
39 to other signals.
40 */
41 void setStatusMsg(const QString &message);
42
43 /**
44 Set a status message that will go away again with the next call of
45 reset().
46 */
47 void setTransientStatusMsg(const QString &msg);
48
49 /**
50 Reset the status message to what ever non-transient message was last
51 active or has since been set.
52 */
53 void reset();
54
55Q_SIGNALS:
56 /** Emitted when setStatusMsg is called. */
57 void statusMsg(const QString &);
58
59protected:
60 BroadcastStatus();
61 std::unique_ptr<BroadcastStatusPrivate> const d;
62};
63}
KGuiItem reset()
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:58:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.