Marble

FormattedTextWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Calin Cruceru <crucerucalincristian@gmail.com>
4// SPDX-FileCopyrightText: 2015 Constantin Mihalache <mihalache.c94@gmail.com>
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
16class QString;
17
18namespace Marble
19{
20
21class MARBLE_EXPORT FormattedTextWidget : public QWidget
22{
23 Q_OBJECT
24
25public:
26 explicit FormattedTextWidget(QWidget *parent = nullptr);
27 ~FormattedTextWidget() override;
28
29 void setText(const QString &text);
30 const QString text();
31 void setReadOnly(bool state);
32
33private Q_SLOTS:
34 void toggleDescriptionEditMode(bool isFormattedTextMode = false);
35 void setTextCursorBold(bool bold);
36 void setTextCursorItalic(bool italic);
37 void setTextCursorUnderlined(bool underlined);
38 void setTextCursorColor(const QColor &color);
39 void setTextCursorFont(const QFont &font);
40 void setTextCursorFontSize(const QString &fontSize);
41 void addImageToDescription();
42 void addLinkToDescription();
43 void updateDescriptionEditButtons();
44
45Q_SIGNALS:
46 void textUpdated();
47
48private:
49 class Private;
50 Private *const d;
51};
52}
53
54#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-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.