-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from funkelab/flip_treeview
implement button to flip the tree view axes
- Loading branch information
Showing
2 changed files
with
90 additions
and
25 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/motile_plugin/data_views/views/tree_view/flip_axes_widget.py
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,29 @@ | ||
from psygnal import Signal | ||
from qtpy.QtWidgets import QGroupBox, QPushButton, QVBoxLayout, QWidget | ||
|
||
|
||
class FlipTreeWidget(QWidget): | ||
"""Widget to flip the axis of the tree view""" | ||
|
||
flip_tree = Signal() | ||
|
||
def __init__(self): | ||
super().__init__() | ||
|
||
flip_layout = QVBoxLayout() | ||
display_box = QGroupBox("Plot axes [F]") | ||
flip_button = QPushButton("Flip") | ||
flip_button.clicked.connect(self.flip) | ||
flip_layout.addWidget(flip_button) | ||
display_box.setLayout(flip_layout) | ||
|
||
layout = QVBoxLayout() | ||
layout.addWidget(display_box) | ||
self.setLayout(layout) | ||
display_box.setMaximumWidth(90) | ||
display_box.setMaximumHeight(82) | ||
|
||
def flip(self): | ||
"""Send a signal to flip the axes of the plot""" | ||
|
||
self.flip_tree.emit() |
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