Changeset View
Changeset View
Standalone View
Standalone View
src/worksheetentry.cpp
Show All 15 Lines | 1 | /* | |||
---|---|---|---|---|---|
16 | 16 | | |||
17 | --- | 17 | --- | ||
18 | Copyright (C) 2012 Martin Kuettler <martin.kuettler@gmail.com> | 18 | Copyright (C) 2012 Martin Kuettler <martin.kuettler@gmail.com> | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "worksheetentry.h" | 21 | #include "worksheetentry.h" | ||
22 | #include "commandentry.h" | 22 | #include "commandentry.h" | ||
23 | #include "textentry.h" | 23 | #include "textentry.h" | ||
24 | #include "markdownentry.h" | ||||
24 | #include "latexentry.h" | 25 | #include "latexentry.h" | ||
25 | #include "imageentry.h" | 26 | #include "imageentry.h" | ||
26 | #include "pagebreakentry.h" | 27 | #include "pagebreakentry.h" | ||
27 | #include "settings.h" | 28 | #include "settings.h" | ||
28 | #include "actionbar.h" | 29 | #include "actionbar.h" | ||
29 | #include "worksheettoolbutton.h" | 30 | #include "worksheettoolbutton.h" | ||
30 | 31 | | |||
31 | #include <QDrag> | 32 | #include <QDrag> | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
83 | } | 84 | } | ||
84 | 85 | | |||
85 | WorksheetEntry* WorksheetEntry::create(int t, Worksheet* worksheet) | 86 | WorksheetEntry* WorksheetEntry::create(int t, Worksheet* worksheet) | ||
86 | { | 87 | { | ||
87 | switch(t) | 88 | switch(t) | ||
88 | { | 89 | { | ||
89 | case TextEntry::Type: | 90 | case TextEntry::Type: | ||
90 | return new TextEntry(worksheet); | 91 | return new TextEntry(worksheet); | ||
92 | case MarkdownEntry::Type: | ||||
93 | return new MarkdownEntry(worksheet); | ||||
91 | case CommandEntry::Type: | 94 | case CommandEntry::Type: | ||
92 | return new CommandEntry(worksheet); | 95 | return new CommandEntry(worksheet); | ||
93 | case ImageEntry::Type: | 96 | case ImageEntry::Type: | ||
94 | return new ImageEntry(worksheet); | 97 | return new ImageEntry(worksheet); | ||
95 | case PageBreakEntry::Type: | 98 | case PageBreakEntry::Type: | ||
96 | return new PageBreakEntry(worksheet); | 99 | return new PageBreakEntry(worksheet); | ||
97 | case LatexEntry::Type: | 100 | case LatexEntry::Type: | ||
98 | return new LatexEntry(worksheet); | 101 | return new LatexEntry(worksheet); | ||
99 | default: | 102 | default: | ||
100 | return nullptr; | 103 | return nullptr; | ||
101 | } | 104 | } | ||
102 | } | 105 | } | ||
103 | 106 | | |||
104 | void WorksheetEntry::insertCommandEntry() | 107 | void WorksheetEntry::insertCommandEntry() | ||
105 | { | 108 | { | ||
106 | worksheet()->insertCommandEntry(this); | 109 | worksheet()->insertCommandEntry(this); | ||
107 | } | 110 | } | ||
108 | 111 | | |||
109 | void WorksheetEntry::insertTextEntry() | 112 | void WorksheetEntry::insertTextEntry() | ||
110 | { | 113 | { | ||
111 | worksheet()->insertTextEntry(this); | 114 | worksheet()->insertTextEntry(this); | ||
112 | } | 115 | } | ||
113 | 116 | | |||
117 | void WorksheetEntry::insertMarkdownEntry() | ||||
118 | { | ||||
119 | worksheet()->insertMarkdownEntry(this); | ||||
120 | } | ||||
121 | | ||||
114 | void WorksheetEntry::insertLatexEntry() | 122 | void WorksheetEntry::insertLatexEntry() | ||
115 | { | 123 | { | ||
116 | worksheet()->insertLatexEntry(this); | 124 | worksheet()->insertLatexEntry(this); | ||
117 | } | 125 | } | ||
118 | 126 | | |||
119 | void WorksheetEntry::insertImageEntry() | 127 | void WorksheetEntry::insertImageEntry() | ||
120 | { | 128 | { | ||
121 | worksheet()->insertImageEntry(this); | 129 | worksheet()->insertImageEntry(this); | ||
Show All 9 Lines | 138 | { | |||
131 | worksheet()->insertCommandEntryBefore(this); | 139 | worksheet()->insertCommandEntryBefore(this); | ||
132 | } | 140 | } | ||
133 | 141 | | |||
134 | void WorksheetEntry::insertTextEntryBefore() | 142 | void WorksheetEntry::insertTextEntryBefore() | ||
135 | { | 143 | { | ||
136 | worksheet()->insertTextEntryBefore(this); | 144 | worksheet()->insertTextEntryBefore(this); | ||
137 | } | 145 | } | ||
138 | 146 | | |||
147 | void WorksheetEntry::insertMarkdownEntryBefore() | ||||
148 | { | ||||
149 | worksheet()->insertMarkdownEntryBefore(this); | ||||
150 | } | ||||
151 | | ||||
139 | void WorksheetEntry::insertLatexEntryBefore() | 152 | void WorksheetEntry::insertLatexEntryBefore() | ||
140 | { | 153 | { | ||
141 | worksheet()->insertLatexEntryBefore(this); | 154 | worksheet()->insertLatexEntryBefore(this); | ||
142 | } | 155 | } | ||
143 | 156 | | |||
144 | void WorksheetEntry::insertImageEntryBefore() | 157 | void WorksheetEntry::insertImageEntryBefore() | ||
145 | { | 158 | { | ||
146 | worksheet()->insertImageEntryBefore(this); | 159 | worksheet()->insertImageEntryBefore(this); | ||
▲ Show 20 Lines • Show All 645 Lines • Show Last 20 Lines |