HelloStelModule.cpp   HelloStelModule.cpp 
skipping to change at line 20 skipping to change at line 20
* 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelPainter.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "HelloStelModule.hpp" #include "HelloStelModule.hpp"
#include "renderer/StelRenderer.hpp"
#include <QDebug> #include <QDebug>
/************************************************************************* /*************************************************************************
This method is the one called automatically by the StelModuleMgr just This method is the one called automatically by the StelModuleMgr just
after loading the dynamic library after loading the dynamic library
*************************************************************************/ *************************************************************************/
StelModule* HelloStelModuleStelPluginInterface::getStelModule() const StelModule* HelloStelModuleStelPluginInterface::getStelModule() const
{ {
return new HelloStelModule(); return new HelloStelModule();
skipping to change at line 49 skipping to change at line 49
{ {
StelPluginInfo info; StelPluginInfo info;
info.id = "HelloStelModule"; info.id = "HelloStelModule";
info.displayedName = "Hello World test plugin"; info.displayedName = "Hello World test plugin";
info.authors = "Stellarium team"; info.authors = "Stellarium team";
info.contact = "www.stellarium.org"; info.contact = "www.stellarium.org";
info.description = "An minimal plugin example."; info.description = "An minimal plugin example.";
return info; return info;
} }
Q_EXPORT_PLUGIN2(HelloStelModule, HelloStelModuleStelPluginInterface)
/************************************************************************* /*************************************************************************
Constructor Constructor
*************************************************************************/ *************************************************************************/
HelloStelModule::HelloStelModule() HelloStelModule::HelloStelModule()
{ {
setObjectName("HelloStelModule"); setObjectName("HelloStelModule");
font.setPixelSize(25); font.setPixelSize(25);
} }
/************************************************************************* /*************************************************************************
skipping to change at line 88 skipping to change at line 86
Init our module Init our module
*************************************************************************/ *************************************************************************/
void HelloStelModule::init() void HelloStelModule::init()
{ {
qDebug() << "init called for HelloStelModule"; qDebug() << "init called for HelloStelModule";
} }
/************************************************************************* /*************************************************************************
Draw our module. This should print "Hello world!" in the main window Draw our module. This should print "Hello world!" in the main window
*************************************************************************/ *************************************************************************/
void HelloStelModule::draw(StelCore* core, StelRenderer* renderer) void HelloStelModule::draw(StelCore* core)
{ {
renderer->setColor(1, 1, 1, 1); StelPainter painter(core->getProjection2d());
renderer->setFont(font); painter.setColor(1,1,1,1);
renderer->drawText(300, 300, "Hello World!") painter.setFont(font);
painter.drawText(300, 300, "Hello World!");
} }
 End of changes. 5 change blocks. 
7 lines changed or deleted 6 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/