Bug 318057 - Add a MapInfoDialog::popup() method that pans the map appropriately
Summary: Add a MapInfoDialog::popup() method that pans the map appropriately
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.6 (KDE 4.11)
Platform: Other Linux
: NOR task
Target Milestone: ---
Assignee: Andrei Duma
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-04-08 18:38 UTC by Dennis Nienhüser
Modified: 2013-04-10 07:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2013-04-08 18:38:30 UTC
Currently the MapInfoDialog is shown via a setVisible( true ) call. It pops up at the current geo position in screen coordinates, which is fine.
It should also be possible however to have the dialog open after it recenters the map such that its content becomes ideally visible. The geo position associated with the map dialog should move somewhere near the window center then (shifted a bit left/right/above/below depending on the alignment).

A possible implementation could go like that:
- add a method setMarbleWidget( MarbleWidget* widget ) to MapInfoDialog. Have it store the passed pointer in a new member variable
- Change MarbleWidget.cpp to call that method where it sets up m_mapInfoDialog
- add a method popup() to MapInfoDialog
- Inside, store a bool m_adjustMap=true and call setVisible( true )
- Adjust render() to check for m_adjustMap. If set, recenter (using MarbleWidget*) appropriately. Bonus points for shifting it a bit from the center based on the alignment
Comment 1 Dennis Nienhüser 2013-04-10 07:09:20 UTC
Git commit 964e92f93e579420a8d7bbbed43941657741d50d by Dennis Nienhüser, on behalf of Andrei Duma.
Committed on 10/04/2013 at 09:08.
Pushed by nienhueser into branch 'master'.

Add a popup() method to MapInfoDialog

REVIEW: 109921

M  +18   -1    src/lib/MapInfoDialog.cpp
M  +19   -0    src/lib/MapInfoDialog.h
M  +1    -0    src/lib/MarbleWidget.cpp
M  +1    -1    src/lib/MarbleWidgetPopupMenu.cpp

http://commits.kde.org/marble/964e92f93e579420a8d7bbbed43941657741d50d