diff --git a/pymead/analysis/single_element_inviscid.py b/pymead/analysis/single_element_inviscid.py index 5937471a..d7557505 100644 --- a/pymead/analysis/single_element_inviscid.py +++ b/pymead/analysis/single_element_inviscid.py @@ -1,12 +1,14 @@ -import numpy as np -from numpy import zeros, pi, arctan2, sin, cos, sqrt, log, matmul, NaN, dot -from numpy.linalg import inv -import matplotlib.pyplot as plt -import pandas as pd -from pymead import DATA_DIR import os import time + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd from numba import jit +from numpy import zeros, pi, arctan2, sin, cos, sqrt, log, dot +from numpy.linalg import inv + +from pymead import DATA_DIR @jit(nopython=True, cache=True) diff --git a/pymead/gui/airfoil_statistics.py b/pymead/gui/airfoil_statistics.py index b4fe1b27..6afa4c43 100644 --- a/pymead/gui/airfoil_statistics.py +++ b/pymead/gui/airfoil_statistics.py @@ -1,7 +1,8 @@ import pandas as pd -from PyQt5.QtWidgets import QTextEdit, QDialog, QVBoxLayout +from PyQt5.QtWidgets import QTextEdit from pymead.core.geometry_collection import GeometryCollection +from pymead.gui.input_dialog import PymeadDialog class AirfoilStatistics: @@ -42,12 +43,8 @@ def generate_text_edit_widget(self, parent, **html_kwargs): return text_edit -class AirfoilStatisticsDialog(QDialog): - def __init__(self, parent, airfoil_stats: AirfoilStatistics): - super().__init__(parent=parent) - self.setWindowTitle("Airfoil Statistics") - self.setFont(self.parent().font()) - - layout = QVBoxLayout(self) +class AirfoilStatisticsDialog(PymeadDialog): + def __init__(self, parent, airfoil_stats: AirfoilStatistics, theme: dict): self.stats_widget = airfoil_stats.generate_text_edit_widget(parent=parent, float_format="{:.8f}".format) - layout.addWidget(self.stats_widget) + super().__init__(parent=parent, window_title="Airfoil Statistics", widget=self.stats_widget, + theme=theme) diff --git a/pymead/gui/gui.py b/pymead/gui/gui.py index bd954f85..4ae72def 100644 --- a/pymead/gui/gui.py +++ b/pymead/gui/gui.py @@ -1000,7 +1000,8 @@ def output_link_text(self, text: str, link: str, line_break: bool = False): def display_airfoil_statistics(self): airfoil_stats = AirfoilStatistics(geo_col=self.geo_col) - dialog = AirfoilStatisticsDialog(parent=self, airfoil_stats=airfoil_stats) + dialog = AirfoilStatisticsDialog(parent=self, airfoil_stats=airfoil_stats, + theme=self.themes[self.current_theme]) dialog.exec() def single_airfoil_inviscid_analysis(self, plot_cp: bool):