[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-18 4:17:51
Message-ID: 1226981871.780646.29913.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 885899 by ingwa:
Fix the Qt version of the sun control the same way as the KDE version.
M +16 -6 QtMainWindow.cpp
M +3 -2 QtMainWindow.h
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #885898:885899
@@ -132,9 +132,9 @@
m_showAtmosphereAct->setStatusTip(tr("Show Atmosphere"));
connect(m_showAtmosphereAct, SIGNAL(triggered( bool )), this, SLOT( \
showAtmosphere( bool )));
- m_showSunAct = new QAction( tr("S&un Control"), this);
- m_showSunAct->setStatusTip(tr("Configure Sun Control"));
- connect(m_showSunAct, SIGNAL(triggered()), this, SLOT( showSun()));
+ m_controlSunAct = new QAction( tr("S&un Control..."), this);
+ m_controlSunAct->setStatusTip(tr("Configure Sun Control"));
+ connect(m_controlSunAct, SIGNAL(triggered()), this, SLOT( controlSun()));
m_whatsThisAct = new QAction( QIcon(":/icons/help-whatsthis.png"), tr("What's \
&This"), this); m_whatsThisAct->setShortcut(tr("Shift+F1"));
@@ -177,7 +177,7 @@
m_fileMenu->addAction(m_showCloudsAct);
m_fileMenu->addAction(m_showAtmosphereAct);
m_fileMenu->addSeparator();
- m_fileMenu->addAction(m_showSunAct);
+ m_fileMenu->addAction(m_controlSunAct);
m_helpMenu = menuBar()->addMenu(tr("&Help"));
m_helpMenu->addAction(m_whatsThisAct);
@@ -327,14 +327,24 @@
m_showAtmosphereAct->setChecked( isChecked ); // Sync state with the GUI
}
-void MainWindow::showSun()
+void MainWindow::controlSun()
{
- if (!m_sunControlDialog) m_sunControlDialog = new SunControlWidget( this, \
m_controlView->sunLocator() ); + if (!m_sunControlDialog) {
+ m_sunControlDialog = new SunControlWidget( this, m_controlView->sunLocator() \
); + connect( m_sunControlDialog, SIGNAL( showSun( bool ) ),
+ this, SLOT ( showSun( bool ) ) );
+ }
+
m_sunControlDialog->show();
m_sunControlDialog->raise();
m_sunControlDialog->activateWindow();
}
+void MainWindow::showSun( bool active )
+{
+ m_controlView->marbleWidget()->sunLocator()->setShow( active );
+}
+
void MainWindow::enterWhatsThis()
{
QWhatsThis::enterWhatsThisMode();
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.h #885898:885899
@@ -67,7 +67,8 @@
void showStatusBar( bool );
void showClouds( bool );
void showAtmosphere( bool );
- void showSun();
+ void controlSun();
+ void showSun( bool );
void enterWhatsThis();
void aboutMarble();
void openFile();
@@ -91,7 +92,7 @@
QAction *m_statusBarAct;
QAction *m_showCloudsAct;
QAction *m_showAtmosphereAct;
- QAction *m_showSunAct;
+ QAction *m_controlSunAct;
QAction *m_whatsThisAct;
QAction *m_aboutMarbleAct;
QAction *m_aboutQtAct;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic