Messagelib

statusbarlabeltoggledstate.h
1 /*
2  SPDX-FileCopyrightText: 2014-2021 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...
The StatusBarLabelToggledState class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.