• Skip to content
  • Skip to link menu
KDE 4.2 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     "http://utils.kde.org/projects/kfloppy"
00047     );
00048 
00049   aboutData.addAuthor(ki18n("Bernd Johannes Wuebben"), ki18n("Author and former maintainer"), "wuebben@kde.org");
00050   aboutData.addCredit(ki18n("Chris Howells"), ki18n("User interface re-design"), "howells@kde.org");
00051   aboutData.addCredit(ki18n("Adriaan de Groot"), ki18n("Add BSD support"), "groot@kde.org");
00052   aboutData.addCredit(ki18n("Nicolas Goutte"), ki18n("Make KFloppy work again for KDE 3.4"), "goutte@kde.org");
00053   
00054   KCmdLineArgs::init( argc, argv, &aboutData );
00055 
00056   KCmdLineOptions options;
00057   options.add("+[device]", ki18n("Default device"));
00058   KCmdLineArgs::addCmdLineOptions( options );
00059 
00060   KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
00061   QString device;
00062   if (args->count()) {
00063     device = args->arg(0);
00064   }
00065   args->clear();
00066 
00067   KApplication a;
00068 
00069   FloppyData* floppy  = new FloppyData();
00070   bool autoformat = floppy->setInitialDevice(device);
00071   floppy->show();
00072   if (autoformat)
00073     floppy->format();
00074   return a.exec();
00075 }
00076 

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
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
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