mirror of
https://github.com/shizand/statapp.git
synced 2024-12-23 12:12:59 +03:00
fix: добавлены иконки во все окна (#67)
Closes #65 --------- Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
This commit is contained in:
parent
1d76b7cb76
commit
9310a5e622
@ -18,7 +18,9 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
import sys
|
||||
from PySide2.QtGui import QMovie
|
||||
|
||||
from PySide2.QtCore import QSize
|
||||
from PySide2.QtGui import QMovie, QIcon
|
||||
from PySide2.QtWidgets import QMainWindow
|
||||
|
||||
from statapp.ui.ui_about_window import Ui_AboutWindow
|
||||
@ -47,3 +49,7 @@ class AboutWindow(QMainWindow):
|
||||
|
||||
version = importlib_metadata.version(__package__ or __name__)
|
||||
self.ui.versionLabel.setText(f"Версия: {version}")
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
@ -17,11 +17,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from PySide2.QtCore import QSize
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||
|
||||
from statapp.calculations import correlation_analysis
|
||||
from statapp.models.correlation_analysis_model import CorrelationAnalysisModel
|
||||
from statapp.ui.ui_correlation_analysis_window import Ui_CorrelationAnalysisWindow
|
||||
from statapp.utils import resource_path
|
||||
|
||||
|
||||
class СorrelationAnalysisWindow(QDialog):
|
||||
@ -35,3 +38,7 @@ class СorrelationAnalysisWindow(QDialog):
|
||||
self.ui.tableView.setModel(self.model)
|
||||
header = self.ui.tableView.horizontalHeader()
|
||||
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
@ -17,12 +17,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from PySide2.QtCore import Slot
|
||||
from PySide2.QtCore import Slot, QSize
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import QDialog
|
||||
|
||||
from statapp.ui.ui_generate_factor_window import Ui_GenerateFactorWindow
|
||||
from statapp.models.combobox_model import ComboBoxModel
|
||||
|
||||
from statapp.utils import resource_path
|
||||
|
||||
DIRECT_LINK = 0
|
||||
INDIRECT_LINK = 1
|
||||
@ -43,6 +44,10 @@ class GenerateFactorWindow(QDialog):
|
||||
self.ui.setupUi(self)
|
||||
self.ui.typeComboBox.setModel(self._typeComboBox)
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
||||
@Slot()
|
||||
def on_generatePushButton_clicked(self):
|
||||
self.typeConnection = self._typeComboBox.rawData(self.ui.typeComboBox.currentIndex())[0]
|
||||
|
@ -17,10 +17,12 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from PySide2.QtCore import Slot
|
||||
from PySide2.QtCore import Slot, QSize
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import QDialog
|
||||
|
||||
from statapp.ui.ui_generate_window import Ui_GenerateWindow
|
||||
from statapp.utils import resource_path
|
||||
|
||||
|
||||
class GenerateWindow(QDialog):
|
||||
@ -32,6 +34,11 @@ class GenerateWindow(QDialog):
|
||||
self.ui = Ui_GenerateWindow()
|
||||
self.ui.setupUi(self)
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
||||
|
||||
@Slot()
|
||||
def on_generatePushButton_clicked(self):
|
||||
|
||||
|
@ -43,6 +43,7 @@ class MainWindow(QMainWindow):
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
||||
self.ui.generateXaction.setEnabled(False)
|
||||
self.ui.varianceAnalysisAction.setEnabled(False)
|
||||
@ -110,6 +111,7 @@ class MainWindow(QMainWindow):
|
||||
@Slot()
|
||||
def on_generateYaction_triggered(self):
|
||||
gw = GenerateWindow()
|
||||
|
||||
if gw.exec():
|
||||
y = np.random.normal(gw.mat, gw.deviation, size=(gw.count, 1))
|
||||
self.model.updateAllData(y.round(2))
|
||||
@ -136,11 +138,6 @@ class MainWindow(QMainWindow):
|
||||
def on_aboutmenuaction_triggered(self):
|
||||
global about_window
|
||||
about_window = AboutWindow()
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
about_window.setWindowIcon(icon)
|
||||
|
||||
about_window.show()
|
||||
|
||||
@Slot()
|
||||
|
@ -17,11 +17,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from PySide2.QtCore import QSize
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||
|
||||
from statapp.calculations import variance_analysis
|
||||
from statapp.models.variance_analysis_model import VarianceAnalysisModel
|
||||
from statapp.ui.ui_variance_analysis_window import Ui_VarianceAnalysisWindow
|
||||
from statapp.utils import resource_path
|
||||
|
||||
|
||||
class VarianceAnalysisWindow(QDialog):
|
||||
@ -35,3 +38,7 @@ class VarianceAnalysisWindow(QDialog):
|
||||
self.ui.tableView.setModel(self.model)
|
||||
header = self.ui.tableView.horizontalHeader()
|
||||
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||
|
||||
icon = QIcon()
|
||||
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||
self.setWindowIcon(icon)
|
||||
|
Loading…
Reference in New Issue
Block a user