[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/marble/src
From: Inge Wallin <inge () lysator ! liu ! se>
Date: 2008-11-13 22:31:18
Message-ID: 1226615478.601267.16264.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 883967 by ingwa:
Make the Sun Shadow control work.
There are still a couple of glitches that I will fix in the next
commit, once I have identified them all. At least it can be turned
off and on now and you can also choose between different modes.
M +4 -2 lib/SunControlWidget.cpp
M +5 -3 lib/SunControlWidget.h
M +1 -1 lib/SunControlWidget.ui
M +19 -11 marble_part.cpp
M +7 -5 marble_part.h
M +1 -1 marble_part.rc
M +1 -1 marbleui.rc
--- trunk/KDE/kdeedu/marble/src/lib/SunControlWidget.cpp #883966:883967
@@ -5,7 +5,8 @@
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
-// Copyright 2008 David Roberts <dvdr18@gmail.com>
+// Copyright 2008 David Roberts <dvdr18@gmail.com>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>
//
@@ -53,12 +54,13 @@
else
m_uiWidget.showToolButton->setText( tr("Sh&ow") );
- emit showSun(checked);
+ emit showSun( checked );
}
void SunControlWidget::nowClicked(bool checked)
{
Q_UNUSED( checked )
+
m_sunLocator->datetime()->setNow();
m_sunLocator->update();
updateDateTime();
--- trunk/KDE/kdeedu/marble/src/lib/SunControlWidget.h #883966:883967
@@ -5,7 +5,8 @@
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
-// Copyright 2008 David Roberts <dvdr18@gmail.com>
+// Copyright 2008 David Roberts <dvdr18@gmail.com>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>
//
@@ -53,8 +54,9 @@
protected:
Q_DISABLE_COPY( SunControlWidget )
- Ui::SunControlWidget m_uiWidget;
- SunLocator* m_sunLocator;
+
+ Ui::SunControlWidget m_uiWidget;
+ SunLocator *m_sunLocator;
};
}
--- trunk/KDE/kdeedu/marble/src/lib/SunControlWidget.ui #883966:883967
@@ -185,7 +185,7 @@
<item>
<widget class="QToolButton" name="showToolButton" >
<property name="enabled" >
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="toolTip" >
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #883966:883967
@@ -5,7 +5,8 @@
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
-// Copyright 2007 Tobias Koenig <tokoe@kde.org>"
+// Copyright 2007 Tobias Koenig <tokoe@kde.org>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>
//
@@ -83,8 +84,8 @@
m_distanceLabel( 0 )
{
// only set marble data path when a path was given
- if(arguments.count() != 0 && !arguments.first().isEmpty())
- MarbleDirs::setMarbleDataPath(arguments.first());
+ if ( arguments.count() != 0 && !arguments.first().isEmpty() )
+ MarbleDirs::setMarbleDataPath( arguments.first() );
setComponentData( MarblePartFactory::componentData() );
@@ -259,18 +260,25 @@
m_statusBarExtension->statusBar()->setVisible( isChecked );
}
-void MarblePart::showSun()
+void MarblePart::controlSun()
{
- if (!m_sunControlDialog)
+ if ( !m_sunControlDialog ) {
m_sunControlDialog = new SunControlWidget( NULL, m_controlView->sunLocator() );
+ connect( m_sunControlDialog, SIGNAL( showSun( bool ) ),
+ this, SLOT ( showSun( bool ) ) );
+ }
-
m_sunControlDialog->show();
m_sunControlDialog->raise();
m_sunControlDialog->activateWindow();
}
+void MarblePart::showSun( bool active )
+{
+ m_controlView->marbleWidget()->sunLocator()->setShow( active );
+}
+
void MarblePart::copyMap()
{
QPixmap mapPixmap = m_controlView->mapScreenShot();
@@ -508,11 +516,11 @@
this, SLOT( setShowClouds( bool ) ) );
// Action: Show Sunshade options
- m_showSunAct = new KAction( this );
- actionCollection()->addAction( "show_sun", m_showSunAct );
- m_showSunAct->setText( i18n( "S&un Control" ) );
- connect( m_showSunAct, SIGNAL( triggered( bool ) ),
- this, SLOT( showSun() ) );
+ m_controlSunAction = new KAction( this );
+ actionCollection()->addAction( "control_sun", m_controlSunAction );
+ m_controlSunAction->setText( i18n( "S&un Control..." ) );
+ connect( m_controlSunAction, SIGNAL( triggered( bool ) ),
+ this, SLOT( controlSun() ) );
// Action: Lock float items
m_lockFloatItemsAct = new KAction ( this );
--- trunk/KDE/kdeedu/marble/src/marble_part.h #883966:883967
@@ -5,7 +5,8 @@
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
-// Copyright 2007 Tobias Koenig <tokoe@kde.org>"
+// Copyright 2007 Tobias Koenig <tokoe@kde.org>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>
//
#ifndef MARBLE_PART_H
@@ -62,7 +63,8 @@
void showSideBar( bool );
void showStatusBar( bool );
void lockFloatItemPosition( bool );
- void showSun();
+ void controlSun();
+ void showSun( bool );
void setupStatusBar();
void showNewStuffDialog();
@@ -82,8 +84,8 @@
private:
// All the functionality is provided by this widget.
- ControlView *m_controlView;
- SunControlWidget* m_sunControlDialog;
+ ControlView *m_controlView; // MarbleControlBox and MarbleWidget
+ SunControlWidget *m_sunControlDialog;
// Actions for the GUI.
KAction *m_exportMapAction;
@@ -97,7 +99,7 @@
KAction *m_fullScreenAct;
KAction *m_openAct;
KAction *m_newStuffAction;
- KAction *m_showSunAct;
+ KAction *m_controlSunAction;
KAction *m_lockFloatItemsAct;
QStandardItemModel* m_pluginModel;
--- trunk/KDE/kdeedu/marble/src/marble_part.rc #883966:883967
@@ -29,7 +29,7 @@
<Action name="show_clouds"/>
<Action name="show_atmosphere"/>
<Separator/>
- <Action name="show_sun"/>
+ <Action name="control_sun"/>
</Menu>
<Menu name="settings" noMerge="1"><text>&Settings</text>
<Merge name="StandardToolBarMenuHandler" />
--- trunk/KDE/kdeedu/marble/src/marbleui.rc #883966:883967
@@ -22,7 +22,7 @@
<Action name="show_clouds"/>
<Action name="show_atmosphere"/>
<Separator/>
- <Action name="show_sun"/>
+ <Action name="control_sun"/>
</Menu>
<Menu name="settings" noMerge="1"><text>&Settings</text>
<Action name="fullscreen"/>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic