Skip to content

Commit

Permalink
ENH: Changes to use enaml gui creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdill committed Dec 11, 2014
1 parent bfe7524 commit 8d7774a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
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

0 comments on commit 8d7774a

Please sign in to comment.