add of shortcut for style tools
This commit is contained in:
parent
a609d4f413
commit
a74c419c5d
@ -360,3 +360,45 @@ void MainWindow::on_actionFont_triggered()
|
|||||||
this->setFont();
|
this->setFont();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionFont_color_triggered()
|
||||||
|
{
|
||||||
|
this->setColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionFont_2_triggered()
|
||||||
|
{
|
||||||
|
this->setFont();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionBold_2_triggered()
|
||||||
|
{
|
||||||
|
this->setBold();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionItalic_2_triggered()
|
||||||
|
{
|
||||||
|
this->setItalic();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionUnderline_2_triggered()
|
||||||
|
{
|
||||||
|
this->setUnderline();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionOverline_2_triggered()
|
||||||
|
{
|
||||||
|
this->setOverline();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_actionFont_size_triggered()
|
||||||
|
{
|
||||||
|
this->setSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
14
mainwindow.h
14
mainwindow.h
@ -64,6 +64,20 @@ private slots:
|
|||||||
|
|
||||||
void on_actionFont_triggered();
|
void on_actionFont_triggered();
|
||||||
|
|
||||||
|
void on_actionFont_color_triggered();
|
||||||
|
|
||||||
|
void on_actionFont_2_triggered();
|
||||||
|
|
||||||
|
void on_actionBold_2_triggered();
|
||||||
|
|
||||||
|
void on_actionItalic_2_triggered();
|
||||||
|
|
||||||
|
void on_actionUnderline_2_triggered();
|
||||||
|
|
||||||
|
void on_actionOverline_2_triggered();
|
||||||
|
|
||||||
|
void on_actionFont_size_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QString currentFile;
|
QString currentFile;
|
||||||
|
|||||||
@ -316,8 +316,22 @@
|
|||||||
<string>Edit</string>
|
<string>Edit</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuFont">
|
||||||
|
<property name="title">
|
||||||
|
<string>Font</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionFont_color"/>
|
||||||
|
<addaction name="actionFont_2"/>
|
||||||
|
<addaction name="actionFont_size"/>
|
||||||
|
<addaction name="actionBold_2"/>
|
||||||
|
<addaction name="actionItalic_2"/>
|
||||||
|
<addaction name="actionUnderline_2"/>
|
||||||
|
<addaction name="actionOverline_2"/>
|
||||||
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuEdit"/>
|
<addaction name="menuEdit"/>
|
||||||
|
<addaction name="menuFont"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar"/>
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
@ -557,6 +571,50 @@
|
|||||||
<string>Size</string>
|
<string>Size</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionFont_color">
|
||||||
|
<property name="text">
|
||||||
|
<string>Font color</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionFont_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Font</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionFont_size">
|
||||||
|
<property name="text">
|
||||||
|
<string>Font size</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionBold_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bold</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+B</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionItalic_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Italic</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+I</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionUnderline_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Underline</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+U</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionOverline_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Overline</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="data.qrc"/>
|
<include location="data.qrc"/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user