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

kfloppy

  • sources
  • kde-4.12
  • kdeutils
  • kfloppy
main.cpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of the KFloppy program, part of the KDE project
4 
5  Copyright (C) 1997 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
6  Copyright (C) 2004, 2005 Nicolas GOUTTE <goutte@kde.org>
7 
8 
9  This program is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 
23 */
24 
25 #include <kdeversion.h>
26 #include <kapplication.h>
27 #include <kcmdlineargs.h>
28 #include <kaboutdata.h>
29 #include <klocale.h>
30 #include "floppy.h"
31 
32 
33 static const char description[] =
34  I18N_NOOP("KDE Floppy Disk Utility");
35 
36 int main( int argc, char *argv[] )
37 {
38  KAboutData aboutData("kfloppy", 0,
39  ki18n("KFloppy"),
40  "4.9 pre", ki18n(description), KAboutData::License_GPL,
41  ki18n("(c) 1997, Bernd Johannes Wuebben\n"
42  "(c) 2001, Chris Howells\n"
43  "(c) 2002, Adriaan de Groot\n"
44  "(c) 2004, 2005, Nicolas Goutte"),
45  ki18n("KFloppy helps you format floppies with the filesystem of your choice."),
46  "http://utils.kde.org/projects/kfloppy"
47  );
48 
49  aboutData.addAuthor(ki18n("Bernd Johannes Wuebben"), ki18n("Author and former maintainer"), "wuebben@kde.org");
50  aboutData.addCredit(ki18n("Chris Howells"), ki18n("User interface re-design"), "howells@kde.org");
51  aboutData.addCredit(ki18n("Adriaan de Groot"), ki18n("Add BSD support"), "groot@kde.org");
52  aboutData.addCredit(ki18n("Nicolas Goutte"), ki18n("Make KFloppy work again for KDE 3.4"), "goutte@kde.org");
53 
54  KCmdLineArgs::init( argc, argv, &aboutData );
55 
56  KCmdLineOptions options;
57  options.add("+[device]", ki18n("Default device"));
58  KCmdLineArgs::addCmdLineOptions( options );
59 
60  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
61  QString device;
62  if (args->count()) {
63  device = args->arg(0);
64  }
65  args->clear();
66 
67  KApplication a;
68 
69  FloppyData* floppy = new FloppyData();
70  bool autoformat = floppy->setInitialDevice(device);
71  floppy->show();
72  if (autoformat)
73  floppy->format();
74  return a.exec();
75 }
floppy.h
FloppyData::show
void show()
Need to overload normal show() in order to mangle caption.
Definition: floppy.cpp:371
FloppyData
Definition: floppy.h:45
FloppyData::setInitialDevice
bool setInitialDevice(const QString &dev)
set default device
Definition: floppy.cpp:416
description
static const char description[]
Definition: main.cpp:33
main
int main(int argc, char *argv[])
Definition: main.cpp:36
FloppyData::format
void format()
Definition: floppy.cpp:499
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:08:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kfloppy

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • 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