add more spacing
[personal-kdebase.git] / workspace / systemsettings / main.cpp
blobefe25ed7a99b166b1129318261ebba466c0f95e5
1 /**
2 * This file is part of the System Settings package
3 * Copyright (C) 2005 Benjamin C Meyer
4 * <ben+systempreferences at meyerhome dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #include <KAboutData>
23 #include <KCmdLineArgs>
24 #include <KLocale>
25 #include <KUniqueApplication>
27 #include "mainwindow.h"
28 #include "version.h"
30 #include <iostream>
32 int main( int argc, char *argv[] )
34 KLocale::setMainCatalog("systemsettings");
35 // About data
36 KAboutData aboutData("systemsettings", 0, ki18n("System Settings"),
37 SYSTEM_SETTINGS_VERSION, ki18n("System Settings"),
38 KAboutData::License_LGPL, ki18n("(c) 2005, Benjamin C. Meyer; (c) 2007, Canonical Ltd"));
39 aboutData.addAuthor(ki18n("Benjamin C. Meyer"), ki18n("Author"),
40 "ben+systempreferences@meyerhome.net");
41 aboutData.addAuthor(ki18n("Jonathan Riddell"), ki18n("Contributor"),
42 "jriddell@ubuntu.com");
43 aboutData.addAuthor(ki18n("Michael D. Stemle"), ki18n("Contributor"),
44 "manchicken@notsosoft.net");
45 aboutData.addAuthor(ki18n("Simon Edwards"), ki18n("Contributor"),
46 "simon@simonzone.com");
47 aboutData.addAuthor(ki18n("Ellen Reitmayr"), ki18n("Usability"),
48 "ellen@kde.org");
49 aboutData.setProgramIconName("preferences-system");
50 KCmdLineArgs::init(argc, argv, &aboutData);
52 if (!KUniqueApplication::start()) {
53 std::cerr << "This program is already running." << std::endl;
54 return 0;
56 KUniqueApplication application;
58 // Some kcm's require native windows, the screensaver one for example.
59 // It's better to enable native windows here than to have the main window
60 // flicker later on when RandomWidget::winId() is called.
61 QApplication::setAttribute(Qt::AA_NativeWindows);
63 MainWindow *mainWindow = new MainWindow();
65 mainWindow->show();
67 return application.exec();