[kde-guidelines] About code snippets

Thomas Pfeiffer colomar at autistici.org
Wed Jun 26 17:36:35 UTC 2013


On Wednesday 26 June 2013 18:48:16 Aurélien Gâteau wrote:
> Was thinking about code snippets lately. I am not sure they are going to
> happen, as it's a lot of work to create and maintain. An alternative would
> be to list relevant C++ classes and point to their documentation, which
> often comes with code snippets (at least for Qt classes, it's less true for
> KDE classes).
> 
> So for example in the ListView page, there would be a section like this:
> 
> ---
> = C++ classes =
> 
> * [http://qt-project.org/doc/qt-4.8/qlistview.html|QListView]: single-column
> list
> * [http://qt-project.org/doc/qt-4.8/qtreeview.html|QTreeView]: multi-column
> list
> ---
> 
> This would still be helpful for developers, especially when the class name
> is not intuitive (example QTreeView for multi-column lists, or
> KActionSelector for the two-list pattern) and we can easily update it to
> include QtQuick controls when it makes sense to do so.
> 
> What do you think?

In the Active HIG we use rather minimalistic code snippets for the components 
(see
http://community.kde.org/Plasma/Active/Development/ActiveHIG/TaskDialogs#Code_to_Implement_the_Task_Dialog
for example). Do you think something like that would be feasible and useful?


More information about the kde-guidelines mailing list