Changeset View
Changeset View
Standalone View
Standalone View
plugins/textshape/dialogs/SimpleCharacterWidget.cpp
Show All 36 Lines | |||||
37 | #include <KoZoomHandler.h> | 37 | #include <KoZoomHandler.h> | ||
38 | #include <KoStyleManager.h> | 38 | #include <KoStyleManager.h> | ||
39 | 39 | | |||
40 | #include <QDebug> | 40 | #include <QDebug> | ||
41 | 41 | | |||
42 | #include <QTextLayout> | 42 | #include <QTextLayout> | ||
43 | #include <QComboBox> | 43 | #include <QComboBox> | ||
44 | 44 | | |||
45 | | ||||
45 | SimpleCharacterWidget::SimpleCharacterWidget(TextTool *tool, QWidget *parent) | 46 | SimpleCharacterWidget::SimpleCharacterWidget(TextTool *tool, QWidget *parent) | ||
46 | : QWidget(parent), | 47 | : QWidget(parent), | ||
47 | m_styleManager(0), | 48 | m_styleManager(0), | ||
48 | m_blockSignals(false), | 49 | m_blockSignals(false), | ||
49 | m_comboboxHasBidiItems(false), | 50 | m_comboboxHasBidiItems(false), | ||
50 | m_tool(tool), | 51 | m_tool(tool), | ||
51 | m_thumbnailer(new KoStyleThumbnailer()), | 52 | m_thumbnailer(new KoStyleThumbnailer()), | ||
52 | m_stylesModel(new StylesModel(0, StylesModel::CharacterStyle)), | 53 | m_stylesModel(new StylesModel(0, StylesModel::CharacterStyle)), | ||
53 | m_sortedStylesModel(new DockerStylesComboModel()), | 54 | m_sortedStylesModel(new DockerStylesComboModel()), | ||
54 | m_stylesDelegate(0) | 55 | m_stylesDelegate(0) | ||
55 | { | 56 | { | ||
56 | widget.setupUi(this); | 57 | widget.setupUi(this); | ||
57 | widget.bold->setDefaultAction(tool->action("format_bold")); | 58 | widget.bold->setDefaultAction(tool->action("format_bold")); | ||
58 | widget.italic->setDefaultAction(tool->action("format_italic")); | 59 | widget.italic->setDefaultAction(tool->action("format_italic")); | ||
59 | widget.strikeOut->setDefaultAction(tool->action("format_strike")); | 60 | widget.strikeOut->setDefaultAction(tool->action("format_strike")); | ||
60 | widget.underline->setDefaultAction(tool->action("format_underline")); | 61 | widget.underline->setDefaultAction(tool->action("format_underline")); | ||
61 | widget.textColor->setDefaultAction(tool->action("format_textcolor")); | 62 | widget.textColor->setDefaultAction(tool->action("format_textcolor")); | ||
62 | widget.backgroundColor->setDefaultAction(tool->action("format_backgroundcolor")); | 63 | widget.backgroundColor->setDefaultAction(tool->action("format_backgroundcolor")); | ||
63 | widget.superscript->setDefaultAction(tool->action("format_super")); | 64 | widget.superscript->setDefaultAction(tool->action("format_super")); | ||
64 | widget.subscript->setDefaultAction(tool->action("format_sub")); | 65 | widget.subscript->setDefaultAction(tool->action("format_sub")); | ||
66 | // widget.decreaseFont->setDefaultAction(tool->action("format_decrease_font_size")); | ||||
67 | widget.increaseFont->setDefaultAction(tool->action("format-increase_font_size")); | ||||
65 | widget.moreOptions->setText("..."); | 68 | widget.moreOptions->setText("..."); | ||
66 | widget.moreOptions->setToolTip(i18n("Change font format")); | 69 | widget.moreOptions->setToolTip(i18n("Change font format")); | ||
67 | connect(widget.moreOptions, SIGNAL(clicked(bool)), tool->action("format_font"), SLOT(trigger())); | 70 | connect(widget.moreOptions, SIGNAL(clicked(bool)), tool->action("format_font"), SLOT(trigger())); | ||
68 | 71 | | |||
69 | connect(widget.bold, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | 72 | connect(widget.bold, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | ||
70 | connect(widget.italic, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | 73 | connect(widget.italic, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | ||
71 | connect(widget.strikeOut, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | 74 | connect(widget.strikeOut, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | ||
72 | connect(widget.underline, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | 75 | connect(widget.underline, SIGNAL(clicked(bool)), this, SIGNAL(doneWithFocus())); | ||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |