Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1d112c6d authored by Bhushan Shah's avatar Bhushan Shah 📱

Merge branch 'doxylink' into 'master'

Added Doxylink and initial API Links

See merge request websites/hig-kde-org!17
parents d86380c1 0b49032b
......@@ -2,3 +2,4 @@
build
*.qmlc
*.jsc
*.tag
This diff is collapsed.
This diff is collapsed.
......@@ -151,6 +151,8 @@ Code
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: InlineMessage <InlineMessage>`
.. code-block:: qml
...
......@@ -176,3 +178,8 @@ Kirigami
}
]
}
Qt Widgets
~~~~~~~~~~
- :kwidgetsaddonsapi:`QtWidgets: KMessageWidget <KMessageWidget>`
......@@ -55,3 +55,17 @@ Appearance
- if tips describe comprehensive functions,
- when content is lengthy and formatting improves readability
- for tips that are implemented primarily for joy of use.
Code
----
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: ApplicationWindow <ApplicationWindow>`
- `QML: MenuBar <https://doc.qt.io/qt-5/qml-qtquick-controls-menubar.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma ToolTip <ToolTip>`
......@@ -84,3 +84,14 @@ Here are some general recommendations for card layouts:
.. image:: /img/Card2.qml.png
:alt: Padding for text and buttons
Code
----
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: Card <Card>`
- :kirigamiapi:`Kirigami: CardsGridView <CardsGridView>`
- :kirigamiapi:`Kirigami: CardsLayout <CardsLayout>`
- :kirigamiapi:`Kirigami: CardsListView <CardsListView>`
......@@ -197,3 +197,16 @@ like , that will take care of lay outing and spacing of your controls.
for checkbox items.
- Do not use ending punctuation (neither dot nor colon) for group
label.
Code
----
Kirigami
~~~~~~~~
- `QML: CheckBox <https://doc.qt.io/qt-5/qml-qtquick-controls-checkbox.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma CheckBox <CheckBox>`
......@@ -78,3 +78,16 @@ Appearance
- Create a buddy relation so access keys are assigned.
- End each label with a colon.
- Use :doc:`sentence style capitalization </style/writing/capitalization>` for items.
Code
----
Kirigami
~~~~~~~~
- `QML: ComboBox <https://doc.qt.io/qt-5/qml-qtquick-controls-combobox.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma ComboBox <ComboBox>`
......@@ -85,3 +85,16 @@ Appearance
- Create a buddy relation so access keys are assigned.
- End each label with a colon.
- Use :doc:`sentence style capitalization </style/writing/capitalization>` for items.
Code
----
Kirigami
~~~~~~~~
- `QML: ComboBox <https://doc.qt.io/qt-5/qml-qtquick-controls-combobox.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma ComboBox <ComboBox>`
......@@ -34,3 +34,12 @@ Appearance
- Overlay buttons are placed at the bottom right corner
- Grid has a PaperWhite background on desktop, an no background on
mobile
Code
----
Kirigami
~~~~~~~~
- `QML: GridView <https://doc.qt.io/qt-5/qml-qtquick-gridview.html>`_
- :kirigamiapi:`Kirigami: CardsGridView <CardsGridView>`
......@@ -290,6 +290,12 @@ Code
Kirigami
~~~~~~~~
- `QML: ListView <https://doc.qt.io/qt-5/qml-qtquick-listview.html>`_
- :kirigamiapi:`Kirigami: CardsListView <CardsListView>`
- :kirigamiapi:`Kirigami: AbstractListItem <AbstractListItem>`
- :kirigamiapi:`Kirigami: BasicListItem <BasicListItem>`
- :kirigamiapi:`Kirigami: SwipeListItem <SwipeListItem>`
.. code-block:: qml
...
......@@ -343,3 +349,8 @@ Kirigami
...
}
...
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma ListItem <ListItem>`
......@@ -177,3 +177,17 @@ which will take care of laying out and spacing of your controls.
for radio buttons.
- Do not use ending punctuation (neither dot nor colon) for group
label.
Code
----
Kirigami
~~~~~~~~
- `QML: RadioButton
<https://doc.qt.io/qt-5/qml-qtquick-controls-radiobutton.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma RadioButton <RadioButton>`
......@@ -111,3 +111,16 @@ Slider and Spinbox together
the label that should give focus directly to the spin box.
- Mark significant values along the length of the slider with text or
tick marks.
Code
----
Kirigami
~~~~~~~~
- `QML: Slider <https://doc.qt.io/qt-5/qml-qtquick-controls-slider.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma Slider <Slider>`
......@@ -63,3 +63,16 @@ Appearance
the user might want to compare two numerical values in the same
column of controls. In this case, ensure the right edges of the
relevant controls are also aligned.
Code
----
Kirigami
~~~~~~~~
- `QML: SpinBox <https://doc.qt.io/qt-5/qml-qtquick-controls2-spinbox.html>`_
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma SpinBox <SpinBox>`
......@@ -72,6 +72,9 @@ Code
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: Action <Action>`
- :kirigamiapi:`Kirigami: ScrollablePage <ScrollablePage>`
.. code-block:: qml
...
......
......@@ -24,16 +24,19 @@ The Context Drawer is used to access controls that depend on the current
context. This can be, for example, controls that affect a selected
element in a list or that navigate through an opened document.
Is this the right control?
--------------------------
Guidelines
----------
Is this the right control
~~~~~~~~~~~~~~~~~~~~~~~~~
Use a Context Drawer if your application has any functions which are
only relevant in specific contexts, and which are not central enough to
the application's main purpose to put them in the main user interface or
in a toolbar. For actions which are always available, use the :doc:`Global Drawer <globaldrawer>`.
Guidelines
----------
Behavior
~~~~~~~~
- The Context Drawer is opened by swiping in from the left or right
edge of the screen (depending on a system-wide setting) and closed by
......@@ -66,7 +69,10 @@ Code
----
Kirigami
^^^^^^^^
~~~~~~~~
- :kirigamiapi:`Kirigami: Action <Action>`
- :kirigamiapi:`Kirigami: ScrollablePage <ScrollablePage>`
.. code-block:: qml
......
Global drawer
=============
Purpose
-------
The Global Drawer is a standard element in KDE mobile applications. It
contains an application's main menu, and any functions which are not
part of the application's main usecases but are not specific to the
current context either.
.. container:: intend
|desktopicon| |mobileicon|
......@@ -17,16 +25,11 @@ Global drawer
Global drawer on mobile
Purpose
-------
The Global Drawer is a standard element in KDE mobile applications. It
contains an application's main menu, and any functions which are not
part of the application's main usecases but are not specific to the
current context either.
Guidelines
----------
Is this the right control?
--------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. figure:: /img/Globaldrawer3.png
:figclass: border
......@@ -41,8 +44,8 @@ the main user interface, and which are not dependent on the current
context. For context-specific actions (e.g. those affecting a selected
item), use the :doc:`Context Drawer <contextdrawer>`
Guidelines
----------
Behavior
~~~~~~~~
.. figure:: /img/Globaldrawer2.png
:alt: Global drawer on desktop
......@@ -79,7 +82,7 @@ The main menu
Do not use the Menu Drawer for navigation purposes.
|desktopicon| Collapsible
^^^^^^^^^^^^^^^^^^^^^^^^^
"""""""""""""""""""""""""
On the desktop, if the elements in the Global Drawer need to be accessed more
often and enough space is available, the Global Drawer can default to showing a
......@@ -99,7 +102,9 @@ Code
----
Kirigami
^^^^^^^^
~~~~~~~~
- :kirigamiapi:`Kirigami: GlobalDrawer <GlobalDrawer>`
.. code-block:: qml
......
......@@ -86,6 +86,9 @@ Code
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: ApplicationWindow <ApplicationWindow>`
- `QML: MenuBar <https://doc.qt.io/qt-5/qml-qtquick-controls-menubar.html>`_
.. code-block:: qml
...
......
......@@ -102,8 +102,13 @@ Code
Kirigami
~~~~~~~~
- :kirigamiapi:`Kirigami: Action <Action>`
- :kirigamiapi:`Kirigami: ScrollablePage <ScrollablePage>`
- :kirigamiapi:`Kirigami: ActionToolBar <ActionToolBar>`
Application toolbar
^^^^^^^^^^^^^^^^^^^
"""""""""""""""""""
.. code-block:: qml
......@@ -158,3 +163,8 @@ Component toolbar
...
}
...
Plasma components
~~~~~~~~~~~~~~~~~
- :plasmaapi:`Plasma ToolBar <ToolBar>`
......@@ -17,9 +17,12 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from sphinx.util.console import bold
import requests
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
......@@ -31,7 +34,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.todo']
extensions = ['sphinx.ext.todo', 'sphinxcontrib.doxylink']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......@@ -198,6 +201,19 @@ rst_epilog = """
"""
doxylink = {
'kirigamiapi' : ('Kirigami2.tags', 'https://api.kde.org/frameworks/kirigami/html/'), # https://api.kde.org/frameworks/kirigami/html/Kirigami2.tags
'kwidgetsaddonsapi' : ('KWidgetsAddons.tags', 'https://api.kde.org/frameworks/kwidgetsaddons/html/'), # https://api.kde.org/frameworks/kwidgetsaddons/html/KWidgetsAddons.tags
'plasmaapi' : ('Plasma.tags', 'https://api.kde.org/frameworks/plasma-framework/html/') # https://api.kde.org/frameworks/plasma-framework/html/Plasma.tags
}
for doc in doxylink.values():
print(bold("Downloading file {} to {}".format(doc[1] + "/" + doc[0], doc[0])))
tagFile = open("../" + doc[0], "w")
tagFile.write(requests.get(doc[1] + "/" + doc[0]).text)
tagFile.close()
rst_prolog = """
.. role:: iconred
.. role:: plasmablue
......
......@@ -145,17 +145,13 @@ Component
Kirigami
~~~~~~~~
Example code how to use the component with QML and Kirigami.
Link to the API and example code how to use the component with QML and
Kirigami.
Qt Widgets
~~~~~~~~~~
Example code how to use the component with Qt Widgets.
API
~~~
Link to KDE and Qt API pages.
Link to the API and example code how to use the component with Qt Widgets.
Optional: you can add subsections for desktop and mobile.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment