Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/interfaces/idocumentation.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 54 | /** @returns a widget with all the needed documentation information. | |||
---|---|---|---|---|---|
56 | @param findWidget can be used to tell how do we want to deal with Search | 56 | @param findWidget can be used to tell how do we want to deal with Search | ||
57 | inside the documentation widget. The implementation will have to enable the | 57 | inside the documentation widget. The implementation will have to enable the | ||
58 | widget if it means to support the search feature. | 58 | widget if it means to support the search feature. | ||
59 | */ | 59 | */ | ||
60 | virtual QWidget* documentationWidget(DocumentationFindWidget* findWidget, QWidget* parent = nullptr) = 0; | 60 | virtual QWidget* documentationWidget(DocumentationFindWidget* findWidget, QWidget* parent = nullptr) = 0; | ||
61 | 61 | | |||
62 | virtual IDocumentationProvider* provider() const = 0; | 62 | virtual IDocumentationProvider* provider() const = 0; | ||
63 | 63 | | |||
64 | /** Documentation can override this method if it supports using an external browser. | ||||
65 | * The method should trigger the external browser and return true in that case, | ||||
66 | * or otherwise return false. When using an external browser the documentation | ||||
67 | * toolview is not sollicited at all (i.e. it will not open nor be added to a toolbar). | ||||
68 | * TODO: remove implementation | ||||
69 | */ | ||||
mwolff: do not add non-pure stuff to an interface | |||||
You mean "[please] don't provide an implementation (not even in idocumentation.cpp)"? I'll defer that to when this is getting ready to be accepted. Until then I'll keep the patch footprint and the number of file-changes I have to maintain as small as possible Out of curiosity: is there an interest here not to benefit from the obvious opportunity to set sensible defaults (at least for non-critical features), obliging every descendant to implement the full API which can hardly help keeping code and binary size compact? rjvbb: You mean "[please] don't provide an implementation (not even in idocumentation.cpp)"? I'll… | |||||
70 | virtual bool viewInExternalBrowser() { return false; } | ||||
71 | | ||||
64 | Q_SIGNALS: | 72 | Q_SIGNALS: | ||
65 | void descriptionChanged(); | 73 | void descriptionChanged(); | ||
66 | }; | 74 | }; | ||
67 | 75 | | |||
68 | } | 76 | } | ||
69 | 77 | | |||
70 | Q_DECLARE_METATYPE(KDevelop::IDocumentation::Ptr) | 78 | Q_DECLARE_METATYPE(KDevelop::IDocumentation::Ptr) | ||
71 | 79 | | |||
72 | #endif | 80 | #endif |
do not add non-pure stuff to an interface