[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Jul 17 00:35:14 CEST 2010
SVN commit 1150829 by tgridel:
FileViewWidget: display the treeModel
M +3 -0 FileViewWidget.ui
M +1 -0 MarbleControlBox.cpp
M +6 -0 MarbleModel.cpp
M +1 -0 MarbleModel.h
--- trunk/KDE/kdeedu/marble/src/lib/FileViewWidget.ui #1150828:1150829
@@ -60,6 +60,9 @@
</item>
</layout>
</item>
+ <item>
+ <widget class="QTreeView" name="m_treeView"/>
+ </item>
</layout>
</widget>
<resources/>
--- trunk/KDE/kdeedu/marble/src/lib/MarbleControlBox.cpp #1150828:1150829
@@ -294,6 +294,7 @@
widget->fileViewModel(), SLOT( saveFile() ) );
connect( d->m_fileViewUi.m_closeButton, SIGNAL( clicked() ) ,
widget->fileViewModel(), SLOT( closeFile() ) );
+ d->m_fileViewUi.m_treeView->setModel(widget->model()->treeModel());
// Initialize the MarbleLegendBrowser
d->m_legendUi.marbleLegendBrowser->setMarbleWidget( d->m_widget );
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1150828:1150829
@@ -60,6 +60,7 @@
#include "MarblePlacemarkModel.h"
#include "MergedLayerDecorator.h"
#include "FileManager.h"
+#include "GeoDataTreeModel.h"
#include "PlacemarkManager.h"
#include "PlacemarkLayout.h"
#include "PlacemarkPainter.h"
@@ -663,6 +664,11 @@
}
+QAbstractItemModel *MarbleModel::treeModel() const
+{
+ return d->m_dataFacade->treeModel();
+}
+
QAbstractItemModel *MarbleModel::placemarkModel() const
{
return d->m_dataFacade->placemarkModel();
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.h #1150828:1150829
@@ -140,6 +140,7 @@
* @brief Return the list of Placemarks as a QAbstractItemModel *
* @return a list of all Placemarks in the MarbleModel.
*/
+ QAbstractItemModel* treeModel() const;
QAbstractItemModel* placemarkModel() const;
QItemSelectionModel* placemarkSelectionModel() const;
More information about the Marble-commits
mailing list