Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateview.h
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Line(s) | 196 | public: | |||
---|---|---|---|---|---|
198 | QVariant configValue(const QString &key) override; | 198 | QVariant configValue(const QString &key) override; | ||
199 | void setConfigValue(const QString &key, const QVariant &value) override; | 199 | void setConfigValue(const QString &key, const QVariant &value) override; | ||
200 | 200 | | |||
201 | Q_SIGNALS: | 201 | Q_SIGNALS: | ||
202 | void configChanged(); | 202 | void configChanged(); | ||
203 | 203 | | |||
204 | public: | 204 | public: | ||
205 | /** | 205 | /** | ||
206 | * Try to fold starting at the given line. | 206 | * Try to fold an unfolded range starting at @p line | ||
207 | * This will both try to fold existing folding ranges of this line and to query the highlighting what to fold. | 207 | * @return the new folded range on success, otherwise an unvalid range | ||
208 | * @param startLine start line to fold at | | |||
209 | */ | 208 | */ | ||
210 | void foldLine(int startLine); | 209 | KTextEditor::Range foldLine(int line); | ||
211 | 210 | | |||
212 | /** | 211 | /** | ||
213 | * Try to unfold all foldings starting at the given line. | 212 | * Try to unfold a folded range starting at @p line | ||
214 | * @param startLine start line to unfold at | 213 | * @return true when a range was unfolded, otherwise false | ||
215 | */ | 214 | */ | ||
216 | void unfoldLine(int startLine); | 215 | bool unfoldLine(int line); | ||
216 | | ||||
217 | /** | ||||
218 | * Try to toggle the folding state of a range starting at line @p line | ||||
219 | * @return true when the line was toggled, false when not | ||||
220 | */ | ||||
221 | bool toggleFoldingOfLine(int line); | ||||
222 | | ||||
223 | /** | ||||
224 | * Try to change all the foldings inside a folding range starting at @p line | ||||
225 | * but not the range itself starting there. | ||||
226 | * However, should the range itself be folded, will only the range unfolded | ||||
227 | * and the containing ranges kept untouched. | ||||
228 | * Should the range not contain other ranges will the range itself folded, | ||||
229 | * @return true when any range was folded or unfolded, otherwise false | ||||
230 | */ | ||||
231 | bool toggleFoldingsInRange(int line); | ||||
217 | 232 | | |||
218 | // | 233 | // | ||
219 | // KTextEditor::CodeCompletionInterface2 | 234 | // KTextEditor::CodeCompletionInterface2 | ||
220 | // | 235 | // | ||
221 | public: | 236 | public: | ||
222 | bool isCompletionActive() const override; | 237 | bool isCompletionActive() const override; | ||
223 | void startCompletion(const KTextEditor::Range &word, KTextEditor::CodeCompletionModel *model) override; | 238 | void startCompletion(const KTextEditor::Range &word, KTextEditor::CodeCompletionModel *model) override; | ||
224 | void abortCompletion() override; | 239 | void abortCompletion() override; | ||
▲ Show 20 Lines • Show All 465 Lines • ▼ Show 20 Line(s) | 700 | private Q_SLOTS: | |||
690 | void slotSaveCanceled(const QString &error); | 705 | void slotSaveCanceled(const QString &error); | ||
691 | void slotConfigDialog(); | 706 | void slotConfigDialog(); | ||
692 | void exportHtmlToClipboard(); | 707 | void exportHtmlToClipboard(); | ||
693 | void exportHtmlToFile(); | 708 | void exportHtmlToFile(); | ||
694 | 709 | | |||
695 | public Q_SLOTS: | 710 | public Q_SLOTS: | ||
696 | void slotFoldToplevelNodes(); | 711 | void slotFoldToplevelNodes(); | ||
697 | void slotExpandToplevelNodes(); | 712 | void slotExpandToplevelNodes(); | ||
698 | void slotCollapseLocal(); | 713 | void slotToggleFolding(); | ||
699 | void slotExpandLocal(); | 714 | void slotToggleFoldingsInRange(); | ||
700 | 715 | | |||
701 | private: | 716 | private: | ||
702 | void setupLayout(); | 717 | void setupLayout(); | ||
703 | void setupConnections(); | 718 | void setupConnections(); | ||
704 | void setupActions(); | 719 | void setupActions(); | ||
705 | void setupEditActions(); | 720 | void setupEditActions(); | ||
706 | void setupCodeFolding(); | 721 | void setupCodeFolding(); | ||
707 | 722 | | |||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |