swift
settingstextmessagestyle.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_SETTINGSTEXTMESSAGESTYLE_H
7 #define SWIFT_GUI_COMPONENTS_SETTINGSTEXTMESSAGESTYLE_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 #include <QStringList>
12 
13 namespace Ui
14 {
15  class CSettingsTextMessageStyle;
16 }
17 namespace swift::gui::components
18 {
19  class CSettingsFontDialog;
20  class CTextEditDialog;
21 
23  class CSettingsTextMessageStyle : public QFrame
24  {
25  Q_OBJECT
26 
27  public:
29  explicit CSettingsTextMessageStyle(QWidget *parent = nullptr);
30 
32  virtual ~CSettingsTextMessageStyle() override;
33 
35  QStringList getFamilySizeStyle() const;
36 
38  const QString &getStyle() { return m_style; }
39 
41  void setStyle(const QString &style) { m_style = style; }
42 
45  void fontSizeMinus();
46  void fontSizePlus();
48 
50  void resetStyle() { m_style.clear(); }
51 
52  signals:
54  void changed();
55 
56  private:
57  QScopedPointer<Ui::CSettingsTextMessageStyle> ui;
58  CSettingsFontDialog *m_fontSettingsDialog = nullptr;
59  CTextEditDialog *m_textEditDialog = nullptr;
60  QString m_style;
61 
63  void changeFont();
64 
66  void changeStyle();
67 
69  bool setFontFamilySizeStyle(const QStringList &familySizeStlye);
70 
72  void replaceTableStyle(const QString &newTableStyle);
73 
75  bool changeFontSize(bool increase);
76  };
77 } // namespace swift::gui::components
78 
79 #endif // SWIFT_GUI_COMPONENTS_SETTINGSTEXTMESSAGESTYLE_H
CSettingsTextMessageStyle(QWidget *parent=nullptr)
Constructor.
QStringList getFamilySizeStyle() const
Fmily, size and style.
void changed()
Font or style changed from within the component.
High level reusable GUI components.
Definition: aboutdialog.cpp:13