Messagelib

statusbarlabeltoggledstate.h
1/*
2 SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messagecomposer_export.h"
10#include <QLabel>
11namespace MessageComposer
12{
13/**
14 * @brief The StatusBarLabelToggledState class
15 * @author Laurent Montel <montel@kde.org>
16 */
17class MESSAGECOMPOSER_EXPORT StatusBarLabelToggledState : public QLabel
18{
19 Q_OBJECT
20public:
21 explicit StatusBarLabelToggledState(QWidget *parent = nullptr);
23
24 void setToggleMode(bool state);
25
26 [[nodiscard]] bool toggleMode() const;
27
28 void setStateString(const QString &toggled, const QString &untoggled);
29Q_SIGNALS:
30 void toggleModeChanged(bool state);
31
32protected:
33 void mousePressEvent(QMouseEvent *ev) override;
34
35private:
36 MESSAGECOMPOSER_NO_EXPORT void updateLabel();
37 QString mToggled;
38 QString mUnToggled;
39 bool mToggleMode = false;
40};
41}
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.