Marble

FormattedTextWidget.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2014 Calin Cruceru <[email protected]>
4 // SPDX-FileCopyrightText: 2015 Constantin Mihalache <[email protected]>
5 //
6 
7 #ifndef FORMATTEDTEXTWIDGET_H
8 #define FORMATTEDTEXTWIDGET_H
9 
10 // Marble
11 #include "marble_export.h"
12 
13 //Qt
14 #include <QWidget>
15 
16 class QString;
17 
18 namespace Marble {
19 
20 class MARBLE_EXPORT FormattedTextWidget : public QWidget
21 {
22  Q_OBJECT
23 
24 public:
25  explicit FormattedTextWidget(QWidget *parent = nullptr);
26  ~FormattedTextWidget() override;
27 
28  void setText( const QString &text );
29  const QString text();
30  void setReadOnly( bool state );
31 
32 private Q_SLOTS:
33  void toggleDescriptionEditMode( bool isFormattedTextMode = false );
34  void setTextCursorBold( bool bold );
35  void setTextCursorItalic( bool italic );
36  void setTextCursorUnderlined( bool underlined );
37  void setTextCursorColor( const QColor &color );
38  void setTextCursorFont( const QFont &font );
39  void setTextCursorFontSize( const QString &fontSize );
40  void addImageToDescription();
41  void addLinkToDescription();
42  void updateDescriptionEditButtons();
43 
44 Q_SIGNALS:
45  void textUpdated();
46 
47 private:
48  class Private;
49  Private * const d;
50 };
51 }
52 
53 #endif // FORMATTEDTEXTWIDGET_H
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.