Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Changes to use enaml gui creation #42

Merged
merged 1 commit into from
Dec 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vttools/vtmods/import_lists/modules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import_modules:
vttools.vtmods:
- .io
- .vis
# - .utils
# - .broker
- .utils
- .broker
- .fitting

# list of functions to autowrap
Expand Down
13 changes: 13 additions & 0 deletions vttools/vtmods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
from .broker import search
import numpy as np
from metadataStore.utilities.utility import get_data_keys
import enaml
from enaml.qt.qt_application import QtApplication
import logging
logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -153,6 +155,13 @@ def search_databroker(search_dict):
# unique_id_func=gen_unique_id)


from bubblegum.xrf.model.xrf_model import XRF
with enaml.imports():
from bubblegum.xrf.view.xrf_view import XrfGui

xrf_view = XrfGui()
xrf_view.xrf_model = XRF()

def setup_bnl_menu():
"""
Creates and hooks up a BNL specific menu in the main window
Expand All @@ -162,10 +171,14 @@ def setup_bnl_menu():
menu_bar = bw.menuBar()

bnl_menu = menu_bar.addMenu("BNL")
print('\n\n\n\n\n\nBNL Menu Added\n\n\n\n\n\n\n\n\n')

def foo():
print('menu bar clicked!')
# query_window.show()
xrf_view.show()


bnl_menu.addAction("demo", foo)


Expand Down