-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hailin Wang
committed
Jul 23, 2022
1 parent
31239b0
commit b1c7b37
Showing
3 changed files
with
217 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |