Commit 0fda8b2c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It uses interface for the moment

parent d18c958e
...@@ -104,24 +104,26 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm ...@@ -104,24 +104,26 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm
mMenu->addMenu(attachmentMenuVariable); mMenu->addMenu(attachmentMenuVariable);
} }
QMenu *dateTimeMenuVariable = new QMenu(i18n("Date/Time"), mMenu); QMenu *dateTimeMenuVariable = new QMenu(i18n("Date/Time"), mMenu);
dateTimeMenuVariable->addAction(i18n("Day Of Week"), this, [this]() { if (!onlyMenuForCustomizeAttachmentFileName) {
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Dow); dateTimeMenuVariable->addAction(i18n("Day Of Week"), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Dow);
dateTimeMenuVariable->addAction(i18n("Date (%1)", QDate::currentDate().toString(Qt::SystemLocaleShortDate)), this, [this]() { });
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::ShortDate); dateTimeMenuVariable->addAction(i18n("Date (%1)", QDate::currentDate().toString(Qt::SystemLocaleShortDate)), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::ShortDate);
dateTimeMenuVariable->addAction(i18n("Date (%1)", QDate::currentDate().toString(Qt::SystemLocaleLongDate)), this, [this]() { });
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Date); dateTimeMenuVariable->addAction(i18n("Date (%1)", QDate::currentDate().toString(Qt::SystemLocaleLongDate)), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Date);
dateTimeMenuVariable->addAction(i18n("Time (%1)", QTime::currentTime().toString(Qt::SystemLocaleShortDate)), this, [this]() { });
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Time); dateTimeMenuVariable->addAction(i18n("Time (%1)", QTime::currentTime().toString(Qt::SystemLocaleShortDate)), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Time);
dateTimeMenuVariable->addAction(i18n("Time (%1)", QTime::currentTime().toString(Qt::SystemLocaleLongDate)), this, [this]() { });
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::TimeLong); dateTimeMenuVariable->addAction(i18n("Time (%1)", QTime::currentTime().toString(Qt::SystemLocaleLongDate)), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::TimeLong);
dateTimeMenuVariable->addAction(i18n("Year"), this, [this]() { });
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Year); dateTimeMenuVariable->addAction(i18n("Year"), this, [this]() {
}); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Year);
});
}
dateTimeMenuVariable->addAction(i18n("Last Year"), this, [this]() { dateTimeMenuVariable->addAction(i18n("Last Year"), this, [this]() {
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::LastYear); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::LastYear);
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment