Messagelib

statusbarlabeltoggledstate.h
1/*
2 SPDX-FileCopyrightText: 2014-2025 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{
20public:
21 explicit StatusBarLabelToggledState(QWidget *parent = nullptr);
22 ~StatusBarLabelToggledState() override;
23
24 void setToggleMode(bool state);
25
26 [[nodiscard]] bool toggleMode() const;
27
28 void setStateString(const QString &toggled, const QString &untoggled);
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...
QLabel(QWidget *parent, Qt::WindowFlags f)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:39 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.