Skip to content

Commit

Permalink
Add User Manual
Browse files Browse the repository at this point in the history
  • Loading branch information
Hailin Wang committed Jul 23, 2022
1 parent 31239b0 commit b1c7b37
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PyQtRibbon is a Qt-based application framework for building user interfaces.

getting-started
ribbon
tutorials
user
references

Indices and tables
Expand Down
26 changes: 0 additions & 26 deletions docs/source/tutorials.rst

This file was deleted.

216 changes: 216 additions & 0 deletions docs/source/user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
===========
User Manual
===========

Instantiating a RibbonBar
-------------------------

:py:class:`~ribbon.ribbonbar.RibbonBar` is the main class for creating a ribbon bar.

To begin with, you have to initialize your PyQt application.

Using the RibbonBar
~~~~~~~~~~~~~~~~~~~

:py:class:`~ribbon.ribbonbar.RibbonBar` is a class that implements a ribbon bar, you can use it to create a ribbon bar.

.. literalinclude:: tutorial-ribbonbar.py
:language: python

It would be rendered as follows:

.. image:: _images/example.png
:align: center
:width: 100%

Using the RibbonMainWindow
~~~~~~~~~~~~~~~~~~~~~~~~~~

Alternatively, you can use the :py:class:`~ribbon.mainwindow.RibbonMainWindow` which is a QMainWindow that has a ribbon bar.

.. literalinclude:: tutorial-mainwindow.py
:language: python

Customize Ribbon Bar
--------------------

General Setups
~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.setRibbonStyle
RibbonBar.ribbonHeight
RibbonBar.setRibbonHeight
RibbonBar.showRibbon
RibbonBar.hideRibbon
RibbonBar.ribbonVisible
RibbonBar.setRibbonVisible

Setup Application Button
~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.applicationOptionButton
RibbonBar.setApplicationIcon
RibbonBar.addApplicationOptionAction

Setup Title
~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.title
RibbonBar.setTitle

Setup Category Tab Bar
~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.tabBar
RibbonBar.tabBarHeight
RibbonBar.setTabBarHeight

Setup Quick Access Bar
~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.quickAccessToolBar
RibbonBar.addQuickAccessButton
RibbonBar.setQuickAccessButtonHeight

Setup Right Tool Bar
~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.rightToolBar
RibbonBar.addRightToolButton
RibbonBar.setRightToolBarHeight
RibbonBar.setHelpButtonIcon
RibbonBar.removeHelpButton
RibbonBar.collapseRibbonButton
RibbonBar.setCollapseButtonIcon
RibbonBar.removeCollapseButton

Manage Categories
~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.ribbonbar

.. autosummary::

RibbonBar.categories
RibbonBar.addCategory
RibbonBar.addNormalCategory
RibbonBar.addContextCategory
RibbonBar.showContextCategory
RibbonBar.hideContextCategory
RibbonBar.removeCategory
RibbonBar.setCurrentCategory

Customize Categories
--------------------

Setup Styles
~~~~~~~~~~~~

.. currentmodule:: ribbon.category

.. autosummary::

RibbonCategory.categoryStyle
RibbonCategory.setCategoryStyle

Manage Panels
~~~~~~~~~~~~~

.. currentmodule:: ribbon.category

.. autosummary::

RibbonCategory.addPanel
RibbonCategory.removePanel
RibbonCategory.panel
RibbonCategory.takePanel

Customize Panels
----------------

Setup Title Label
~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.panel

.. autosummary::

RibbonPanel.titleText
RibbonPanel.setTitleText

Setup Panel Option Button
~~~~~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.panel

.. autosummary::

RibbonPanel.panelOptionButton
RibbonPanel.setPanelOptionToolTip

Add Widgets to Panels
~~~~~~~~~~~~~~~~~~~~~

.. currentmodule:: ribbon.panel

.. autosummary::

RibbonPanel.addWidget
RibbonPanel.removeWidget
RibbonPanel.widget
RibbonPanel.addSmallWidget
RibbonPanel.addMediumWidget
RibbonPanel.addLargeWidget
RibbonPanel.addButton
RibbonPanel.addSmallButton
RibbonPanel.addMediumButton
RibbonPanel.addLargeButton
RibbonPanel.addToggleButton
RibbonPanel.addSmallToggleButton
RibbonPanel.addMediumToggleButton
RibbonPanel.addLargeToggleButton
RibbonPanel.addComboBox
RibbonPanel.addFontComboBox
RibbonPanel.addLineEdit
RibbonPanel.addTextEdit
RibbonPanel.addPlainTextEdit
RibbonPanel.addLabel
RibbonPanel.addProgressBar
RibbonPanel.addSlider
RibbonPanel.addSpinBox
RibbonPanel.addDoubleSpinBox
RibbonPanel.addDateEdit
RibbonPanel.addTimeEdit
RibbonPanel.addDateTimeEdit
RibbonPanel.addTableWidget
RibbonPanel.addTreeWidget
RibbonPanel.addListWidget
RibbonPanel.addCalendarWidget
RibbonPanel.addSeparator
RibbonPanel.addHorizontalSeparator
RibbonPanel.addVerticalSeparator
RibbonPanel.addGallery

0 comments on commit b1c7b37

Please sign in to comment.