+ // Text formatting
+ coll = QtUi::actionCollection("TextFormat", tr("Text formatting"));
+
+ coll->addAction("FormatApplyColor", new Action(
+ icon::get("format-text-color"), tr("Apply foreground color"), coll,
+ this, SLOT(on_inputFormatApplyColor_triggered()),
+ QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_G)));
+
+ coll->addAction("FormatApplyColorFill", new Action(
+ icon::get("format-fill-color"), tr("Apply background color"), coll,
+ this, SLOT(on_inputFormatApplyColorFill_triggered()),
+ QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B)));
+
+ coll->addAction("FormatClear", new Action(
+ icon::get("edit-clear"), tr("Clear formatting"), coll,
+ this, SLOT(on_inputFormatClear_triggered()),
+ QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C)));
+
+ coll->addAction("FormatBold", new Action(
+ icon::get("format-text-bold"), tr("Toggle bold"), coll,
+ this, SLOT(on_inputFormatBold_triggered()),
+ QKeySequence::Bold));
+
+ coll->addAction("FormatItalic", new Action(
+ icon::get("format-text-italic"), tr("Toggle italics"), coll,
+ this, SLOT(on_inputFormatItalic_triggered()),
+ QKeySequence::Italic));
+
+ coll->addAction("FormatUnderline", new Action(
+ icon::get("format-text-underline"), tr("Toggle underline"), coll,
+ this, SLOT(on_inputFormatUnderline_triggered()), QKeySequence::Underline));
+