Marble

LegendWidget.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
4//
5
6// Self
7#include "LegendWidget.h"
8
9// Marble
10#include "MarbleModel.h"
11
12using namespace Marble;
13// Ui
14#ifdef MARBLE_NO_WEBKITWIDGETS
15#include "ui_NullLegendWidget.h"
16#else
17#include "ui_LegendWidget.h"
18#endif
19
20namespace Marble
21{
22
23class LegendWidgetPrivate : public Ui::LegendWidget
24{
25 public:
26 LegendWidgetPrivate();
27};
28
29LegendWidgetPrivate::LegendWidgetPrivate()
30{
31}
32
33LegendWidget::LegendWidget( QWidget *parent, Qt::WindowFlags f )
34 : QWidget( parent, f ),
35 d( new LegendWidgetPrivate )
36{
37 d->setupUi( this );
38 layout()->setMargin( 0 );
39 connect( d->m_marbleLegendBrowser, SIGNAL(tourLinkClicked(QString)),
40 this, SIGNAL(tourLinkClicked(QString)) );
41}
42
43LegendWidget::~LegendWidget()
44{
45 delete d;
46}
47
48void LegendWidget::setMarbleModel( MarbleModel *model )
49{
50 // Initialize the MarbleLegendBrowser
51 d->m_marbleLegendBrowser->setMarbleModel( model );
52
53 // connect signals for the Legend
54 connect( d->m_marbleLegendBrowser, SIGNAL(toggledShowProperty(QString,bool)),
55 this, SIGNAL(propertyValueChanged(QString,bool)) );
56}
57
58}
59
60#include "moc_LegendWidget.cpp"
This file contains the headers for MarbleModel.
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition MarbleModel.h:87
Binds a QML item to a specific geodetic location in screen coordinates.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
T qobject_cast(QObject *object)
typedef WindowFlags
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void setupUi(QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.