main.cpp

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2008  Tim Fechtner < urwald at users dot sourceforge dot net >
00003 
00004     This program is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU General Public License as
00006     published by the Free Software Foundation; either version 2 of
00007     the License or (at your option) version 3 or any later version
00008     accepted by the membership of KDE e.V. (or its successor approved
00009     by the membership of KDE e.V.), which shall act as a proxy
00010     defined in Section 14 of version 3 of the license.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #include <KApplication>
00022 #include <KAboutData>
00023 #include <KCmdLineArgs>
00024 
00025 #include "mainwindow.h"
00026 #include "version.h"
00027 
00029 int main (int argc, char * argv[])
00030 {
00031   KAboutData aboutData("kradioripper", // internal program name
00032                        0, // name of the message catalog. 0: same as internal program name
00033                        ki18nc("@title KAboutData: displayed program name", "KRadioRipper"),
00034                        VERSION,
00035                        ki18nc("@title KAboutData: short program description",
00036                               "A program for recording audio streams."),
00037                        KAboutData::License_Unknown,  // will be overwritten later
00038                        ki18nc("@info:credit KAboutData: copyright hint",
00039                               "(c) 2007-2009 Tim Fechtner"),
00040                        ki18nc("@info KAboutData: further hints", "Based on Streamripper."),
00041                        "http://kradioripper.sourceforge.net/",
00042                        // bug email address:
00043                        QString("urwald%1users.sourceforge.net").arg("@").toLatin1());
00044   aboutData.addAuthor(ki18nc("@info:credit KAboutData/Author: name (do not translate this!)",
00045                              "Tim Fechtner"),
00046                       ki18nc("@info:credit KAboutData/Author: function", "Main author"),
00047                       QString("urwald%1users.sourceforge.net").arg("@").toLatin1());
00048   aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name",
00049                              "Greg Sharp and the Streamripper team"),
00050                       ki18nc("@info:credit KAboutData/Credit: function",
00051                              "Authers of Streamripper, which is the base for KRadioRipper"),
00052                       QString("gregsharp%1users.sourceforge.net").arg("@").toLatin1(),
00053                       "http://streamripper.sourceforge.net/");
00054   aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Detlef Reichelt"),
00055                       ki18nc("@info:credit KAboutData/Credit: function", "Packages for Packman"),
00056                       QString("detlef%1links2linux.de").arg("@").toLatin1(),
00057                       "http://packman.links2linux.org/package/kradioripper");
00058   aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Rajko Bock"),
00059                       ki18nc("@info:credit KAboutData/Credit: function",
00060                              "Packages for Mandriva"),
00061                       QString("info%1randosweb.de").arg("@").toLatin1(),
00062                       "http://www.randosweb.de");
00063   // TODO aboutData.addCredit(ki18nc("@info:credit KAboutData/Credit: name", "Alessandro Ghersi"),
00064   //                    ki18nc("@info:credit KAboutData/Credit: function", "Packages for Ubuntu"),
00065   //                    QString("alessandro.ghersi%1fastwebnet.it").arg('@').toLatin1());
00066   // Set credits to translators manually to allow semantic markup.
00067   // (No fallback available in our .po! So don't change this.)
00068   aboutData.setTranslator(ki18nc("@info:credit NAME OF TRANSLATORS "
00069                                    "Dear translator. Enter your name here. This special "
00070                                    "string is used to display a credit to you at "
00071                                    "Help->About KRadioRipper->Translation",
00072                                  "Your names"),
00073                           ki18nc("@info:credit EMAIL OF TRANSLATORS "
00074                                    "Dear translator. Enter your email address here. This special "
00075                                    "string is used to display a credit to you at "
00076                                    "Help->About KRadioRipper->Translation "
00077                                    "Or leave it blank when you do not want to publish your email "
00078                                    "address. If you want, you can use %1 instead of the 'at' "
00079                                    "sign (for anti-spam reasons).",
00080                                  "Your emails").subs("@"));
00081 #if KDE_IS_VERSION(4,1,0)
00082   // Overrides License_Unknown, which was specified in the constructor:
00083   aboutData.addLicenseText(ki18nc(
00084     "@info (%1 will be replaced by the 'at' sign - doing it this way for anti-spam reasons. "
00085       "Please use this also in the translation file.) The text is a modified version of the "
00086       "text that is proposed in the GPL. See http://www.gnu.org/licenses/translations.html for "
00087       "possibly yet available translations.",
00088     "Copyright (C) 2008-2009  Tim Fechtner &lt;urwald%1users.sourceforge.net&gt;<nl/>"
00089       "<nl/>"
00090       "This program is free software; you can redistribute it and/or<nl/>"
00091       "modify it under the terms of the GNU General Public License as<nl/>"
00092       "published by the Free Software Foundation; either version 2 of<nl/>"
00093       "the License or (at your option) version 3 or any later version<nl/>"
00094       "accepted by the membership of KDE e.V. (or its successor approved<nl/>"
00095       "by the membership of KDE e.V.), which shall act as a proxy<nl/>"
00096       "defined in Section 14 of version 3 of the license.<nl/>"
00097       "<nl/>"
00098       "This program is distributed in the hope that it will be useful,<nl/>"
00099       "but WITHOUT ANY WARRANTY; without even the implied warranty of<nl/>"
00100       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<nl/>"
00101       "GNU General Public License for more details.<nl/>"
00102       "<nl/>"
00103       "You should have received a copy of the GNU General Public License<nl/>"
00104       "along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.").subs("@"));
00105 #endif
00106   KCmdLineArgs::init(argc, argv, &aboutData);
00107   KApplication app;
00108   if (app.isSessionRestored()) {
00109     kRestoreMainWindows< MainWindow >();
00110   } else {
00111     MainWindow * window = new MainWindow();
00112     window->setObjectName("KRadioRipperMainWindow#");  // '#' will be replaced with unique numbers
00113     window->show();
00114   };
00115   return app.exec();
00116 }

Generated on Sat May 2 10:43:44 2009 for kradioripper by  doxygen 1.5.6