X-Git-Url: http://git.maemo.org/git/?p=jenirok;a=blobdiff_plain;f=src%2Fgui%2Fmain.cpp;h=56ea49c6ef2c2556bf1cd012a5016e56ab558f9b;hp=8a3ebf2a3bdad886f503bf57d411b23ce1941be7;hb=40f8e10e1efc5019011df940328cdc734576143d;hpb=cf883c1283eb6b096592ef875a32696fee9dd6ff diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 8a3ebf2..56ea49c 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -1,52 +1,50 @@ -/* - * This file is part of Jenirok. - * - * Jenirok is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Jenirok is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Jenirok. If not, see . - * - */ - -#include -#include -#include -#include -#include "mainwindow.h" -#include "searchdialog.h" -#include "resultwindow.h" -#include "detailwindow.h" -#include "eniro.h" - -#include "contactmanager.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QTranslator translator; - translator.load(":/translations/" + QLocale::system().name()); - app.installTranslator(&translator); - - MainWindow window; - ResultWindow results(&window); - DetailWindow details(&results); - - window.show(); - - QObject::connect(&window, SIGNAL(search(SearchDialog::SearchDetails&)), - &results, SLOT(search(SearchDialog::SearchDetails&))); - - QObject::connect(&results, SIGNAL(itemSelected(Eniro::Result const&)), - &details, SLOT(loadData(Eniro::Result const&))); - - return app.exec(); -} +/* + * This file is part of Jenirok. + * + * Jenirok is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Jenirok is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jenirok. If not, see . + * + */ + +#include +#include +#include "mainwindow.h" +#include "searchdialog.h" +#include "resultwindow.h" +#include "detailwindow.h" +#include "source.h" +#include "settings.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + Settings::instance()->loadLanguage(app); + + MainWindow window; + ResultWindow results(&window); + DetailWindow details(&results); + + window.show(); + + QObject::connect(&window, SIGNAL(search(SearchDialog::SearchDetails&)), + &results, SLOT(search(SearchDialog::SearchDetails&))); + + QObject::connect(&results, SIGNAL(itemSelected(Source::Result const&)), + &details, SLOT(loadData(Source::Result const&))); + + QObject::connect(&window, SIGNAL(logItemSelected(Source::Result const&)), + &details, SLOT(loadData(Source::Result const&))); + + return app.exec(); +}