-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/TEParsons/psychopy-plugin-t…
- Loading branch information
Showing
15 changed files
with
78 additions
and
4 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 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 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
scratch.* | ||
# PyPi | ||
dist/ | ||
build/ | ||
# Google Drive | ||
desktop.ini | ||
# Python environment | ||
|
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,18 @@ | ||
------------------------------- | ||
ExamplePluginRibbonSection | ||
------------------------------- | ||
|
||
When you load PsychoPy, provided you have `psychopy-plugin-template` installed, the ExamplePluginRibbonSection will be added to the Builder, Coder and Runner ribbons. | ||
|
||
|
||
Buttons | ||
------------------------------- | ||
|
||
Example button | ||
This example button will simply open the documentation for `psychopy-plugin-template` in the default browser when clicked. | ||
|
||
|
||
.. autoclass:: psychopy_plugin_template.app.ribbon.ExamplePluginRibbonSection | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
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 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,32 @@ | ||
import wx | ||
from psychopy.app.ribbon import FrameRibbonPluginSection | ||
|
||
|
||
class ExamplePluginRibbonSection(FrameRibbonPluginSection): | ||
def __init__(self, parent): | ||
# initialise the base class | ||
FrameRibbonPluginSection.__init__( | ||
self, parent, name="example", label="Example" | ||
) | ||
# add a button | ||
self.addButton( | ||
"exampleBtn", | ||
label="Example button", | ||
icon="example", | ||
tooltip="Open the documentation for psychopy-plugin-template", | ||
callback=self.openExamplePluginDocs, | ||
style=wx.BU_NOTEXT | ||
) | ||
|
||
def openExamplePluginDocs(self, evt=None): | ||
""" | ||
Button callback to open the docs for psychopy-plugin-template in the default web browser. | ||
Parameters | ||
---------- | ||
evt : wx.Event, optional | ||
The button press event triggering this callback, unused but needs to be accepted as wx will provide it. | ||
""" | ||
import webbrowser | ||
webbrowser.open("https://psychopy.github.io/psychopy-plugin-template") | ||
|
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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