Translations:Development/Tutorials/First program/KF5/13/en

From KDE TechBase
Revision as of 10:35, 11 March 2016 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

int main (int argc, char *argv[]) {

   QApplication app(argc, argv);
   KLocalizedString::setApplicationDomain("tutorial1");
   
   KAboutData aboutData(
                        // The program name used internally. (componentName)
                        QStringLiteral("tutorial1"),
                        // A displayable program name string. (displayName)
                        i18n("Tutorial 1"),
                        // The program version string. (version)
                        QStringLiteral("1.0"),
                        // Short description of what the app does. (shortDescription)
                        i18n("Displays a KMessageBox popup"),
                        // The license this code is released under
                        KAboutLicense::GPL,
                        // Copyright Statement (copyrightStatement = QString())
                        i18n("(c) 2015"),
                        // Optional text shown in the About box.
                        // Can contain any information desired. (otherText)
                        i18n("Some text..."),
                        // The program homepage string. (homePageAddress = QString())
                        QStringLiteral("http://example.com/"),
                        // The bug report email address
                        // (bugsEmailAddress = QLatin1String("[email protected]")
                        QStringLiteral("[email protected]"));
   aboutData.addAuthor(i18n("Name"), i18n("Task"), QStringLiteral("[email protected]"),
                        QStringLiteral("http://your.website.com"), QStringLiteral("OSC Username"));
   KAboutData::setApplicationData(aboutData);