1/*
2 * This file is part of the KDE project
3 * Copyright (C) 2009 Shaun Reich <shaun.reich@kdemail.net>
4 * Copyright (C) 2006-2008 Rafael Fernández López <ereslibre@kde.org>
5 * Copyright (C) 2001 George Staikos <staikos@kde.org>
6 * Copyright (C) 2000 Matej Koss <koss@miesto.sk>
7 * David Faure <faure@kde.org>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License version 2 as published by the Free Software Foundation.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24#include "uiserver.h"
25#include "uiserver_p.h"
26
27#include "progresslistmodel.h"
28
29#include <kuniqueapplication.h>
30#include <kaboutdata.h>
31#include <kcmdlineargs.h>
32#include <klocale.h>
33#include <kdebug.h>
34
35
36extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
37{
38 // GS 5/2001 - I changed the name to "KDE" to make it look better
39 // in the titles of dialogs which are displayed.
40 KAboutData aboutdata("kuiserver", "kdelibs4", ki18n("Job Manager"),
41 "0.8", ki18n("KDE Job Manager"),
42 KAboutData::License_GPL_V2, ki18n("(C) 2000-2009, KDE Team"));
43
44 aboutdata.addAuthor(ki18n("Shaun Reich"), ki18n("Maintainer"), "shaun.reich@kdemail.net");
45 aboutdata.addAuthor(ki18n("Rafael Fernández López"), ki18n("Former Maintainer"), "ereslibre@kde.org");
46 aboutdata.addAuthor(ki18n("David Faure"), ki18n("Former maintainer"), "faure@kde.org");
47 aboutdata.addAuthor(ki18n("Matej Koss"), ki18n("Developer"), "koss@miesto.sk");
48
49 KCmdLineArgs::init(argc, argv, &aboutdata);
50 KUniqueApplication::addCmdLineOptions();
51
52 if (!KUniqueApplication::start()) {
53 kDebug(7024) << "kuiserver is already running!";
54 return 0;
55 }
56
57 KUniqueApplication app;
58
59 // This app is started automatically, no need for session management
60 app.disableSessionManagement();
61 app.setQuitOnLastWindowClosed(false);
62
63 ProgressListModel model;
64
65 return app.exec();
66}
67