Marble

LegendWidget.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Bastian Holst <[email protected]>
4 //
5 
6 // Self
7 #include "LegendWidget.h"
8 
9 // Marble
10 #include "MarbleModel.h"
11 
12 using namespace Marble;
13 // Ui
14 #ifdef MARBLE_NO_WEBKITWIDGETS
15 #include "ui_NullLegendWidget.h"
16 #else
17 #include "ui_LegendWidget.h"
18 #endif
19 
20 namespace Marble
21 {
22 
23 class LegendWidgetPrivate : public Ui::LegendWidget
24 {
25  public:
26  LegendWidgetPrivate();
27 };
28 
29 LegendWidgetPrivate::LegendWidgetPrivate()
30 {
31 }
32 
33 LegendWidget::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 
43 LegendWidget::~LegendWidget()
44 {
45  delete d;
46 }
47 
48 void 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"
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
typedef WindowFlags
Binds a QML item to a specific geodetic location in screen coordinates.
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.