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

kfloppy

main.cpp

Go to the documentation of this file.
00001 /*
00002 
00003     This file is part of the KFloppy program, part of the KDE project
00004     
00005     Copyright (C) 1997 Bernd Johannes Wuebben <wuebben@math.cornell.edu>
00006     Copyright (C) 2004, 2005 Nicolas GOUTTE <goutte@kde.org>
00007 
00008 
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with this program; if not, write to the Free Software
00021     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00022 
00023 */
00024 
00025 #include <kdeversion.h>
00026 #include <kapplication.h>
00027 #include <kcmdlineargs.h>
00028 #include <kaboutdata.h>
00029 #include <klocale.h>
00030 #include "floppy.h"
00031 
00032 
00033 static const char description[] =
00034     I18N_NOOP("KDE Floppy Disk Utility");
00035 
00036 int main( int argc, char *argv[] )
00037 {
00038   KAboutData aboutData("kfloppy", 0,
00039     ki18n("KFloppy"),
00040     KDE_VERSION_STRING, ki18n(description), KAboutData::License_GPL,
00041     ki18n("(c) 1997, Bernd Johannes Wuebben\n"
00042     "(c) 2001, Chris Howells\n"
00043     "(c) 2002, Adriaan de Groot\n"
00044     "(c) 2004, 2005, Nicolas Goutte"),
00045     ki18n("KFloppy helps you format floppies with the filesystem of your choice.")
00046     );
00047 
00048   aboutData.addAuthor(ki18n("Bernd Johannes Wuebben"), ki18n("Author and former maintainer"), "wuebben@kde.org");
00049   aboutData.addCredit(ki18n("Chris Howells"), ki18n("User interface re-design"), "howells@kde.org");
00050   aboutData.addCredit(ki18n("Adriaan de Groot"), ki18n("Add BSD support"), "groot@kde.org");
00051   aboutData.addCredit(ki18n("Nicolas Goutte"), ki18n("Make KFloppy work again for KDE 3.4"), "goutte@kde.org");
00052   
00053   KCmdLineArgs::init( argc, argv, &aboutData );
00054 
00055   KCmdLineOptions options;
00056   options.add("+[device]", ki18n("Default device"));
00057   KCmdLineArgs::addCmdLineOptions( options );
00058 
00059   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00060   QString device;
00061   if (args->count()) {
00062     device = args->arg(0);
00063   }
00064   args->clear();
00065 
00066   KApplication a;
00067 
00068   FloppyData* floppy  = new FloppyData();
00069   bool autoformat = floppy->setInitialDevice(device);
00070   floppy->show();
00071   if (autoformat)
00072     floppy->format();
00073   return a.exec();
00074 }
00075 

kfloppy

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal