Added help menu, about box, and window icon to Qt4 front-end.

ver1_6_1
Chris Laurel 2008-02-05 03:34:11 +00:00
parent fefb975bcc
commit 6956c915fe
4 changed files with 36 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,5 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/icons">
<file alias="celestia.png">data/celestia.png</file>
<file alias="time-currenttime.png">data/time-currenttime.png</file>
<file alias="time-double.png">data/time-double.png</file>
<file alias="time-faster.png">data/time-faster.png</file>

View File

@ -160,6 +160,8 @@ void CelestiaAppWindow::init(const QString& qConfigFileName,
alerter = new AppAlerter(this);
appCore->setAlerter(alerter);
setWindowIcon(QIcon(":/icons/celestia.png"));
appCore->initSimulation(&configFileName,
&extrasDirectories,
progress);
@ -550,6 +552,28 @@ void CelestiaAppWindow::slotToggleFullScreen()
}
static const char* aboutText =
"<html>"
"<p><b>Celestia 1.5.0 (Qt4 experimental version)</b></p>"
"<p>Copyright (C) 2001-2008 by the Celestia Development Team. Celestia "
"is free software. You can redistribute it and/or modify it under the "
"terms of the GNU General Public License version 2.</p>"
"<b>Celestia on the web</b>"
"<br>"
"Main site: <a href=\"http://www.shatters.net/celestia/\">"
"http://www.shatters.net/celestia/</a><br>"
"Forum: <a href=\"http://www.shatters.net/forum/\">"
"http://www.shatters.net/forum/</a><br>"
"SourceForge project: <a href=\"http://www.sourceforge.net/projects/celestia\">"
"http://www.sourceforge.net/projects/celestia</a><br>"
"</html>";
void CelestiaAppWindow::slotShowAbout()
{
QMessageBox::about(this, "Celestia", aboutText);
}
void CelestiaAppWindow::createActions()
{
}
@ -709,6 +733,13 @@ void CelestiaAppWindow::createMenus()
syncTimeAction->setChecked(check);
appCore->getSimulation()->setSyncTime(check);
/****** Help Menu ******/
helpMenu = menuBar()->addMenu(tr("&Help"));
QAction* aboutAct = new QAction(tr("About Celestia"), this);
connect(aboutAct, SIGNAL(triggered()), this, SLOT(slotShowAbout()));
helpMenu->addAction(aboutAct);
settings.endGroup();
}

View File

@ -1,4 +1,4 @@
// qtappwin.cpp
// qtappwin.h
//
// Copyright (C) 2007-2008, Celestia Development Team
// celestia-developers@lists.sourceforge.net
@ -74,10 +74,11 @@ class CelestiaAppWindow : public QMainWindow
void slotOpenScript();
void slotShowTimeDialog();
void slotSetTime(double tdb);
void slotToggleFullScreen();
void slotShowAbout();
signals:
void progressUpdate(const QString& s, int align, const QColor& c);
@ -102,6 +103,7 @@ class CelestiaAppWindow : public QMainWindow
QMenu* navMenu;
QMenu* timeMenu;
QMenu* viewMenu;
QMenu* helpMenu;
InfoPanel* infoPanel;
EventFinder* eventFinder;