OcularDialog.cpp   OcularDialog.cpp 
/* /*
* Copyright (C) 2009 Timothy Reaves * Copyright (C) 2009 Timothy Reaves
* Copyright (C) 2011 Bogdan Marinov
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "Oculars.hpp" #include "Oculars.hpp"
#include "OcularDialog.hpp" #include "OcularDialog.hpp"
#include "ui_ocularDialog.h" #include "ui_ocularDialog.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
skipping to change at line 40 skipping to change at line 41
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QAction> #include <QAction>
#include <QDataWidgetMapper> #include <QDataWidgetMapper>
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QModelIndex> #include <QModelIndex>
#include <QSettings> #include <QSettings>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <limits> #include <limits>
OcularDialog::OcularDialog(QList<CCD *>* ccds, QList<Ocular *>* oculars, QL OcularDialog::OcularDialog(Oculars* pluginPtr, QList<CCD *>* ccds, QList<Oc
ist<Telescope *>* telescopes) ular *>* oculars, QList<Telescope *>* telescopes) :
plugin(pluginPtr)
{ {
ui = new Ui_ocularDialogForm; ui = new Ui_ocularDialogForm;
this->ccds = ccds; this->ccds = ccds;
ccdTableModel = new PropertyBasedTableModel(this); ccdTableModel = new PropertyBasedTableModel(this);
CCD* ccdModel = CCD::ccdModel();
ccdTableModel->init(reinterpret_cast<QList<QObject *>* >(ccds), ccdTableModel->init(reinterpret_cast<QList<QObject *>* >(ccds),
CCD::ccdModel(), ccdModel,
CCD::ccdModel()->p ccdModel->property
ropertyMap()); Map());
this->oculars = oculars; this->oculars = oculars;
ocularTableModel = new PropertyBasedTableModel(this); ocularTableModel = new PropertyBasedTableModel(this);
Ocular* ocularModel = Ocular::ocularModel();
ocularTableModel->init(reinterpret_cast<QList<QObject *>* >(oculars) , ocularTableModel->init(reinterpret_cast<QList<QObject *>* >(oculars) ,
Ocular::oc ularModel(), Ocular::ocularModel()->propertyMap()); ocularMode l, ocularModel->propertyMap());
this->telescopes = telescopes; this->telescopes = telescopes;
telescopeTableModel = new PropertyBasedTableModel(this); telescopeTableModel = new PropertyBasedTableModel(this);
Telescope* telescopeModel = Telescope::telescopeModel();
telescopeTableModel->init(reinterpret_cast<QList<QObject *>* >(teles copes), telescopeTableModel->init(reinterpret_cast<QList<QObject *>* >(teles copes),
Te te
lescope::telescopeModel(), lescopeModel,
Te te
lescope::telescopeModel()->propertyMap()); lescopeModel->propertyMap());
validatorPositiveInt = new QIntValidator(0, std::numeric_limits<int> ::max(), this); validatorPositiveInt = new QIntValidator(0, std::numeric_limits<int> ::max(), this);
validatorPositiveDouble = new QDoubleValidator(.0, std::numeric_limi ts<double>::max(), 24, this); validatorPositiveDouble = new QDoubleValidator(.0, std::numeric_limi ts<double>::max(), 24, this);
validatorOcularAFOV = new QIntValidator(35, 120, this); validatorOcularAFOV = new QIntValidator(35, 120, this);
validatorOcularEFL = new QDoubleValidator(1.0, 60.0, 1, this); validatorOcularEFL = new QDoubleValidator(1.0, 60.0, 1, this);
validatorTelescopeDiameter = new QDoubleValidator(1.0, 1000.0, 1, th is); validatorTelescopeDiameter = new QDoubleValidator(1.0, 1000.0, 1, th is);
validatorTelescopeFL = new QDoubleValidator(1.0, 10000.0, 1, this); validatorTelescopeFL = new QDoubleValidator(1.0, 10000.0, 1, this);
QRegExp nameExp("^\\S.*"); QRegExp nameExp("^\\S.*");
validatorName = new QRegExpValidator(nameExp, this); validatorName = new QRegExpValidator(nameExp, this);
} }
skipping to change at line 80 skipping to change at line 85
delete ui; delete ui;
ui = NULL; ui = NULL;
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark StelModule Methods #pragma mark StelModule Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void OcularDialog::languageChanged() void OcularDialog::retranslate()
{ {
if (dialog) { if (dialog) {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
} }
} }
void OcularDialog::styleChanged() void OcularDialog::styleChanged()
{ {
// Nothing for now // Nothing for now
} }
void OcularDialog::updateStyle() void OcularDialog::updateStyle()
{ {
if(dialog) { if(dialog) {
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui()); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui());
Q_ASSERT(gui); Q_ASSERT(gui);
const StelStyle pluginStyle = GETSTELMODULE(Oculars)->getMod uleStyleSheet(gui->getStelStyle()); const StelStyle pluginStyle = plugin->getModuleStyleSheet(gu i->getStelStyle());
dialog->setStyleSheet(pluginStyle.qtStyleSheet); dialog->setStyleSheet(pluginStyle.qtStyleSheet);
ui->textBrowser->document()->setDefaultStyleSheet(QString(pl uginStyle.htmlStyleSheet)); ui->textBrowser->document()->setDefaultStyleSheet(QString(pl uginStyle.htmlStyleSheet));
} }
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Slot Methods #pragma mark Slot Methods
#endif #endif
skipping to change at line 119 skipping to change at line 124
void OcularDialog::closeWindow() void OcularDialog::closeWindow()
{ {
setVisible(false); setVisible(false);
StelMainGraphicsView::getInstance().scene()->setActiveWindow(0); StelMainGraphicsView::getInstance().scene()->setActiveWindow(0);
} }
void OcularDialog::deleteSelectedCCD() void OcularDialog::deleteSelectedCCD()
{ {
ccdTableModel->removeRows(ui->ccdListView->currentIndex().row(), 1); ccdTableModel->removeRows(ui->ccdListView->currentIndex().row(), 1);
ui->ccdListView->setCurrentIndex(ccdTableModel->index(0, 1)); ui->ccdListView->setCurrentIndex(ccdTableModel->index(0, 1));
plugin->updateLists();
} }
void OcularDialog::deleteSelectedOcular() void OcularDialog::deleteSelectedOcular()
{ {
if (ocularTableModel->rowCount() == 1) { if (ocularTableModel->rowCount() == 1) {
qDebug() << "Can not delete the last entry."; qDebug() << "Can not delete the last entry.";
} else { } else {
ocularTableModel->removeRows(ui->ocularListView->currentInde x().row(), 1); ocularTableModel->removeRows(ui->ocularListView->currentInde x().row(), 1);
ui->ocularListView->setCurrentIndex(ocularTableModel->index( 0, 1)); ui->ocularListView->setCurrentIndex(ocularTableModel->index( 0, 1));
plugin->updateLists();
} }
} }
void OcularDialog::deleteSelectedTelescope() void OcularDialog::deleteSelectedTelescope()
{ {
if (telescopeTableModel->rowCount() == 1) { if (telescopeTableModel->rowCount() == 1) {
qDebug() << "Can not delete the last entry."; qDebug() << "Can not delete the last entry.";
} else { } else {
telescopeTableModel->removeRows(ui->telescopeListView->curre ntIndex().row(), 1); telescopeTableModel->removeRows(ui->telescopeListView->curre ntIndex().row(), 1);
ui->telescopeListView->setCurrentIndex(telescopeTableModel-> index(0, 1)); ui->telescopeListView->setCurrentIndex(telescopeTableModel-> index(0, 1));
plugin->updateLists();
} }
} }
void OcularDialog::insertNewCCD() void OcularDialog::insertNewCCD()
{ {
ccdTableModel->insertRows(ccdTableModel->rowCount(), 1); ccdTableModel->insertRows(ccdTableModel->rowCount(), 1);
ui->ccdListView->setCurrentIndex(ccdTableModel->index(ccdTableModel- >rowCount() - 1, 1)); ui->ccdListView->setCurrentIndex(ccdTableModel->index(ccdTableModel- >rowCount() - 1, 1));
} }
void OcularDialog::insertNewOcular() void OcularDialog::insertNewOcular()
skipping to change at line 159 skipping to change at line 167
ocularTableModel->insertRows(ocularTableModel->rowCount(), 1); ocularTableModel->insertRows(ocularTableModel->rowCount(), 1);
ui->ocularListView->setCurrentIndex(ocularTableModel->index(ocularTa bleModel->rowCount() - 1, 1)); ui->ocularListView->setCurrentIndex(ocularTableModel->index(ocularTa bleModel->rowCount() - 1, 1));
} }
void OcularDialog::insertNewTelescope() void OcularDialog::insertNewTelescope()
{ {
telescopeTableModel->insertRows(ccdTableModel->rowCount(), 1); telescopeTableModel->insertRows(ccdTableModel->rowCount(), 1);
ui->telescopeListView->setCurrentIndex(telescopeTableModel->index(te lescopeTableModel->rowCount() - 1, 1)); ui->telescopeListView->setCurrentIndex(telescopeTableModel->index(te lescopeTableModel->rowCount() - 1, 1));
} }
void OcularDialog::moveUpSelectedSensor()
{
int index = ui->ccdListView->currentIndex().row();
if (index > 0)
{
ccdTableModel->moveRowUp(index);
plugin->updateLists();
}
}
void OcularDialog::moveUpSelectedOcular()
{
int index = ui->ocularListView->currentIndex().row();
if (index > 0)
{
ocularTableModel->moveRowUp(index);
plugin->updateLists();
}
}
void OcularDialog::moveUpSelectedTelescope()
{
int index = ui->telescopeListView->currentIndex().row();
if (index > 0)
{
telescopeTableModel->moveRowUp(index);
plugin->updateLists();
}
}
void OcularDialog::moveDownSelectedSensor()
{
int index = ui->ccdListView->currentIndex().row();
if (index >= 0 && index < ccdTableModel->rowCount() - 1)
{
ccdTableModel->moveRowDown(index);
plugin->updateLists();
}
}
void OcularDialog::moveDownSelectedOcular()
{
int index = ui->ocularListView->currentIndex().row();
if (index >= 0 && index < ocularTableModel->rowCount() - 1)
{
ocularTableModel->moveRowDown(index);
plugin->updateLists();
}
}
void OcularDialog::moveDownSelectedTelescope()
{
int index = ui->telescopeListView->currentIndex().row();
if (index >= 0 && index < telescopeTableModel->rowCount() - 1)
{
telescopeTableModel->moveRowDown(index);
plugin->updateLists();
}
}
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Private Slot Methods #pragma mark Private Slot Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void OcularDialog::keyBindingTogglePluginChanged(const QString& newString) void OcularDialog::keyBindingTogglePluginChanged(const QString& newString)
{ {
Oculars::appSettings()->setValue("bindings/toggle_oculars", newStrin g); Oculars::appSettings()->setValue("bindings/toggle_oculars", newStrin g);
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
QAction* action = gui->getGuiActions("toggle_oculars"); QAction* action = gui->getGuiActions("actionShow_Ocular");
if (action != NULL) { if (action != NULL) {
action->setShortcut(QKeySequence(newString.trimmed())); action->setShortcut(QKeySequence(newString.trimmed()));
} }
} }
void OcularDialog::keyBindingPopupNavigatorConfigChanged(const QString& new String) void OcularDialog::keyBindingPopupNavigatorConfigChanged(const QString& new String)
{ {
Oculars::appSettings()->setValue("bindings/popup_navigator", newStri ng); Oculars::appSettings()->setValue("bindings/popup_navigator", newStri ng);
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
skipping to change at line 204 skipping to change at line 272
emit(requireSelectionChanged(requireSelection)); emit(requireSelectionChanged(requireSelection));
} }
} }
void OcularDialog::scaleImageCircleStateChanged(int state) void OcularDialog::scaleImageCircleStateChanged(int state)
{ {
bool shouldScale = (state == Qt::Checked); bool shouldScale = (state == Qt::Checked);
bool useMaxImageCircle = Oculars::appSettings()->value("use_max_exit _circle",01.0).toBool(); bool useMaxImageCircle = Oculars::appSettings()->value("use_max_exit _circle",01.0).toBool();
if (shouldScale != useMaxImageCircle) { if (shouldScale != useMaxImageCircle) {
Oculars::appSettings()->setValue("use_max_exit_circle", shou ldScale); Oculars::appSettings()->setValue("use_max_exit_circle", shou ldScale);
Oculars::appSettings()->sync();\ Oculars::appSettings()->sync();
emit(scaleImageCircleChanged(shouldScale)); emit(scaleImageCircleChanged(shouldScale));
} }
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Protected Methods #pragma mark Protected Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
void OcularDialog::createDialogContent() void OcularDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
OT(languageChanged())); this, SLOT(retranslate()));
ui->ccdListView->setModel(ccdTableModel); ui->ccdListView->setModel(ccdTableModel);
ui->ocularListView->setModel(ocularTableModel); ui->ocularListView->setModel(ocularTableModel);
ui->telescopeListView->setModel(telescopeTableModel); ui->telescopeListView->setModel(telescopeTableModel);
//Now the rest of the actions. //Now the rest of the actions.
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->scaleImageCircleCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(scaleImageCircleStateChanged(int))); connect(ui->scaleImageCircleCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(scaleImageCircleStateChanged(int)));
connect(ui->requireSelectionCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(requireSelectionStateChanged(int))); connect(ui->requireSelectionCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(requireSelectionStateChanged(int)));
connect(ui->checkBoxControlPanel, SIGNAL(clicked(bool)),
plugin, SLOT(enableGuiPanel(bool)));
// The add & delete buttons // The add & delete buttons
connect(ui->addCCD, SIGNAL(clicked()), this, SLOT(insertNewCCD())); connect(ui->addCCD, SIGNAL(clicked()), this, SLOT(insertNewCCD()));
connect(ui->deleteCCD, SIGNAL(clicked()), this, SLOT(deleteSelectedC CD())); connect(ui->deleteCCD, SIGNAL(clicked()), this, SLOT(deleteSelectedC CD()));
connect(ui->addOcular, SIGNAL(clicked()), this, SLOT(insertNewOcular ())); connect(ui->addOcular, SIGNAL(clicked()), this, SLOT(insertNewOcular ()));
connect(ui->deleteOcular, SIGNAL(clicked()), this, SLOT(deleteSelect edOcular())); connect(ui->deleteOcular, SIGNAL(clicked()), this, SLOT(deleteSelect edOcular()));
connect(ui->addTelescope, SIGNAL(clicked()), this, SLOT(insertNewTel escope())); connect(ui->addTelescope, SIGNAL(clicked()), this, SLOT(insertNewTel escope()));
connect(ui->deleteTelescope, SIGNAL(clicked()), this, SLOT(deleteSel ectedTelescope())); connect(ui->deleteTelescope, SIGNAL(clicked()), this, SLOT(deleteSel ectedTelescope()));
// Validators // Validators
ui->ccdName->setValidator(validatorName); ui->ccdName->setValidator(validatorName);
skipping to change at line 257 skipping to change at line 329
ui->telescopeDiameter->setValidator(validatorTelescopeDiameter); ui->telescopeDiameter->setValidator(validatorTelescopeDiameter);
ui->ocularName->setValidator(validatorName); ui->ocularName->setValidator(validatorName);
ui->telescopeName->setValidator(validatorName); ui->telescopeName->setValidator(validatorName);
// The key bindings // The key bindings
QString bindingString = Oculars::appSettings()->value("bindings/togg le_oculars", "Ctrl+O").toString(); QString bindingString = Oculars::appSettings()->value("bindings/togg le_oculars", "Ctrl+O").toString();
ui->togglePluginLineEdit->setText(bindingString); ui->togglePluginLineEdit->setText(bindingString);
bindingString = Oculars::appSettings()->value("bindings/popup_naviga tor", "Alt+O").toString(); bindingString = Oculars::appSettings()->value("bindings/popup_naviga tor", "Alt+O").toString();
ui->togglePopupNavigatorWindowLineEdit->setText(bindingString); ui->togglePopupNavigatorWindowLineEdit->setText(bindingString);
connect(ui->togglePluginLineEdit, SIGNAL(textEdited(const QString&)) , connect(ui->togglePluginLineEdit, SIGNAL(textEdited(const QString&)) ,
this, SLOT(keyBindingTogglePluginChanged(const QStri ng&))); this, SLOT(keyBindingTogglePluginChanged(const QString&)));
connect(ui->togglePopupNavigatorWindowLineEdit, SIGNAL(textEdited(co nst QString&)), connect(ui->togglePopupNavigatorWindowLineEdit, SIGNAL(textEdited(co nst QString&)),
this, SLOT(keyBindingPopupNavigatorConfigChanged(con this, SLOT(keyBindingPopupNavigatorConfigChanged(const QStri
st QString&))); ng&)));
initAboutText();
connect(ui->togglePluginLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(initAboutText()));
connect(ui->togglePopupNavigatorWindowLineEdit, SIGNAL(textEdited(QS
tring)),
this, SLOT(initAboutText()));
connect(ui->pushButtonMoveOcularUp, SIGNAL(pressed()),
this, SLOT(moveUpSelectedOcular()));
connect(ui->pushButtonMoveOcularDown, SIGNAL(pressed()),
this, SLOT(moveDownSelectedOcular()));
connect(ui->pushButtonMoveSensorUp, SIGNAL(pressed()),
this, SLOT(moveUpSelectedSensor()));
connect(ui->pushButtonMoveSensorDown, SIGNAL(pressed()),
this, SLOT(moveDownSelectedSensor()));
connect(ui->pushButtonMoveTelescopeUp, SIGNAL(pressed()),
this, SLOT(moveUpSelectedTelescope()));
connect(ui->pushButtonMoveTelescopeDown, SIGNAL(pressed()),
this, SLOT(moveDownSelectedTelescope()));
// The CCD mapper // The CCD mapper
ccdMapper = new QDataWidgetMapper(); ccdMapper = new QDataWidgetMapper();
ccdMapper->setModel(ccdTableModel); ccdMapper->setModel(ccdTableModel);
ccdMapper->setSubmitPolicy(QDataWidgetMapper::AutoSubmit); ccdMapper->setSubmitPolicy(QDataWidgetMapper::AutoSubmit);
ccdMapper->addMapping(ui->ccdName, 0); ccdMapper->addMapping(ui->ccdName, 0);
ccdMapper->addMapping(ui->ccdChipY, 1); ccdMapper->addMapping(ui->ccdChipY, 1);
ccdMapper->addMapping(ui->ccdChipX, 2); ccdMapper->addMapping(ui->ccdChipX, 2);
ccdMapper->addMapping(ui->ccdPixelY, 3); ccdMapper->addMapping(ui->ccdPixelY, 3);
ccdMapper->addMapping(ui->ccdPixelX, 4); ccdMapper->addMapping(ui->ccdPixelX, 4);
skipping to change at line 312 skipping to change at line 403
telescopeMapper, SLOT(setCurrentModelIndex(QModelInd ex))); telescopeMapper, SLOT(setCurrentModelIndex(QModelInd ex)));
ui->telescopeListView->setCurrentIndex(telescopeTableModel->index(0, 1)); ui->telescopeListView->setCurrentIndex(telescopeTableModel->index(0, 1));
// set the initial state // set the initial state
if (Oculars::appSettings()->value("require_selection_to_zoom", 1.0). toBool()) { if (Oculars::appSettings()->value("require_selection_to_zoom", 1.0). toBool()) {
ui->requireSelectionCheckBox->setCheckState(Qt::Checked); ui->requireSelectionCheckBox->setCheckState(Qt::Checked);
} }
if (Oculars::appSettings()->value("use_max_exit_circle", 0.0).toBool ()) { if (Oculars::appSettings()->value("use_max_exit_circle", 0.0).toBool ()) {
ui->scaleImageCircleCheckBox->setCheckState(Qt::Checked); ui->scaleImageCircleCheckBox->setCheckState(Qt::Checked);
} }
if (Oculars::appSettings()->value("enable_control_panel", false).toB
ool())
{
ui->checkBoxControlPanel->setChecked(true);
}
//Initialize the style //Initialize the style
updateStyle(); updateStyle();
} }
void OcularDialog::initAboutText()
{
//BM: Most of the text for now is the original contents of the About
widget.
QString html = "<html><head><title></title></head><body>";
html += "<h1>Oculars plug-in</h1>";
//Authors
QString authors = "Authors: <a href=\"mailto:treaves@silverfieldstec
h.com\">Timothy Reaves</a>, Bogdan Marinov";
html += "<h3>" + authors + "</h3>";
//Overview
html += "<h2>Overview</h2>";
html += "<p>This plugin is intended to simulate what you would see t
hrough an eyepiece. This configuration dialog can be used to add, modify,
or delete eyepieces and telescopes, as well as CCD Sensors. Your first tim
e running the app will populate some samples to get your started.</p>";
html += "<p>You can choose to scale the image you see on the screen.
This is intended to show you a better comparison of what one eyepiece/tel
escope combination will be like as compared to another. The same eyepiece
in two different telescopes of differing focal length will produce two diff
erent exit circles, changing the view someone. The trade-off of this is th
at, with the image scaled, a good deal of the screen can be wasted. Theref
or I recommend that you leave it off, unless you feel you have a need of it
.</p>";
html += "<p>You can toggle a crosshair in the view. Ideally, I want
ed this to be aligned to North. I've been unable to do so. So currently i
t aligns to the top of the screen.</p>";
html += QString("<p>You can toggle a Telrad finder; this can only be
done when you have not turned on the Ocular view. This feature draws thre
e concentric circles of 0.5%1, 2.0%1, and 4.0%1, helping you see what you w
ould expect to see with the naked eye through the Telrad (or similar) finde
r.</p>").arg(QChar(0x00B0));
html += "<p>If you find any issues, please let me know. Enjoy!</p>"
;
//Keys
html += "<h2>Hot Keys</h2>";
html += "<p>The plug-in's key bindings can be edited in the General
Tab.</p>";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
));
Q_ASSERT(gui);
QAction* actionOcular = gui->getGuiActions("actionShow_Ocular");
Q_ASSERT(actionOcular);
QAction* actionMenu = gui->getGuiActions("actionShow_Ocular_Menu");
Q_ASSERT(actionMenu);
QKeySequence ocularShortcut = actionOcular->shortcut();
QString ocularString = ocularShortcut.toString(QKeySequence::NativeT
ext);
ocularString = Qt::escape(ocularString);
if (ocularString.isEmpty())
ocularString = "[no key defined]";
QKeySequence menuShortcut = actionMenu->shortcut();
QString menuString = menuShortcut.toString(QKeySequence::NativeText)
;
menuString = Qt::escape(menuString);
if (menuString.isEmpty())
menuString = "[no key defined]";
html += "<ul>";
html += "<li>";
html += QString("<strong>%1:</strong> Switches on/off the ocular ove
rlay.").arg(ocularString);
html += "</li>";
html += "<li>";
html += QString("<strong>%1:</strong> Opens the pop-up navigation me
nu.").arg(menuString);
html += "</li>";
html += "</ul>";
html += "</body></html>";
ui->textBrowser->setHtml(html);
}
 End of changes. 23 change blocks. 
20 lines changed or deleted 116 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/