Commit cafbb417 authored by David Jarvie's avatar David Jarvie
Browse files

Add tooltips

parent 965b5bdc
Pipeline #40746 canceled with stage
......@@ -206,6 +206,7 @@ void EditAlarmDlg::init(const KAEvent* event)
mTryButton = mButtonBox->addButton(i18nc("@action:button", "Try"), QDialogButtonBox::ActionRole);
mLoadTemplateButton = mButtonBox->addButton(i18nc("@action:button", "Load Template..."),
QDialogButtonBox::HelpRole);
mLoadTemplateButton->setToolTip(i18nc("@info:tooltip", "Select an alarm template to preset the alarm"));
mMoreLessButton = mButtonBox->addButton(QDialogButtonBox::RestoreDefaults);
}
connect(mButtonBox, &QDialogButtonBox::clicked,
......@@ -1231,11 +1232,13 @@ void EditAlarmDlg::showOptions(bool more)
{
mMoreOptions->show();
mMoreLessButton->setText(i18nc("@action:Button", "Fewer Options <<"));
mMoreLessButton->setToolTip(i18nc("@info:tooltip", "Show fewer options"));
}
else
{
mMoreOptions->hide();
mMoreLessButton->setText(i18nc("@action:button", "More Options >>"));
mMoreLessButton->setToolTip(i18nc("@info:tooltip", "Show more options"));
}
if (mTimeWidget)
mTimeWidget->showMoreOptions(more);
......
......@@ -294,6 +294,7 @@ CheckBox* EditDisplayAlarmDlg::createConfirmAckCheckbox(QWidget* parent)
*/
void EditDisplayAlarmDlg::type_initValues(const KAEvent* event)
{
mTryButton->setToolTip(i18nc("@info:tooltip", "Display the alarm now"));
mAkonadiItemId = -1;
lateCancel()->showAutoClose(true);
if (event)
......@@ -849,6 +850,7 @@ QString EditCommandAlarmDlg::type_caption() const
void EditCommandAlarmDlg::type_init(QWidget* parent, QVBoxLayout* frameLayout)
{
mTryButton->setWhatsThis(i18nc("@info:whatsthis", "Execute the specified command now"));
mTryButton->setToolTip(i18nc("@info:tooltip", "Execute the specified command now"));
mCmdEdit = new CommandEdit(parent);
connect(mCmdEdit, &CommandEdit::scriptToggled, this, &EditCommandAlarmDlg::slotCmdScriptToggled);
......@@ -1175,6 +1177,7 @@ QString EditEmailAlarmDlg::type_caption() const
void EditEmailAlarmDlg::type_init(QWidget* parent, QVBoxLayout* frameLayout)
{
mTryButton->setWhatsThis(i18nc("@info:whatsthis", "Send the email to the specified addressees now"));
mTryButton->setToolTip(i18nc("@info:tooltip", "Send the email now"));
auto* grid = new QGridLayout();
grid->setContentsMargins(0, 0, 0, 0);
......@@ -1622,6 +1625,8 @@ QString EditAudioAlarmDlg::type_caption() const
*/
void EditAudioAlarmDlg::type_init(QWidget* parent, QVBoxLayout* frameLayout)
{
mTryButton->setWhatsThis(i18nc("@info:whatsthis", "Play the audio file now"));
mTryButton->setToolTip(i18nc("@info:tooltip", "Play the audio file now"));
// File name edit box
mSoundConfig = new SoundWidget(false, true, parent);
if (isTemplate())
......
......@@ -139,6 +139,9 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setWindowTitle(i18nc("@title:window", "Configure"));
setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Apply);
button(QDialogButtonBox::Ok)->setDefault(true);
button(QDialogButtonBox::RestoreDefaults)->setToolTip(KStandardGuiItem::defaults().toolTip());
button(QDialogButtonBox::Help)->setToolTip(KStandardGuiItem::help().toolTip());
button(QDialogButtonBox::Apply)->setToolTip(KStandardGuiItem::apply().toolTip());
setFaceType(List);
mTabScrollGroup = new StackedScrollGroup(this, this);
......
......@@ -81,7 +81,9 @@ ResourceSelector::ResourceSelector(QWidget* parent)
blayout->addWidget(mAddButton);
blayout->addWidget(mEditButton);
blayout->addWidget(mDeleteButton);
mEditButton->setWhatsThis(i18nc("@info:whatsthis", "Edit the highlighted calendar"));
mEditButton->setToolTip(i18nc("@info:tooltip", "Reconfigure the selected calendar"));
mEditButton->setWhatsThis(i18nc("@info:whatsthis", "Edit the highlighted calendar's configuration"));
mDeleteButton->setToolTip(i18nc("@info:tooltip", "Remove the selected calendar from the list"));
mDeleteButton->setWhatsThis(xi18nc("@info:whatsthis", "<para>Remove the highlighted calendar from the list.</para>"
"<para>The calendar itself is left intact, and may subsequently be reinstated in the list if desired.</para>"));
mEditButton->setDisabled(true);
......
......@@ -74,22 +74,26 @@ TemplateDlg::TemplateDlg(QWidget* parent)
mNewAction = new NewAlarmAction(true, i18nc("@action", "New"), this);
button->setMenu(mNewAction->menu());
connect(mNewAction, &NewAlarmAction::selected, this, &TemplateDlg::slotNew);
button->setToolTip(i18nc("@info:tooltip", "Create a new alarm template"));
button->setWhatsThis(i18nc("@info:whatsthis", "Create a new alarm template"));
layout->addWidget(button);
mEditButton = new QPushButton(i18nc("@action:button", "Edit..."));
connect(mEditButton, &QPushButton::clicked, this, &TemplateDlg::slotEdit);
mEditButton->setToolTip(i18nc("@info:tooltip", "Edit the selected alarm template"));
mEditButton->setWhatsThis(i18nc("@info:whatsthis", "Edit the currently highlighted alarm template"));
layout->addWidget(mEditButton);
mCopyButton = new QPushButton(i18nc("@action:button", "Copy"));
connect(mCopyButton, &QPushButton::clicked, this, &TemplateDlg::slotCopy);
mCopyButton->setToolTip(i18nc("@info:tooltip", "Create a new alarm template based on the selected template"));
mCopyButton->setWhatsThis(i18nc("@info:whatsthis", "Create a new alarm template based on a copy of the currently highlighted template"));
layout->addWidget(mCopyButton);
mDeleteButton = new QPushButton(i18nc("@action:button", "Delete"));
connect(mDeleteButton, &QPushButton::clicked, this, &TemplateDlg::slotDelete);
mDeleteButton->setWhatsThis(i18nc("@info:whatsthis", "Delete the currently highlighted alarm template"));
mDeleteButton->setToolTip(i18nc("@info:tooltip", "Delete the selected alarm templates"));
mDeleteButton->setWhatsThis(i18nc("@info:whatsthis", "Delete the currently highlighted alarm templates"));
layout->addWidget(mDeleteButton);
layout->addStretch();
......
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