def _set_stylesheet(self): self.toolbar.setStyleSheet(style.get_stylesheet("qtoolbar")) self.setStyleSheet(style.get_stylesheet("common")) self.lab_port.setStyleSheet( "background-color: transparent; color: #75BA6D; font-weight: bold;" ) self.out.setStyleSheet("background-color: #505050; color: white;")
def _set_stylesheet(self): self.toolbar.setStyleSheet(style.get_stylesheet("qtoolbar")) self.setStyleSheet(style.get_stylesheet("common")) self.serial_in.setStyleSheet(style.get_stylesheet("serial_in")) self.serial_out.console.setStyleSheet( "background-color: #000000; color: white; padding-left: 10px;") self.terminal.textbox.setStyleSheet( "background-color: #000000; color: #44DD44;") self.tab_widget.setStyleSheet(style.get_stylesheet("tab"))
def _set_stylesheet(self): self.toolbar.setStyleSheet(style.get_stylesheet("qtoolbar")) self.editor.setStyleSheet( "background-color: " + self.config.get('colors', 'editor_bg') + "; color: " + self.config.get('colors', 'asm_text_default') + ";") self.search_field.setStyleSheet( "border: 2px solid gray; border-radius: 10px; padding: 0 8px; background: #585858; color: white" ) # Execution Frame self.setStyleSheet(style.get_stylesheet("common"))
def __init__(self): """ Displays a Dialog for the quit confirmation. """ QDialog.__init__(self) self.setWindowTitle("Quit DigiQt?") self.setWindowFlags(Qt.FramelessWindowHint) self.setFixedSize(QSize(300, 130)) self.ok_btn = QPushButton("Quit") self.ok_btn.clicked.connect(self.accept) self.cancel_btn = QPushButton("Cancel") self.cancel_btn.clicked.connect(self.reject) self.label = QLabel("Do you really want to quit DigiQt?") self.label.setAlignment(Qt.AlignCenter) layout = QGridLayout() layout.addWidget(self.label, 0, 0, 1, 2) layout.addWidget(self.ok_btn, 1, 0) layout.addWidget(self.cancel_btn, 1, 1) self.setLayout(layout) self.setStyleSheet(style.get_stylesheet("dialog"))
def __on_tab_changed(self): """ Hides the serial in display when current widget is the real terminal """ if self.tab_widget.currentWidget() == self.serial_out: self.serial_in.setStyleSheet(style.get_stylesheet("serial_in")) else: self.serial_in.setStyleSheet( "background: #333333; color: #333333;") self.terminal.textbox.setFocus()
def __init__(self): """ Customed dropdown button for the usb-port selection """ QComboBox.__init__(self) self.setStyleSheet(style.get_stylesheet("qcombobox")) self.activated.connect(self.on_selection_changed) self.setFixedSize(QSize(200, 30)) self.sig_port_change = None # pushed by serial controler
def __init__(self, config): """ About-us frame. """ QWidget.__init__(self) self.config = config self.setWindowTitle("DigiQt - About us") self.links_style = '<style>a { text-decoration:none; color:cyan; } </style>' self.contact_style = '<style>a { text-decoration:none; color:lightblue; } </style>' self._set_layout() self.setStyleSheet(style.get_stylesheet("aboutbox"))
def __init__(self, callback_function): """ Customed dropdown button for the Digirule model selection """ QComboBox.__init__(self) # This is done by the controler # self.addItems(("2A", "2B", "2U")) # self.setCurrentText(init_model) # Switch to initial selection self.setStyleSheet(style.get_stylesheet("qcombobox")) self.activated.connect(callback_function) self.setFixedSize(QSize(70, 30))
def __init__(self, config): """ Symbols and Labels view frame :param config: application configuration file """ QWidget.__init__(self) self.setFixedSize(QSize(320, 330)) self.setWindowTitle("DigiQt - Symbols") self.config = config self.lab_label = QLabel("Labels") self.lab_label.setAlignment(Qt.AlignCenter) self.lab_symbols = QLabel("Symbols") self.lab_symbols.setAlignment(Qt.AlignCenter) self.sig_symbol_goto = None # pushed by the controler # Initialization of the lists self.labels_view = QListView() self.labels_view.setFixedSize(QSize(150, 300)) self.labels_view.setEditTriggers(QAbstractItemView.NoEditTriggers) self.labels_view.setSelectionMode(QAbstractItemView.SingleSelection) self.dm_labels = QStandardItemModel(self.labels_view) self.symbols_view = QListView() self.symbols_view.setFixedSize(QSize(150, 300)) self.symbols_view.setEditTriggers(QAbstractItemView.NoEditTriggers) self.symbols_view.setSelectionMode(QAbstractItemView.SingleSelection) self.dm_symbols = QStandardItemModel(self.symbols_view) self.init_labels([]) self.init_symbols([]) self.labels_view.clicked.connect(self.on_label_changed) self.symbols_view.clicked.connect(self.on_symbol_changed) self.__set_layout() self.setStyleSheet(style.get_stylesheet("listviews_frame"))
def _set_stylesheets(self): self.toolbar.setStyleSheet(style.get_stylesheet("qtoolbar")) # Execution Frame self.setStyleSheet(style.get_stylesheet("common"))