Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gryphon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Monterey Phoenix
User Interfaces
Gryphon
Commits
d625f626
Commit
d625f626
authored
3 years ago
by
Allen, Bruce (CIV)
Browse files
Options
Downloads
Patches
Plain Diff
split settings menu out from grpah pane menu
parent
720d4f45
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/graph_pane_menu.py
+18
-0
18 additions, 0 deletions
python/graph_pane_menu.py
python/gui_manager.py
+9
-5
9 additions, 5 deletions
python/gui_manager.py
python/settings_appearance_menu.py
+11
-15
11 additions, 15 deletions
python/settings_appearance_menu.py
with
38 additions
and
20 deletions
python/graph_pane_menu.py
0 → 100644
+
18
−
0
View file @
d625f626
from
PyQt5.QtWidgets
import
QMenu
"""
Provides the graph pane menu.
"""
def
make_graph_pane_menu
(
gui_manager
):
menu
=
QMenu
(
"
&Code editor
"
)
menu
.
addAction
(
gui_manager
.
graphs_manager
.
action_show_hidden_components
)
menu
.
addAction
(
gui_manager
.
graphs_manager
.
action_show_hidden_components_all_graphs
)
menu
.
addSeparator
()
menu
.
addAction
(
gui_manager
.
action_zoom_in
)
menu
.
addAction
(
gui_manager
.
action_zoom_out
)
return
menu
This diff is collapsed.
Click to expand it.
python/gui_manager.py
+
9
−
5
View file @
d625f626
...
...
@@ -30,7 +30,8 @@ from mp_code_manager import MPCodeManager
from
mp_code_view
import
MPCodeView
from
code_editor_menu
import
make_code_editor_menu
from
gry_manager
import
GryManager
from
settings_graph_pane_menu
import
SettingsGraphPaneMenu
from
settings_appearance_menu
import
SettingsAppearanceMenu
from
graph_pane_menu
import
make_graph_pane_menu
from
export_trace_manager
import
ExportTraceManager
from
mp_logger
import
set_logger_targets
,
log
,
clear_log
from
mp_style
import
mp_menu_button
...
...
@@ -420,6 +421,11 @@ class GUIManager(QObject):
self
.
settings_menu
.
addAction
(
self
.
preferences_manager
.
action_use_dark_mode
)
# menu | settings | appearance
self
.
settings_appearance_menu
=
SettingsAppearanceMenu
(
self
.
w
,
self
.
settings_manager
,
self
.
graphs_manager
)
self
.
settings_menu
.
addMenu
(
self
.
settings_appearance_menu
)
# menu | settings | separator
self
.
settings_menu
.
addSeparator
()
...
...
@@ -429,10 +435,8 @@ class GUIManager(QObject):
self
.
settings_menu
.
addMenu
(
self
.
_code_editor_menu
)
# menu | settings | graph pane preferences
self
.
settings_graph_pane_menu
=
SettingsGraphPaneMenu
(
self
.
w
,
self
.
settings_manager
,
self
.
graphs_manager
)
self
.
settings_menu
.
addMenu
(
self
.
settings_graph_pane_menu
.
graph_pane_menu
)
self
.
graph_pane_menu
=
make_graph_pane_menu
(
self
)
self
.
settings_menu
.
addMenu
(
self
.
graph_pane_menu
)
# menu | settings | graph list navigation pane preferences
self
.
settings_menu
.
addMenu
(
self
.
preferences_manager
.
graph_list_menu
)
...
...
This diff is collapsed.
Click to expand it.
python/settings_
graph_p
ane_menu.py
→
python/settings_
appear
an
c
e_menu.py
+
11
−
15
View file @
d625f626
...
...
@@ -8,10 +8,11 @@ from settings_dialog_wrapper import SettingsDialogWrapper
from
message_popup
import
message_popup
"""
Provides the graph pane settings menu and some
associated
actions.
Provides the graph pane settings menu and some actions.
"""
class
SettingsGraphPaneMenu
(
QObject
):
# extends QMenu
class
SettingsAppearanceMenu
(
QMenu
):
@pyqtSlot
()
def
_fill_preset_themes_menu
(
self
):
...
...
@@ -39,7 +40,7 @@ class SettingsGraphPaneMenu(QObject):
"
Error saving graph settings file as default: %s
"
%
str
(
e
))
def
__init__
(
self
,
parent_w
,
settings_manager
,
graphs_manager
):
super
().
__init__
()
super
().
__init__
(
"
&Appearance
"
)
self
.
parent_w
=
parent_w
self
.
settings_manager
=
settings_manager
self
.
graphs_manager
=
graphs_manager
...
...
@@ -83,18 +84,13 @@ class SettingsGraphPaneMenu(QObject):
self
.
_reset_settings
)
# the graph pane menu
self
.
graph_pane_menu
=
QMenu
(
"
&Graph pane
"
)
self
.
graph_pane_menu
.
addMenu
(
self
.
_preset_themes_menu
)
self
.
graph_pane_menu
.
addAction
(
self
.
_action_custom_settings
)
self
.
graph_pane_menu
.
addAction
(
self
.
_action_export_settings
)
self
.
graph_pane_menu
.
addAction
(
self
.
_action_import_settings
)
self
.
graph_pane_menu
.
addAction
(
self
.
_action_default_on_startup
)
self
.
graph_pane_menu
.
addAction
(
self
.
_action_reset_settings
)
self
.
graph_pane_menu
.
addSeparator
()
self
.
graph_pane_menu
.
addAction
(
self
.
graphs_manager
.
action_show_hidden_components
)
self
.
graph_pane_menu
.
addAction
(
self
.
graphs_manager
.
action_show_hidden_components_all_graphs
)
self
.
addMenu
(
self
.
_preset_themes_menu
)
self
.
addAction
(
self
.
_action_custom_settings
)
self
.
addAction
(
self
.
_action_export_settings
)
self
.
addAction
(
self
.
_action_import_settings
)
self
.
addAction
(
self
.
_action_default_on_startup
)
self
.
addSeparator
()
self
.
addAction
(
self
.
_action_reset_settings
)
def
_open_settings_editor
(
self
):
if
not
self
.
_settings_dialog_wrapper
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment