]> git.sesse.net Git - kdenlive/blob - src/main.cpp
first po file
[kdenlive] / src / main.cpp
1 #include <KApplication>
2 #include <KAboutData>
3 #include <KCmdLineArgs>
4 #include <KUrl> //new
5
6 #include "mainwindow.h"
7
8 int main(int argc, char *argv[]) {
9     KAboutData aboutData("kdenlive", "kdenlive",
10                          ki18n("Kdenlive"), "1.0",
11                          ki18n("A simple text area which can load and save."),
12                          KAboutData::License_GPL,
13                          ki18n("Copyright (c) 2007 Developer"));
14     aboutData.addAuthor(ki18n("Marco Gittler"), ki18n("MltConnection, Transition, Effect, Timeline Developer"), "g.marco@freenet.de");
15     KCmdLineArgs::init(argc, argv, &aboutData);
16
17     KCmdLineOptions options; //new
18     options.add("+[file]", ki18n("Document to open")); //new
19     KCmdLineArgs::addCmdLineOptions(options); //new
20
21     KApplication app;
22
23     MainWindow* window = new MainWindow();
24     window->show();
25
26     KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); //new
27     if (args->count()) { //new
28         window->openFile(args->url(0)); //new
29     }
30
31     return app.exec();
32 }