Changeset View
Changeset View
Standalone View
Standalone View
conf/editannottooldialog.h
Show All 37 Lines | 34 | { | |||
---|---|---|---|---|---|
38 | ToolStraightLine, | 38 | ToolStraightLine, | ||
39 | ToolPolygon, | 39 | ToolPolygon, | ||
40 | ToolTextMarkup, | 40 | ToolTextMarkup, | ||
41 | ToolGeometricalShape, | 41 | ToolGeometricalShape, | ||
42 | ToolStamp, | 42 | ToolStamp, | ||
43 | ToolTypewriter | 43 | ToolTypewriter | ||
44 | }; | 44 | }; | ||
45 | 45 | | |||
46 | explicit EditAnnotToolDialog( QWidget *parent = nullptr, const QDomElement &initialState = QDomElement() ); | 46 | explicit EditAnnotToolDialog( QWidget *parent = nullptr, | ||
47 | const QDomElement &initialState = QDomElement(), | ||||
48 | bool builtinTool = false ); | ||||
47 | ~EditAnnotToolDialog(); | 49 | ~EditAnnotToolDialog(); | ||
48 | QString name() const; | 50 | QString name() const; | ||
49 | QDomDocument toolXml() const; | 51 | QDomDocument toolXml() const; | ||
50 | 52 | | |||
51 | private: | 53 | private: | ||
52 | void createStubAnnotation(); | 54 | void createStubAnnotation(); | ||
53 | void rebuildAppearanceBox(); | 55 | void rebuildAppearanceBox(); | ||
54 | void updateDefaultNameAndIcon(); | 56 | void updateDefaultNameAndIcon(); | ||
55 | void setToolType( ToolType newType ); | 57 | void setToolType( ToolType newType ); | ||
56 | void loadTool( const QDomElement &toolElement ); | 58 | void loadTool( const QDomElement &toolElement ); | ||
57 | 59 | | |||
58 | KLineEdit *m_name; | 60 | KLineEdit *m_name; | ||
59 | KComboBox *m_type; | 61 | KComboBox *m_type; | ||
60 | QLabel *m_toolIcon; | 62 | QLabel *m_toolIcon; | ||
61 | QGroupBox *m_appearanceBox; | 63 | QGroupBox *m_appearanceBox; | ||
62 | 64 | | |||
63 | Okular::Annotation *m_stubann; | 65 | Okular::Annotation *m_stubann; | ||
64 | AnnotationWidget *m_annotationWidget; | 66 | AnnotationWidget *m_annotationWidget; | ||
65 | 67 | | |||
68 | bool m_builtinTool; | ||||
69 | | ||||
66 | private Q_SLOTS: | 70 | private Q_SLOTS: | ||
67 | void slotTypeChanged(); | 71 | void slotTypeChanged(); | ||
68 | void slotDataChanged(); | 72 | void slotDataChanged(); | ||
69 | }; | 73 | }; | ||
70 | 74 | | |||
71 | Q_DECLARE_METATYPE( EditAnnotToolDialog::ToolType ) | 75 | Q_DECLARE_METATYPE( EditAnnotToolDialog::ToolType ) | ||
72 | 76 | | |||
73 | #endif // EDITANNOTTOOLDIALOG_H | 77 | #endif // EDITANNOTTOOLDIALOG_H |