[Marble-commits] KDE/kdeedu/marble/src
Dennis Nienhüser
earthwings at gentoo.org
Mon Jan 17 21:38:30 CET 2011
SVN commit 1215155 by nienhueser:
Add a bookmark manager to the Marble Qt application. So far it has view capabilities and limited, in-memory only edit capabilities.
M +15 -1 QtMainWindow.cpp
M +2 -0 QtMainWindow.h
A lib/BookmarkManagerDialog.cpp [License: LGPL]
A lib/BookmarkManagerDialog.h [License: LGPL]
A lib/BookmarkManagerDialog.ui
M +2 -0 lib/CMakeLists.txt
M +1 -0 marble.qrc
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1215154:1215155
@@ -41,6 +41,7 @@
#include <QtNetwork/QNetworkProxy>
#include "BookmarkInfoDialog.h"
+#include "BookmarkManagerDialog.h"
#include "CurrentLocationWidget.h"
//#include "EditBookmarkDialog.h"
#include "MapViewWidget.h"
@@ -277,6 +278,10 @@
m_removeAllBookmarksAct = new QAction( QIcon(":/icons/bookmark-remove.png"), tr("&Remove all Bookmarks"),this);
m_removeAllBookmarksAct->setStatusTip(tr("Remove all Bookmarks"));
connect( m_removeAllBookmarksAct, SIGNAL( triggered() ), this, SLOT( removeAllBookmarks() ) );
+
+ m_manageBookmarksAct = new QAction( QIcon( ":/icons/bookmarks-organize.png" ), tr( "&Manage Bookmarks" ), this);
+ m_manageBookmarksAct->setStatusTip( tr( "Manage Bookmarks" ) );
+ connect( m_manageBookmarksAct, SIGNAL( triggered() ), this, SLOT( manageBookmarks() ) );
m_addBookmarkFolderAct = new QAction( QIcon(":/icons/bookmark-add-folder.png"), tr("&New Bookmark Folder"),this);
m_addBookmarkFolderAct->setStatusTip(tr("New Bookmark Folder"));
connect( m_addBookmarkFolderAct, SIGNAL( triggered() ), this, SLOT( openNewBookmarkFolderDialog() ) );
@@ -476,8 +481,9 @@
{
m_bookmarkMenu->clear();
m_bookmarkMenu->addAction( m_addBookmarkAct );
+ m_bookmarkMenu->addAction( m_addBookmarkFolderAct );
m_bookmarkMenu->addAction( m_removeAllBookmarksAct );
- m_bookmarkMenu->addAction( m_addBookmarkFolderAct );
+ m_bookmarkMenu->addAction( m_manageBookmarksAct );
m_bookmarkMenu->addSeparator();
@@ -535,6 +541,14 @@
}
}
+void MainWindow::manageBookmarks()
+{
+ MarbleModel * const model = m_controlView->marbleWidget()->model();
+ QPointer<BookmarkManagerDialog> dialog = new BookmarkManagerDialog( model, this );
+ dialog->exec();
+ delete dialog;
+}
+
void MainWindow::openNewBookmarkFolderDialog()
{
QPointer<NewFolderInfoDialog> dialog = new NewFolderInfoDialog( m_controlView->marbleWidget());
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.h #1215154:1215155
@@ -113,6 +113,7 @@
void createBookmarksListMenu(QMenu *m_bookmarksListMenu, const GeoDataFolder &folder);
void lookAtBookmark( QAction * action );
void removeAllBookmarks();
+ void manageBookmarks();
void openNewBookmarkFolderDialog();
void createBookmarkMenu();
void createFolderList();
@@ -197,6 +198,7 @@
//Bookmark Menu
QAction *m_addBookmarkAct;
QAction *m_removeAllBookmarksAct;
+ QAction *m_manageBookmarksAct;
QAction *m_addBookmarkFolderAct;
// Small screen devices
--- trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt #1215154:1215155
@@ -210,6 +210,7 @@
BookmarkManager.cpp
BookmarkInfoDialog.cpp
+ BookmarkManagerDialog.cpp
NewFolderInfoDialog.cpp
PrintOptionsWidget.cpp
@@ -242,6 +243,7 @@
routing/RoutingWidget.ui
DataMigrationWidget.ui
BookmarkInfoDialog.ui
+ BookmarkManagerDialog.ui
NameDialog.ui
PrintOptions.ui
ExternalEditor.ui
--- trunk/KDE/kdeedu/marble/src/marble.qrc #1215154:1215155
@@ -7,6 +7,7 @@
<file>icons/arrow-right.png</file>
<file>icons/arrow-up.png</file>
<file>icons/bookmarks.png</file>
+ <file>icons/bookmarks-organize.png</file>
<file>icons/bookmark-add-folder.png</file>
<file>icons/bookmark-edit.png</file>
<file>icons/bookmark-new.png</file>
More information about the Marble-commits
mailing list