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

filelight

  • sources
  • kde-4.14
  • kdeutils
  • filelight
  • src
  • app
main.cpp
Go to the documentation of this file.
1 /***********************************************************************
2 * Copyright 2003-2004 Max Howell <max.howell@methylblue.com>
3 * Copyright 2008-2009 Martin Sandsmark <martin.sandsmark@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License or (at your option) version 3 or any later version
9 * accepted by the membership of KDE e.V. (or its successor approved
10 * by the membership of KDE e.V.), which shall act as a proxy
11 * defined in Section 14 of version 3 of the license.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ***********************************************************************/
21 
22 #include "define.h"
23 #include "mainWindow.h"
24 
25 #include <KAboutData>
26 #include <KApplication>
27 #include <KCmdLineArgs>
28 #include <KLocale>
29 #include <KUrl>
30 
31 static KAboutData about(
32  APP_NAME,
33  0,
34  ki18n(APP_PRETTYNAME),
35  APP_VERSION,
36  ki18n("Graphical disk-usage information"),
37  KAboutData::License_GPL,
38  ki18n("(C) 2006 Max Howell\n\
39  (C) 2008-2013 Martin Sandsmark"),
40  KLocalizedString(),
41  "http://utils.kde.org/projects/filelight");
42 
43 
44 int main(int argc, char *argv[])
45 {
46  using Filelight::MainWindow;
47 
48  about.addAuthor(ki18n("Martin Sandsmark"), ki18n("Maintainer"), "martin.sandsmark@kde.org", "http://iskrembilen.com/");
49  about.addAuthor(ki18n("Max Howell"), ki18n("Original author"), "max.howell@methylblue.com", "http://www.methylblue.com/");
50  about.addCredit(ki18n("Lukas Appelhans"), ki18n("Help and support"));
51  about.addCredit(ki18n("Steffen Gerlach"), ki18n("Inspiration"), 0, "http://www.steffengerlach.de/");
52  about.addCredit(ki18n("Mike Diehl"), ki18n("Original documentation"), 0, 0);
53  about.addCredit(ki18n("Sune Vuorela"), ki18n("Icon"), 0, 0);
54  about.addCredit(ki18n("Nuno Pinheiro"), ki18n("Icon"), 0, 0);
55 
56  KCmdLineArgs::init(argc, argv, &about);
57 
58  KCmdLineOptions options;
59  KLocale *tmpLocale = new KLocale(QLatin1String(APP_NAME));
60  options.add(ki18nc("Path in the file system to scan", "+[path]").toString(tmpLocale).toLocal8Bit(), ki18n("Scan 'path'"));
61  delete tmpLocale;
62  KCmdLineArgs::addCmdLineOptions(options);
63 
64  KApplication app;
65 
66  if (!app.isSessionRestored()) {
67  MainWindow *mw = new MainWindow();
68 
69  KCmdLineArgs* const args = KCmdLineArgs::parsedArgs();
70  if (args->count() > 0) mw->scan(args->url(0));
71  args->clear();
72 
73  mw->show();
74  }
75  else RESTORE(MainWindow);
76 
77  return app.exec();
78 }
mw
#define mw
APP_VERSION
#define APP_VERSION
Definition: define.h:33
about
static KAboutData about(APP_NAME, 0, ki18n(APP_PRETTYNAME), APP_VERSION, ki18n("Graphical disk-usage information"), KAboutData::License_GPL, ki18n("(C) 2006 Max Howell\n\ (C) 2008-2013 Martin Sandsmark"), KLocalizedString(),"http://utils.kde.org/projects/filelight")
mainWindow.h
Filelight::KLocalizedString
KLocalizedString()
Filelight::MainWindow
Definition: mainWindow.h:38
APP_NAME
#define APP_NAME
Definition: define.h:32
Filelight::ki18n
ki18n(APP_PRETTYNAME)
QLatin1String
APP_PRETTYNAME
#define APP_PRETTYNAME
Definition: define.h:34
main
int main(int argc, char *argv[])
Definition: main.cpp:44
define.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

filelight

Skip menu "filelight"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

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