genode/repos/libports/src/app/qt5/qt_launchpad/main.cpp

45 lines
813 B
C++
Raw Normal View History

2013-08-09 15:04:52 +02:00
/*
* \brief Qt Launchpad main program
* \author Christian Prochaska
* \date 2008-04-05
*/
/* local includes */
#include "qt_launchpad.h"
/* Qt includes */
#include <QtGui>
#include <QApplication>
/* Genode includes */
#include <base/env.h>
#include <rom_session/connection.h>
int main(int argc, char *argv[])
{
/* look for dynamic linker */
try {
static Genode::Rom_connection rom("ld.lib.so");
Genode::Process::dynamic_linker(rom.dataspace());
} catch (...) { }
int result;
static QApplication a(argc, argv);
2013-08-09 15:04:52 +02:00
static Qt_launchpad launchpad(Genode::env()->ram_session()->quota());
2013-08-09 15:04:52 +02:00
try {
launchpad.process_config();
} catch (...) { }
2013-08-09 15:04:52 +02:00
launchpad.move(300,100);
launchpad.show();
2013-08-09 15:04:52 +02:00
a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
2013-08-09 15:04:52 +02:00
result = a.exec();
2013-08-09 15:04:52 +02:00
return result;
}