Changeset View
Changeset View
Standalone View
Standalone View
plugins/textshape/TextTool.cpp
Show First 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | |||||
104 | #include "KoShapeBasedDocumentBase.h" | 104 | #include "KoShapeBasedDocumentBase.h" | ||
105 | #include <KoAnnotation.h> | 105 | #include <KoAnnotation.h> | ||
106 | #include <KoShapeRegistry.h> | 106 | #include <KoShapeRegistry.h> | ||
107 | #include <kuser.h> | 107 | #include <kuser.h> | ||
108 | 108 | | |||
109 | #include <KoDocumentRdfBase.h> | 109 | #include <KoDocumentRdfBase.h> | ||
110 | 110 | | |||
111 | #include <algorithm> | 111 | #include <algorithm> | ||
112 | #include <QProxyStyle> | ||||
113 | #include <QStyleOption> | ||||
114 | #include <QStyle> | ||||
115 | | ||||
112 | 116 | | |||
113 | class TextToolSelection : public KoToolSelection | 117 | class TextToolSelection : public KoToolSelection | ||
114 | { | 118 | { | ||
115 | public: | 119 | public: | ||
116 | 120 | | |||
117 | TextToolSelection(QPointer<KoTextEditor> editor) | 121 | TextToolSelection(QPointer<KoTextEditor> editor) | ||
118 | : KoToolSelection(0) | 122 | : KoToolSelection(0) | ||
119 | , m_editor(editor) | 123 | , m_editor(editor) | ||
▲ Show 20 Lines • Show All 2074 Lines • ▼ Show 20 Line(s) | |||||
2194 | { | 2198 | { | ||
2195 | return m_toolSelection; | 2199 | return m_toolSelection; | ||
2196 | } | 2200 | } | ||
2197 | 2201 | | |||
2198 | QList<QPointer<QWidget> > TextTool::createOptionWidgets() | 2202 | QList<QPointer<QWidget> > TextTool::createOptionWidgets() | ||
2199 | { | 2203 | { | ||
2200 | QList<QPointer<QWidget> > widgets; | 2204 | QList<QPointer<QWidget> > widgets; | ||
2201 | SimpleCharacterWidget *scw = new SimpleCharacterWidget(this, 0); | 2205 | SimpleCharacterWidget *scw = new SimpleCharacterWidget(this, 0); | ||
2206 | scw->setStyle(new SimpleWidgetTitleProxyStyle()); | ||||
2202 | SimpleParagraphWidget *spw = new SimpleParagraphWidget(this, 0); | 2207 | SimpleParagraphWidget *spw = new SimpleParagraphWidget(this, 0); | ||
2203 | if (m_textEditor.data()) { | 2208 | if (m_textEditor.data()) { | ||
2204 | // connect(m_textEditor.data(), SIGNAL(paragraphStyleApplied(KoParagraphStyle*)), spw, SLOT(slotParagraphStyleApplied(KoParagraphStyle*))); | 2209 | // connect(m_textEditor.data(), SIGNAL(paragraphStyleApplied(KoParagraphStyle*)), spw, SLOT(slotParagraphStyleApplied(KoParagraphStyle*))); | ||
2205 | // connect(m_textEditor.data(), SIGNAL(characterStyleApplied(KoCharacterStyle*)), scw, SLOT(slotCharacterStyleApplied(KoCharacterStyle*))); | 2210 | // connect(m_textEditor.data(), SIGNAL(characterStyleApplied(KoCharacterStyle*)), scw, SLOT(slotCharacterStyleApplied(KoCharacterStyle*))); | ||
2206 | //initialise the char- and par- widgets with the current block and formats. | 2211 | //initialise the char- and par- widgets with the current block and formats. | ||
2207 | scw->setCurrentBlockFormat(m_textEditor.data()->blockFormat()); | 2212 | scw->setCurrentBlockFormat(m_textEditor.data()->blockFormat()); | ||
2208 | scw->setCurrentFormat(m_textEditor.data()->charFormat(), m_textEditor.data()-> blockCharFormat()); | 2213 | scw->setCurrentFormat(m_textEditor.data()->charFormat(), m_textEditor.data()-> blockCharFormat()); | ||
2209 | spw->setCurrentBlock(m_textEditor.data()->block()); | 2214 | spw->setCurrentBlock(m_textEditor.data()->block()); | ||
▲ Show 20 Lines • Show All 941 Lines • Show Last 20 Lines |