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

Rename QtBrainChartGUI to NiBAx #143

Merged
merged 1 commit into from
Dec 22, 2021
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
2 changes: 1 addition & 1 deletion QtBrainChartGUI/__init__.py → NiBAx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from PyQt5 import QtCore, QtGui, QtWidgets
import argparse
import os, sys
from QtBrainChartGUI.mainwindow import MainWindow
from NiBAx.mainwindow import MainWindow

def main():
parser = argparse.ArgumentParser(description='iSTAGING Data Visualization and Preparation')
Expand Down
2 changes: 1 addition & 1 deletion QtBrainChartGUI/aboutdialog.py → NiBAx/aboutdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from PyQt5 import QtCore, QtWidgets, uic
import os
from QtBrainChartGUI.resources import resources
from NiBAx.resources import resources

class AboutDialog(QtWidgets.QDialog):
def __init__(self,parent=None):
Expand Down
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions NiBAx/core/gui/SearchableQComboBox.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This Python file uses the following encoding: utf-8
"""
Author: Ashish Singh
contact: software@cbica.upenn.edu
Copyright (c) 2018 University of Pennsylvania. All rights reserved.
Use of this source code is governed by license located in license file: https://github.com/CBICA/BrainChart/blob/main/LICENSE
"""
from PyQt5 import QtCore, QtWidgets

class SearchableQComboBox(QtWidgets.QComboBox):
def __init__(self, parent=None):
super(SearchableQComboBox, self).__init__(parent)

self.setFocusPolicy(QtCore.Qt.StrongFocus)
self.setEditable(True)

# add a filter model to filter matching items
self.pFilterModel = QtCore.QSortFilterProxyModel(self)
self.pFilterModel.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive)
self.pFilterModel.setSourceModel(self.model())

# add a completer, which uses the filter model
self.completer = QtWidgets.QCompleter(self.pFilterModel, self)
# always show all (filtered) completions
self.completer.setCompletionMode(QtWidgets.QCompleter.UnfilteredPopupCompletion)
self.setCompleter(self.completer)

# connect signals
self.lineEdit().textEdited.connect(self.pFilterModel.setFilterFixedString)
self.completer.activated.connect(self.on_completer_activated)


# on selection of an item from the completer, select the corresponding item from combobox
def on_completer_activated(self, text):
if text:
index = self.findText(text)
self.setCurrentIndex(index)
self.activated[str].emit(self.itemText(index))


# on model change, update the models of the filter and completer as well
def setModel(self, model):
super(SearchableQComboBox, self).setModel(model)
self.pFilterModel.setSourceModel(model)
self.completer.setModel(self.pFilterModel)


# on model column change, update the model column of the filter and completer as well
def setModelColumn(self, column):
self.completer.setCompletionColumn(column)
self.pFilterModel.setFilterKeyColumn(column)
super(SearchableQComboBox, self).setModelColumn(column)

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import joblib
from PyQt5.QtCore import QObject, pyqtSignal
from PyQt5 import QtCore
from QtBrainChartGUI.core import iStagingLogger
from NiBAx.core import iStagingLogger

logger = iStagingLogger.get_logger(__name__)

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions QtBrainChartGUI/mainwindow.py → NiBAx/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
from yapsy.IPlugin import IPlugin
import os, sys
#from BrainChart.dataio import DataIO
from QtBrainChartGUI.core.model.datamodel import DataModel
from NiBAx.core.model.datamodel import DataModel
from .aboutdialog import AboutDialog
from QtBrainChartGUI.resources import resources
from NiBAx.resources import resources
from PyQt5.QtWidgets import QAction
import pandas as pd
from QtBrainChartGUI.core.baseplugin import BasePlugin
from QtBrainChartGUI.core import iStagingLogger
from NiBAx.core.baseplugin import BasePlugin
from NiBAx.core import iStagingLogger

logger = iStagingLogger.get_logger(__name__)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
from PyQt5 import QtGui, QtCore, QtWidgets, uic
import sys, os
import neuroHarmonize as nh
from QtBrainChartGUI.core.baseplugin import BasePlugin
from NiBAx.core.baseplugin import BasePlugin

import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from QtBrainChartGUI.core.plotcanvas import PlotCanvas
from QtBrainChartGUI.core.gui.SearchableQComboBox import SearchableQComboBox
from NiBAx.core.plotcanvas import PlotCanvas
from NiBAx.core.gui.SearchableQComboBox import SearchableQComboBox

class AgeTrends(QtWidgets.QWidget,BasePlugin):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import seaborn as sns
import numpy as np
import pandas as pd
from QtBrainChartGUI.core.plotcanvas import PlotCanvas
from QtBrainChartGUI.core.baseplugin import BasePlugin
from QtBrainChartGUI.core.gui.SearchableQComboBox import SearchableQComboBox
from NiBAx.core.plotcanvas import PlotCanvas
from NiBAx.core.baseplugin import BasePlugin
from NiBAx.core.gui.SearchableQComboBox import SearchableQComboBox

class computeSPAREs(QtWidgets.QWidget,BasePlugin):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from PyQt5 import QtGui, QtCore, QtWidgets, uic
import sys, os
import pandas as pd
from QtBrainChartGUI.plugins.data.dataio import DataIO
from NiBAx.plugins.data.dataio import DataIO
import dtale
from QtBrainChartGUI.core.baseplugin import BasePlugin
from QtBrainChartGUI.core import iStagingLogger
from NiBAx.core.baseplugin import BasePlugin
from NiBAx.core import iStagingLogger

logger = iStagingLogger.get_logger(__name__)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pandas as pd
import joblib
import os, sys
from QtBrainChartGUI.core import iStagingLogger
from NiBAx.core import iStagingLogger

logger = iStagingLogger.get_logger(__name__)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5.QtGui import *
from PyQt5 import QtGui, QtCore, QtWidgets, uic
import sys, os
from QtBrainChartGUI.core.baseplugin import BasePlugin
from NiBAx.core.baseplugin import BasePlugin

class DataCharacteristics(QtWidgets.QWidget,BasePlugin):
priority = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import matplotlib.patches as pat
import numpy as np
import pandas as pd
from QtBrainChartGUI.core.plotcanvas import PlotCanvas
from QtBrainChartGUI.core.baseplugin import BasePlugin
from QtBrainChartGUI.core.gui.SearchableQComboBox import SearchableQComboBox
from NiBAx.core.plotcanvas import PlotCanvas
from NiBAx.core.baseplugin import BasePlugin
from NiBAx.core.gui.SearchableQComboBox import SearchableQComboBox

class Harmonization(QtWidgets.QWidget,BasePlugin):

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
3 changes: 3 additions & 0 deletions NiBAx/resources/workflow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
long_description=readme,
long_description_content_type="text/markdown",
entry_points = {
'console_scripts': ['BrainChart=BrainChart:main',
'QtBrainChart=QtBrainChartGUI:main']}
'console_scripts': ['NiBAx=NiBAx:main']}
)