Messagelib

statusbarlabeltoggledstate.h
1 /*
2  SPDX-FileCopyrightText: 2014-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagecomposer_export.h"
10 #include <QLabel>
11 namespace MessageComposer
12 {
13 /**
14  * @brief The StatusBarLabelToggledState class
15  * @author Laurent Montel <[email protected]>
16  */
17 class MESSAGECOMPOSER_EXPORT StatusBarLabelToggledState : public QLabel
18 {
19  Q_OBJECT
20 public:
21  explicit StatusBarLabelToggledState(QWidget *parent = nullptr);
22  ~StatusBarLabelToggledState() override;
23 
24  void setToggleMode(bool state);
25 
26  Q_REQUIRED_RESULT bool toggleMode() const;
27 
28  void setStateString(const QString &toggled, const QString &untoggled);
29 Q_SIGNALS:
30  void toggleModeChanged(bool state);
31 
32 protected:
33  void mousePressEvent(QMouseEvent *ev) override;
34 
35 private:
36  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-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.