~ubuntu-branches/ubuntu/maverick/bluedevil/maverick-proposed

« back to all changes in this revision

Viewing changes to src/actionplugins/input/helper/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-08-07 09:04:19 UTC
  • Revision ID: james.westby@ubuntu.com-20100807090419-68k54ucso2htcf5z
Tags: upstream-1.0~rc2
ImportĀ upstreamĀ versionĀ 1.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2010 Alejandro Fiestas Olivares <alex@ufocoders.com>    *
 
3
 *   Copyright (C) 2010 UFO Coders <info@ufocoders.com>                    *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 *                                                                         *
 
10
 *   This program is distributed in the hope that it will be useful,       *
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
13
 *   GNU General Public License for more details.                          *
 
14
 *                                                                         *
 
15
 *   You should have received a copy of the GNU General Public License     *
 
16
 *   along with this program; if not, write to the                         *
 
17
 *   Free Software Foundation, Inc.,                                       *
 
18
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
 
19
 ***************************************************************************/
 
20
 
 
21
#include "inputhelper.h"
 
22
#include <KCmdLineArgs>
 
23
#include <KApplication>
 
24
#include <KAboutData>
 
25
 
 
26
int main(int argc, char *argv[])
 
27
{
 
28
    KAboutData aboutData("bluedevil_inputhelper", "bluedevil", ki18n("BlueDevil"), "0.1", ki18n("Bluedevil Input Helper"),
 
29
    KAboutData::License_GPL, ki18n("(c) 2010, UFO coders"));
 
30
 
 
31
    aboutData.addAuthor(ki18n("Alex Fiestas"), ki18n("Developer"), "alex@ufocoders.org",
 
32
    "http://www.afiestas.org/");
 
33
    aboutData.setProgramIconName("preferences-system-bluetooth");
 
34
 
 
35
    KCmdLineArgs::init(argc, argv, &aboutData);
 
36
    KCmdLineOptions options;
 
37
    options.add("+[ADDRESS]", ki18n("Device to connect"));
 
38
    KCmdLineArgs::addCmdLineOptions( options );
 
39
 
 
40
    KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 
41
    KUrl url;
 
42
    if (args->count()) {
 
43
        url = args->arg(0);
 
44
    }
 
45
 
 
46
    KApplication app;
 
47
    app.setQuitOnLastWindowClosed(false);
 
48
 
 
49
    InputHelper *inputHelper = new InputHelper(url);
 
50
 
 
51
    return app.exec();
 
52
}