• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • sources
  • kde-4.12
  • kdegraphics
  • okular
  • active
  • app
  • src
main.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * *
3  * Copyright 2011 Sebastian Kügler <sebas@kde.org> *
4  * Copyright 2012 Marco Martin <mart@kde.org> *
5  * *
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. *
10  * *
11  * This program 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 *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
20  ***************************************************************************/
21 
22 // KDE
23 #include <KApplication>
24 #include <KAboutData>
25 #include <KCmdLineArgs>
26 #include <KDebug>
27 #include <KDE/KLocale>
28 #include <KConfigGroup>
29 
30 #include "kdeclarativemainwindow.h"
31 #include "kdeclarativeview.h"
32 
33 static const char description[] = I18N_NOOP("Document viewer for Plasma Active using Okular");
34 
35 static const char version[] = "0.1";
36 
37 int main(int argc, char **argv)
38 {
39  KAboutData about("active-documentviewer", 0, ki18n("Reader"), version, ki18n(description),
40  KAboutData::License_GPL, ki18n("Copyright 2012 Marco Martin"), KLocalizedString(), 0, "mart@kde.org");
41  about.addAuthor( ki18n("Marco Martin"), KLocalizedString(), "mart@kde.org" );
42  about.setProgramIconName("okular");
43 
44  KCmdLineArgs::init(argc, argv, &about);
45 
46  KCmdLineOptions options;
47  options.add("+[url]", ki18n( "URL of the file to open" ));
48 
49  KCmdLineArgs::addCmdLineOptions(options);
50  KApplication app;
51 
52  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
53 
54  KGlobal::locale()->insertCatalog("org.kde.okular");
55  //kDebug() << "ARGS:" << args << args->count();
56 
57  KDeclarativeMainWindow *mainWindow = new KDeclarativeMainWindow();
58  mainWindow->declarativeView()->setPackageName("org.kde.active.documentviewer");
59  mainWindow->show();
60  args->clear();
61  return app.exec();
62 }
main
int main(int argc, char **argv)
Definition: main.cpp:37
description
static const char description[]
Definition: main.cpp:33
version
static const char version[]
Definition: main.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal