Merge branch 'jgrewe-icons'
@ -10,6 +10,7 @@ import resources
|
|||||||
|
|
||||||
log = config_logging()
|
log = config_logging()
|
||||||
|
|
||||||
|
from . import resources # best created with pyside6-rcc resources.qrc -o resources.py (rcc produces an error...)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 2.2 KiB |
@ -5,5 +5,6 @@
|
|||||||
<file>icons/disconnect.png</file>
|
<file>icons/disconnect.png</file>
|
||||||
<file>icons/record.png</file>
|
<file>icons/record.png</file>
|
||||||
<file>icons/stop.png</file>
|
<file>icons/stop.png</file>
|
||||||
|
<file>icons/relacstuxheader.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
@ -1,5 +1,3 @@
|
|||||||
import pathlib
|
|
||||||
|
|
||||||
from PyQt6.QtGui import QPixmap
|
from PyQt6.QtGui import QPixmap
|
||||||
from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout, QWidget
|
from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout, QWidget
|
||||||
from PyQt6.QtCore import Qt
|
from PyQt6.QtCore import Qt
|
||||||
@ -40,8 +38,7 @@ class About(QWidget):
|
|||||||
rtd_link.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
rtd_link.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||||
|
|
||||||
iconlabel = QLabel()
|
iconlabel = QLabel()
|
||||||
_root = pathlib.Path(__file__).parent.parent
|
pixmap = QPixmap(":/icons/relacstuxheader.png")
|
||||||
pixmap = QPixmap(str(pathlib.Path.joinpath(_root, "icons/relacstuxheader.png")))
|
|
||||||
s = pixmap.size()
|
s = pixmap.size()
|
||||||
new_height = int(s.height() * 300/s.width())
|
new_height = int(s.height() * 300/s.width())
|
||||||
pixmap = pixmap.scaled(300, new_height, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.FastTransformation)
|
pixmap = pixmap.scaled(300, new_height, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.FastTransformation)
|
||||||
|
@ -64,9 +64,7 @@ class PyRelacs(QMainWindow):
|
|||||||
self.nix_file = nix.File.open(str(filename), nix.FileMode.Overwrite)
|
self.nix_file = nix.File.open(str(filename), nix.FileMode.Overwrite)
|
||||||
|
|
||||||
def create_actions(self):
|
def create_actions(self):
|
||||||
self._rlx_exitaction = QAction(
|
self._rlx_exitaction = QAction(QIcon(":/icons/exit.png"), "Exit", self)
|
||||||
QIcon(str(path.joinpath(_root, "icons/exit.png"))), "Exit", self
|
|
||||||
)
|
|
||||||
self._rlx_exitaction.setStatusTip("Close relacs")
|
self._rlx_exitaction.setStatusTip("Close relacs")
|
||||||
self._rlx_exitaction.setShortcut(QKeySequence("Alt+q"))
|
self._rlx_exitaction.setShortcut(QKeySequence("Alt+q"))
|
||||||
self._rlx_exitaction.triggered.connect(self.on_exit)
|
self._rlx_exitaction.triggered.connect(self.on_exit)
|
||||||
@ -76,27 +74,17 @@ class PyRelacs(QMainWindow):
|
|||||||
self._rlx_aboutaction.setEnabled(True)
|
self._rlx_aboutaction.setEnabled(True)
|
||||||
self._rlx_aboutaction.triggered.connect(self.on_about)
|
self._rlx_aboutaction.triggered.connect(self.on_about)
|
||||||
|
|
||||||
self._daq_connectaction = QAction(
|
self._daq_connectaction = QAction(QIcon(":icons/connect.png"), "Connect DAQ", self)
|
||||||
QIcon(str(path.joinpath(_root, "icons/connect.png"))), "Connect DAQ", self
|
|
||||||
)
|
|
||||||
self._daq_connectaction.setStatusTip("Connect to daq device")
|
self._daq_connectaction.setStatusTip("Connect to daq device")
|
||||||
# self._daq_connectaction.setShortcut(QKeySequence("Alt+d"))
|
# self._daq_connectaction.setShortcut(QKeySequence("Alt+d"))
|
||||||
self._daq_connectaction.triggered.connect(self.connect_dac)
|
self._daq_connectaction.triggered.connect(self.connect_dac)
|
||||||
|
|
||||||
self._daq_disconnectaction = QAction(
|
self._daq_disconnectaction = QAction(QIcon(":/icons/disconnect.png"), "Disconnect DAQ", self)
|
||||||
QIcon(str(path.joinpath(_root, "icons/disconnect.png"))),
|
|
||||||
"Disconnect DAQ",
|
|
||||||
self,
|
|
||||||
)
|
|
||||||
self._daq_disconnectaction.setStatusTip("Disconnect the DAQ device")
|
self._daq_disconnectaction.setStatusTip("Disconnect the DAQ device")
|
||||||
# self._daq_connectaction.setShortcut(QKeySequence("Alt+d"))
|
# self._daq_connectaction.setShortcut(QKeySequence("Alt+d"))
|
||||||
self._daq_disconnectaction.triggered.connect(self.disconnect_dac)
|
self._daq_disconnectaction.triggered.connect(self.disconnect_dac)
|
||||||
|
|
||||||
self._daq_calibaction = QAction(
|
self._daq_calibaction = QAction(QIcon(":/icons/calibration.png"), "Plot calibration", self)
|
||||||
QIcon(str(path.joinpath(_root, "icons/calibration.png"))),
|
|
||||||
"Plot calibration",
|
|
||||||
self,
|
|
||||||
)
|
|
||||||
self._daq_calibaction.setStatusTip("Calibrate the attenuator device")
|
self._daq_calibaction.setStatusTip("Calibrate the attenuator device")
|
||||||
# self._daq_calibaction.setShortcut(QKeySequence("Alt+d"))
|
# self._daq_calibaction.setShortcut(QKeySequence("Alt+d"))
|
||||||
self._daq_calibaction.triggered.connect(self.plot_calibration)
|
self._daq_calibaction.triggered.connect(self.plot_calibration)
|
||||||
|