~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/cpp/app_templates/kmake/app.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#include <kapplication.h>
 
3
#include <kaboutdata.h>
 
4
#include <kcmdlineargs.h>
 
5
#include <klocale.h>
 
6
#include "mainviewimp.h"
 
7
 
 
8
static const char description[] =    I18N_NOOP("A KDE Application");
 
9
 
 
10
static const char version[] = "%{VERSION}";
 
11
 
 
12
static KCmdLineOptions options[] =
 
13
    {
 
14
        { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
 
15
        KCmdLineLastOption
 
16
    };
 
17
 
 
18
 
 
19
int main(int argc, char **argv)
 
20
{
 
21
        KAboutData about("%{APPNAME}", I18N_NOOP("%{APPNAME}"), version, description,
 
22
                         KAboutData::License_%{LICENSE}, "(C) 2004 %{AUTHOR}", 0, 0, "%{EMAIL}");
 
23
        about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
 
24
        KCmdLineArgs::init(argc, argv, &about);
 
25
        KCmdLineArgs::addCmdLineOptions(options);
 
26
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
 
27
        KApplication app;
 
28
        MainViewImp *widget = new MainViewImp;
 
29
        app.setMainWidget(widget);
 
30
        widget->show();
 
31
        return app.exec();
 
32
}
 
33