Push button is added to print settings
parent
04078e5794
commit
ff019e5117
|
|
@ -5,6 +5,7 @@ from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QTe
|
|||
from PyQt5.QtGui import QPixmap, QIcon, QFont
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
import settings as stg
|
||||
|
||||
class NoteTab(QWidget):
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ class NoteTab(QWidget):
|
|||
self.filename_text = ""
|
||||
|
||||
self.pushbutton_new_txt = QPushButton()
|
||||
self.icon_new_txt = QPixmap(path_icon + "new_txt.png")
|
||||
self.icon_new_txt = QPixmap(path_icon + "new_text.png")
|
||||
self.pushbutton_new_txt.setIcon(QIcon(self.icon_new_txt))
|
||||
# self.pushbutton_new_txt.clicked.connect(self.new_text)
|
||||
self.horizontalLayout_toolbar.addWidget(self.pushbutton_new_txt)
|
||||
|
|
@ -116,6 +117,11 @@ class NoteTab(QWidget):
|
|||
self.horizontalSpacerItem_toolbar_note_tab = QSpacerItem(500, 10, QSizePolicy.Expanding, QSizePolicy.Minimum)
|
||||
self.horizontalLayout_toolbar.addItem(self.horizontalSpacerItem_toolbar_note_tab)
|
||||
|
||||
self.pushbutton_print_settings = QPushButton()
|
||||
self.pushbutton_print_settings.setText("EDIT SETTINGS")
|
||||
self.pushbutton_print_settings.clicked.connect(self.print_settings)
|
||||
self.verticalLayout_main_note_tab.addWidget(self.pushbutton_print_settings)
|
||||
|
||||
self.verticalLayout_main_note_tab.addWidget(self.textEdit)
|
||||
|
||||
## -------------------------------
|
||||
|
|
@ -182,6 +188,25 @@ class NoteTab(QWidget):
|
|||
def alignJustify(self):
|
||||
self.textEdit.setAlignment(Qt.AlignJustify)
|
||||
|
||||
def print_settings(self):
|
||||
print(int(stg.frequencies_pair[0, 0]))
|
||||
|
||||
self.textEdit.setText("Acoustic data: \n\n"
|
||||
f" ABS raw data file: {stg.path_BS_raw_data}/{stg.filename_BS_raw_data} \n"
|
||||
f" ABS noise data file: {stg.path_BS_noise_data}/{stg.filename_BS_noise_data} \n"
|
||||
"\n\n"
|
||||
"------------------------------------------------------------------------- \n\n\n"
|
||||
|
||||
"Particle size data: \n"
|
||||
f" Fine sediments data file: {stg.fine_sediment_path}/{stg.fine_sediment_filename} \n"
|
||||
f" Sand sediments data file: {stg.sand_sediment_path}/{stg.sand_sediment_filename} \n"
|
||||
"\n\n"
|
||||
"------------------------------------------------------------------------- \n\n\n"
|
||||
|
||||
"Acoustic Inversion parameters: \n"
|
||||
f" frequencies to compute VBI: {stg.freq_text[int(stg.frequencies_pair[0, 0])]}, {stg.freq_text[int(stg.frequencies_pair[1, 0])]} \n"
|
||||
f" frequency to compute SSC: {stg.freq_text[int(stg.frequency_to_compute_SSC[0])]}")
|
||||
|
||||
|
||||
# if __name__ == "__main__":
|
||||
# app = QApplication(sys.argv)
|
||||
|
|
|
|||
Loading…
Reference in New Issue