TextUserInterface.cpp   TextUserInterface.cpp 
skipping to change at line 79 skipping to change at line 79
*************************************************************************/ *************************************************************************/
StelModule* TextUserInterfaceStelPluginInterface::getStelModule() const StelModule* TextUserInterfaceStelPluginInterface::getStelModule() const
{ {
return new TextUserInterface(); return new TextUserInterface();
} }
StelPluginInfo TextUserInterfaceStelPluginInterface::getPluginInfo() const StelPluginInfo TextUserInterfaceStelPluginInterface::getPluginInfo() const
{ {
StelPluginInfo info; StelPluginInfo info;
info.id = "TextUserInterface"; info.id = "TextUserInterface";
info.displayedName = "Text User Interface"; info.displayedName = q_("Text User Interface");
info.authors = "Matthew Gates"; info.authors = "Matthew Gates";
info.contact = "http://porpoisehead.net/"; info.contact = "http://porpoisehead.net/";
info.description = "Plugin implementation of 0.9.x series Text User Interface (TUI), used in planetarium systems"; info.description = q_("Plugin implementation of 0.9.x series Text Us er Interface (TUI), used in planetarium systems");
return info; return info;
} }
Q_EXPORT_PLUGIN2(TextUserInterface, TextUserInterfaceStelPluginInterface) Q_EXPORT_PLUGIN2(TextUserInterface, TextUserInterfaceStelPluginInterface)
/************************************************************************* /*************************************************************************
Constructor Constructor
*************************************************************************/ *************************************************************************/
TextUserInterface::TextUserInterface() TextUserInterface::TextUserInterface()
: dummyDialog(this), tuiActive(false), currentNode(NULL) : dummyDialog(this), tuiActive(false), currentNode(NULL)
skipping to change at line 404 skipping to change at line 404
Draw our module. Draw our module.
*************************************************************************/ *************************************************************************/
void TextUserInterface::draw(StelCore* core) void TextUserInterface::draw(StelCore* core)
{ {
if (tuiActive) if (tuiActive)
{ {
QString tuiText = "[no TUI node]"; QString tuiText = "[no TUI node]";
if (currentNode!=NULL) if (currentNode!=NULL)
tuiText = currentNode->getDisplayText(); tuiText = currentNode->getDisplayText();
StelPainter painter(core->getProjection2d()); StelPainter painter(core->getProjection(StelCore::FrameAltAz ));
painter.setFont(font); painter.setFont(font);
painter.setColor(0.3,1,0.3); painter.setColor(0.3,1,0.3);
painter.drawText(400, 200, tuiText); painter.drawText(StelMainGraphicsView::getInstance().size().
width()*0.6,
50, tuiText, 0, 0, 0, false);
} }
} }
void TextUserInterface::handleKeys(QKeyEvent* event) void TextUserInterface::handleKeys(QKeyEvent* event)
{ {
if (currentNode == NULL) if (currentNode == NULL)
{ {
qWarning() << "WARNING: no current node in TextUserInterface plugin"; qWarning() << "WARNING: no current node in TextUserInterface plugin";
event->setAccepted(false); event->setAccepted(false);
return; return;
} }
if (event->type()==QEvent::KeyPress && event->key()==Qt::Key_M) if (event->type()==QEvent::KeyPress && event->key()==Qt::Key_M)
{ {
tuiActive = ! tuiActive; tuiActive = ! tuiActive;
dummyDialog.setVisible(tuiActive); dummyDialog.close();
event->setAccepted(true); event->setAccepted(true);
return; return;
} }
if (!tuiActive) if (!tuiActive)
{ {
event->setAccepted(false); event->setAccepted(false);
return; return;
} }
 End of changes. 5 change blocks. 
5 lines changed or deleted 7 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/