File indexing completed on 2024-05-12 05:20:37

0001 /*
0002  *   kmail: KDE mail client
0003  *   SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0004  *   SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #pragma once
0007 
0008 #include <KLocalizedString>
0009 #include <QCommandLineParser>
0010 
0011 static void kmail_options(QCommandLineParser *parser)
0012 {
0013     QList<QCommandLineOption> options;
0014 
0015     options << QCommandLineOption(QStringList() << QStringLiteral("s") << QStringLiteral("subject"), i18n("Set subject of message"), QStringLiteral("subject"))
0016             << QCommandLineOption(QStringList() << QStringLiteral("c") << QStringLiteral("cc"),
0017                                   i18n("Send CC: to 'address'. This can be repeated"),
0018                                   QStringLiteral("address"))
0019             << QCommandLineOption(QStringList() << QStringLiteral("b") << QStringLiteral("bcc"),
0020                                   i18n("Send BCC: to 'address'. This can be repeated"),
0021                                   QStringLiteral("address"))
0022             << QCommandLineOption(QStringList() << QStringLiteral("r") << QStringLiteral("replyTo"),
0023                                   i18n("Set replyTo to 'address'"),
0024                                   QStringLiteral("address"))
0025             << QCommandLineOption(QStringLiteral("header"), i18n("Add 'header' to message. This can be repeated"), QStringLiteral("header_name:header_value"))
0026             << QCommandLineOption(QStringLiteral("msg"), i18n("Read message body from 'file'"), QStringLiteral("file"))
0027             << QCommandLineOption(QStringLiteral("body"), i18n("Set body of message"), QStringLiteral("text"))
0028             << QCommandLineOption(QStringLiteral("attach"), i18n("Add an attachment to the mail. This can be repeated"), QStringLiteral("url"))
0029             << QCommandLineOption(QStringLiteral("check"), i18n("Only check for new mail"))
0030             << QCommandLineOption(QStringLiteral("startintray"), i18n("Start minimized to tray"))
0031             << QCommandLineOption(QStringLiteral("composer"), i18n("Only open composer window"))
0032             << QCommandLineOption(QStringLiteral("identity"), i18n("Set identity name"), QStringLiteral("identity"))
0033             << QCommandLineOption(QStringLiteral("view"), i18n("View the given message file"), QStringLiteral("url"));
0034 #ifdef WITH_KUSERFEEDBACK
0035     parser->addOption(QCommandLineOption(QStringLiteral("feedback"), i18n("Lists the available options for user feedback")));
0036 #endif
0037 
0038     parser->addOptions(options);
0039     parser->addPositionalArgument(QStringLiteral("address"),
0040                                   i18n("Send message to 'address' or attach the file the 'URL' points to"),
0041                                   QStringLiteral("address|URL"));
0042 }