[Marble-commits] KDE/kdeedu/marble/src
Dennis Nienhüser
earthwings at gentoo.org
Wed Oct 6 21:06:17 CEST 2010
SVN commit 1183268 by nienhueser:
Add an Ok button to the map view dialog to close it. Use a sane initial size. Remove now uneeded hiding of labels in map view widget for small screen devices.
M +12 -0 QtMainWindow.cpp
M +0 -7 lib/MapViewWidget.cpp
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1183267:1183268
@@ -33,6 +33,8 @@
#include <QtGui/QMessageBox>
#include <QtGui/QPrintDialog>
#include <QtGui/QPrinter>
+#include <QtGui/QDialogButtonBox>
+#include <QtGui/QVBoxLayout>
#include <QtGui/QClipboard>
@@ -1115,8 +1117,18 @@
{
if( !m_mapViewDialog ) {
m_mapViewDialog = new QDialog( this );
+ m_mapViewDialog->setWindowTitle( tr( "Map View - Marble" ) );
MapViewWidget *mapViewWidget = new MapViewWidget( m_mapViewDialog );
mapViewWidget->setMarbleWidget( m_controlView->marbleWidget() );
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok, Qt::Horizontal, m_mapViewDialog );
+ connect(buttonBox, SIGNAL( accepted() ), m_mapViewDialog, SLOT( accept() ) );
+
+ QVBoxLayout* layout = new QVBoxLayout( this );
+ layout->addWidget( mapViewWidget );
+ layout->addWidget( buttonBox );
+ m_mapViewDialog->setLayout( layout );
+ m_mapViewDialog->resize( 640, 420 );
}
m_mapViewDialog->show();
--- trunk/KDE/kdeedu/marble/src/lib/MapViewWidget.cpp #1183267:1183268
@@ -81,13 +81,6 @@
{
d->m_mapViewUi.setupUi( this );
- if ( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
- d->m_mapViewUi.projectionLabel_2->setVisible( false );
- d->m_mapViewUi.line->setVisible( false );
- d->m_mapViewUi.celestialBodyLabel->setVisible( false );
- d->m_mapViewUi.mapThemeLabel->setVisible( false );
- }
-
d->m_mapSortProxy = new MapThemeSortFilterProxyModel( this );
d->m_mapThemeModel = 0;
More information about the Marble-commits
mailing list