Exemple #1
0
    def setupUi(self, Dialog):
        if Dialog.objectName():
            Dialog.setObjectName(u"Dialog")
        Dialog.resize(878, 528)
        icon = QIcon()
        icon.addFile("./icon.ico")
        Dialog.setWindowIcon(icon)
        self.verticalLayout = QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.questionLable = QLabel(Dialog)
        self.questionLable.setObjectName(u"questionLable")
        font = QFont()
        font.setFamily(u"\u5fae\u8f6f\u96c5\u9ed1")
        font.setPointSize(12)
        self.questionLable.setFont(font)
        self.questionLable.setWordWrap(True)
        self.questionLable.setMargin(0)
        self.questionLable.setIndent(0)

        self.horizontalLayout.addWidget(self.questionLable)

        self.lcd = QLCDNumber(Dialog)
        self.lcd.setObjectName(u"lcd")
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lcd.sizePolicy().hasHeightForWidth())
        self.lcd.setSizePolicy(sizePolicy)
        self.lcd.setMinimumSize(QSize(120, 60))
        self.lcd.setSmallDecimalPoint(True)
        self.lcd.setDigitCount(4)
        self.lcd.setSegmentStyle(QLCDNumber.Flat)
        self.lcd.setProperty("value", 120.000000000000000)

        self.horizontalLayout.addWidget(self.lcd)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.line = QFrame(Dialog)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.verticalLayout.addWidget(self.line)

        self.answerLable = QLabel(Dialog)
        self.answerLable.setObjectName(u"answerLable")
        font1 = QFont()
        font1.setFamily(u"Yu Gothic UI")
        font1.setPointSize(14)
        self.answerLable.setFont(font1)
        self.answerLable.setWordWrap(True)

        self.verticalLayout.addWidget(self.answerLable)

        self.retranslateUi(Dialog)

        QMetaObject.connectSlotsByName(Dialog)
Exemple #2
0
    def setupUi(self, GroupBox):
        if not GroupBox.objectName():
            GroupBox.setObjectName(u"GroupBox")
        GroupBox.resize(452, 296)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(GroupBox.sizePolicy().hasHeightForWidth())
        GroupBox.setSizePolicy(sizePolicy)
        self.verticalLayout = QVBoxLayout(GroupBox)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.groupBox = QGroupBox(GroupBox)
        self.groupBox.setObjectName(u"groupBox")
        self.verticalLayout_3 = QVBoxLayout(self.groupBox)
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.verticalLayout_2 = QVBoxLayout()
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.verticalLayout_2.setContentsMargins(-1, 10, -1, -1)
        self.checkBox_asp_ser = QCheckBox(self.groupBox)
        self.checkBox_asp_ser.setObjectName(u"checkBox_asp_ser")

        self.verticalLayout_2.addWidget(self.checkBox_asp_ser)

        self.checkBox_ser_backbone = QCheckBox(self.groupBox)
        self.checkBox_ser_backbone.setObjectName(u"checkBox_ser_backbone")

        self.verticalLayout_2.addWidget(self.checkBox_ser_backbone)

        self.checkBox_glu_his = QCheckBox(self.groupBox)
        self.checkBox_glu_his.setObjectName(u"checkBox_glu_his")

        self.verticalLayout_2.addWidget(self.checkBox_glu_his)

        self.checkBox_his_his = QCheckBox(self.groupBox)
        self.checkBox_his_his.setObjectName(u"checkBox_his_his")

        self.verticalLayout_2.addWidget(self.checkBox_his_his)

        self.checkBox_asp_asn = QCheckBox(self.groupBox)
        self.checkBox_asp_asn.setObjectName(u"checkBox_asp_asn")

        self.verticalLayout_2.addWidget(self.checkBox_asp_asn)

        self.checkBox_his_ser = QCheckBox(self.groupBox)
        self.checkBox_his_ser.setObjectName(u"checkBox_his_ser")

        self.verticalLayout_2.addWidget(self.checkBox_his_ser)

        self.checkBox_asp_backbone = QCheckBox(self.groupBox)
        self.checkBox_asp_backbone.setObjectName(u"checkBox_asp_backbone")

        self.verticalLayout_2.addWidget(self.checkBox_asp_backbone)

        self.verticalLayout_3.addLayout(self.verticalLayout_2)

        self.verticalLayout.addWidget(self.groupBox)

        self.retranslateUi(GroupBox)

        QMetaObject.connectSlotsByName(GroupBox)
Exemple #3
0
    def __init__(self,
                 parent=None,
                 graph: BaseGraph = None,
                 log_handlers: [StreamHandler] = None):
        self._logger = getLogger(__name__)
        if log_handlers:
            for h in log_handlers:
                self._logger.addHandler(h)
        self._logger.debug("Initializing")
        super().__init__(parent)
        size_policy = QSizePolicy(QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Fixed)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(size_policy)
        self.setMinimumWidth(500)
        self.setFrameShape(QFrame.NoFrame)
        self.setFrameShadow(QFrame.Raised)
        self.setLayout(QVBoxLayout(self))
        self._graph = graph
        self._graph_height = 400

        if graph:
            self.layout().addWidget(self._graph)
        self._logger.debug("Initialized")
Exemple #4
0
    def init_window(self):
        # set window
        self.setGeometry(100, 100, 900, 620)
        import os
        self.setWindowIcon(QIcon(os.path.join(path, './img/icon.png')))
        self.setWindowTitle("WebCheck")

        # set centralWidget
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(2)
        sizePolicy.setVerticalStretch(2)
        sizePolicy.setHeightForWidth(self.centralWidget.sizePolicy().hasHeightForWidth())
        self.centralWidget.setSizePolicy(sizePolicy)
        self.centralWidget.setMinimumSize(QSize(900, 540))
        self.setCentralWidget(self.centralWidget)

        # set grid layout central
        self.gridLayout_central.setSpacing(0)
        self.gridLayout_central.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_central.setRowStretch(0, 1)
        self.gridLayout_central.setRowStretch(1, 10)
        self.gridLayout_central.setColumnStretch(0, 1)
        self.gridLayout_central.setColumnStretch(1, 3)
        self.gridLayout_central.addWidget(self.navFrame, 0, 0, 9, 1)
        self.gridLayout_central.addWidget(self.sitesFrame, 0, 1, 1, 1)
        self.gridLayout_central.addWidget(self.stackedWidget, 1, 1, 1, 1)
 def __init__(self, parent, graph: BaseGraph,
              log_handlers: [StreamHandler]):
     self._logger = getLogger(__name__)
     for h in log_handlers:
         self._logger.addHandler(h)
     self._logger.debug("Initializing")
     super().__init__(parent)
     size_policy = QSizePolicy(QSizePolicy.MinimumExpanding,
                               QSizePolicy.Fixed)
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
     self.setSizePolicy(size_policy)
     self.setMinimumWidth(500)
     self.setFrameShape(QFrame.NoFrame)
     self.setFrameShadow(QFrame.Raised)
     self.setLayout(QVBoxLayout(self))
     self._visible = True
     self._graph = graph
     # self._show_hide_button = ClickAnimationButton(self)
     # self._show_hide_button.setFixedSize(150, 30)
     # self._show_hide_button.clicked.connect(self._set_graph_visibility)
     # self.layout().addWidget(self._show_hide_button)
     # self._show_hide_button.setText("Hide " + self._graph.get_title() + " graph")
     self._navbar_height = 100
     self._graph_height = 400
     self.layout().addWidget(self._graph)
     self.layout().addWidget(self._graph.get_nav_bar())
     self.setFixedHeight(self._navbar_height + self._graph_height)
     self._logger.debug("Initialized")
Exemple #6
0
 def setup_ui(self):
     vertical_layout = QVBoxLayout(self)
     vertical_layout.setSpacing(6)
     vertical_layout.setContentsMargins(11, 11, 11, 11)
     splitter_v = QSplitter(self)
     splitter_v.setOrientation(PySide2.QtCore.Qt.Vertical)
     size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(
         splitter_v.sizePolicy().hasHeightForWidth())
     splitter_v.setSizePolicy(size_policy)
     splitter_h = QSplitter(splitter_v)
     splitter_h.setOrientation(PySide2.QtCore.Qt.Horizontal)
     vertical_layout_widget = QWidget(splitter_h)
     self.vertical_layout_left = QVBoxLayout(vertical_layout_widget)
     self.vertical_layout_left.setSpacing(6)
     self.vertical_layout_left.setSizeConstraint(
         QLayout.SetDefaultConstraint)
     self.vertical_layout_left.setContentsMargins(0, 0, 0, 0)
     splitter_h.addWidget(vertical_layout_widget)
     vertical_layout_widget2 = QWidget(splitter_h)
     self.vertical_layout_right = QVBoxLayout(vertical_layout_widget2)
     self.vertical_layout_right.setContentsMargins(0, 0, 0, 0)
     splitter_h.addWidget(vertical_layout_widget2)
     splitter_v.addWidget(splitter_h)
     vertical_layout_widget3 = QWidget(splitter_v)
     vertical_layout_bottom = QVBoxLayout(vertical_layout_widget3)
     vertical_layout_bottom.setSpacing(6)
     vertical_layout_bottom.setSizeConstraint(QLayout.SetDefaultConstraint)
     vertical_layout_bottom.setContentsMargins(11, 0, 11, 11)
     text_browser = QTextBrowser(vertical_layout_widget3)
     vertical_layout_bottom.addWidget(text_browser)
     splitter_v.addWidget(vertical_layout_widget3)
     vertical_layout.addWidget(splitter_v)
Exemple #7
0
 def __init__(self, parent, canvas):
     self.logger = logging.getLogger(__name__)
     self.logger.debug("Initializing")
     super().__init__(parent)
     size_policy = QSizePolicy(QSizePolicy.MinimumExpanding,
                               QSizePolicy.Fixed)
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
     self.setSizePolicy(size_policy)
     self.setMinimumWidth(500)
     self.setFrameShape(QFrame.NoFrame)
     self.setFrameShadow(QFrame.Raised)
     self.setLayout(QVBoxLayout(self))
     self.__visible = True
     self.__canvas = canvas
     self.__show_hide_button = ClickAnimationButton(self)
     self.__show_hide_button.setFixedSize(150, 30)
     self.__show_hide_button.clicked.connect(self.__set_graph_visibility)
     self.layout().addWidget(self.__show_hide_button)
     self.__navbar_height = 100
     self.__canvas_height = 400
     self.__show_hide_button.setText("Hide " + self.__canvas.get_title() +
                                     " graph")
     self.layout().addWidget(self.__canvas)
     self.layout().addWidget(self.__canvas.get_nav_bar())
     self.setFixedHeight(self.__navbar_height + self.__canvas_height)
     self.logger.debug("Initialized")
    def setupUi(self, PDFViewer):
        if not PDFViewer.objectName():
            PDFViewer.setObjectName(u"PDFViewer")
        PDFViewer.resize(820, 652)
        icon = QIcon()
        icon.addFile(u":/icons/icon.ico", QSize(), QIcon.Normal, QIcon.Off)
        PDFViewer.setWindowIcon(icon)
        self.centralwidget = QWidget(PDFViewer)
        self.centralwidget.setObjectName(u"centralwidget")
        self.verticalLayout = QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.webView = QWebView(self.centralwidget)
        self.webView.setObjectName(u"webView")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.webView.sizePolicy().hasHeightForWidth())
        self.webView.setSizePolicy(sizePolicy)
        self.webView.setProperty("url", QUrl(u""))

        self.verticalLayout.addWidget(self.webView)

        PDFViewer.setCentralWidget(self.centralwidget)

        self.retranslateUi(PDFViewer)

        QMetaObject.connectSlotsByName(PDFViewer)
Exemple #9
0
    def __init__(self, parent=None):
        super(TabDisplays, self).__init__(parent)

        # Initialize logging
        logging_conf_file = os.path.join(os.path.dirname(__file__),
                                         'cfg/aecgviewer_aecg_logging.conf')
        logging.config.fileConfig(logging_conf_file)
        self.logger = logging.getLogger(__name__)

        self.studyindex_info = aecg.tools.indexer.StudyInfo()

        self.validator = QWidget()

        self.studyinfo = QWidget()

        self.statistics = QWidget()

        self.waveforms = QWidget()

        self.waveforms.setAccessibleName("Waveforms")

        self.scatterplot = QWidget()

        self.histogram = QWidget()

        self.trends = QWidget()

        self.xmlviewer = QWidget()
        self.xml_display = QTextEdit(self.xmlviewer)

        self.options = QWidget()

        self.aecg_display_area = QScrollArea()
        self.cbECGLayout = QComboBox()
        self.aecg_display = EcgDisplayWidget(self.aecg_display_area)
        self.aecg_display_area.setWidget(self.aecg_display)

        self.addTab(self.validator, "Study information")
        self.addTab(self.waveforms, "Waveforms")
        self.addTab(self.xmlviewer, "XML")
        self.addTab(self.options, "Options")

        self.setup_validator()
        self.setup_waveforms()
        self.setup_xmlviewer()
        self.setup_options()

        size = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        size.setHeightForWidth(False)
        self.setSizePolicy(size)

        # Initialized a threpool with 2 threads 1 for the GUI, 1 for long
        # tasks, so GUI remains responsive
        self.threadpool = QThreadPool()
        self.threadpool.setMaxThreadCount(2)
        self.validator_worker = None
        self.indexing_timer = QElapsedTimer()
Exemple #10
0
    def __init__(self, fig, parent=None):
        FigureCanvas.__init__(self, fig)

        self.setParent(parent)

        size = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        size.setHeightForWidth(True)
        self.setSizePolicy(size)
        FigureCanvas.updateGeometry(self)
Exemple #11
0
    def __init__(self, index_filename):
        QWidget.__init__(self)

        self.data_index = pd.DataFrame()
        self.data_info = aecg.tools.indexer.StudyInfo()
        self.data_index_stats = aecg.tools.indexer.StudyStats(
            self.data_info, self.data_index)

        # Getting the Models
        self.project_loaded = ''
        self.projectmodel = ProjectTreeModel()

        # Creating a QTreeView for displaying the selected project index
        self.project_treeview = QTreeView()
        self.project_treeview.setModel(self.projectmodel)
        self.phorizontal_header = self.project_treeview.header()
        self.phorizontal_header.setSectionResizeMode(
            QHeaderView.ResizeToContents)
        self.phorizontal_header.setStretchLastSection(True)

        self.sp_right = QSplitter(Qt.Orientation.Horizontal)
        self.sp_left = QSplitter(Qt.Orientation.Vertical, self.sp_right)
        # NavigationWidget Layout
        self.main_layout = QVBoxLayout()
        size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)

        # Left side
        # Left side - Top layout
        # Left side - Bottom Layout
        size.setVerticalStretch(4)
        self.project_treeview.setSizePolicy(size)

        self.sp_left.addWidget(self.project_treeview)

        # Right side
        size = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        size.setHorizontalStretch(2)
        size.setHeightForWidth(False)
        self.tabdisplays = TabDisplays(self)
        self.sp_right.addWidget(self.tabdisplays)
        self.tabdisplays.validator_data_ready.connect(
            self.load_projectindex_after_validation)
        self.sp_right.setSizePolicy(size)

        # Set the layout to the QWidget
        self.main_layout.addWidget(self.sp_right)
        self.setLayout(self.main_layout)

        self.tabdisplays.setCurrentWidget(self.tabdisplays.validator)

        # Load study index
        if index_filename and (index_filename != ""):
            if os.path.exists(index_filename):
                self.load_projectindex(os.path.normpath(index_filename))
            else:
                QMessageBox.warning(self, f"Study index file not found",
                                    f"{index_filename} not found")
 def __init__(self, parent, width_range, ch):
     self.logger = logging.getLogger(__name__)
     self.logger.addHandler(ch)
     self.logger.debug("Initializing")
     super().__init__(parent)
     self.setMaximumWidth(width_range[0])
     self.setMinimumWidth(width_range[1])
     size_policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
     self.setSizePolicy(size_policy)
     self.__tabs = {}
     self.logger.debug("Initialized")
Exemple #13
0
def main():
    """ Launches the main aECG viewer window

    This function parses the command line arguments, intializesa logger, and
    launches the main user interface window.

    Command line arguments:

        indexfile (str, optional): Filename of the study index file to load
        logconffile (str, optional): logging configuration file
    """
    # Set start method for multiprocess to spawn for all platforms
    multiprocessing.set_start_method('spawn')

    logging_conf_file = pkg_resources.resource_filename(
        __name__, 'cfg/aecgviewer_aecg_logging.conf')

    options = argparse.ArgumentParser()
    options.add_argument("-i",
                         "--indexfile",
                         type=str,
                         help='Study index file to be loaded')
    options.add_argument("-l",
                         "--logconffile",
                         type=str,
                         help=f'logging configuration file (default: '
                         f'{logging_conf_file})',
                         default=logging_conf_file)
    args = options.parse_args()

    # Initialize logging
    print(f"Loading logging configuration from: {args.logconffile}")
    logging.config.fileConfig(args.logconffile)
    logger = logging.getLogger("aecgviewer")
    for h in logger.root.handlers:
        if isinstance(h, logging.FileHandler):
            print(f"Logging to {h.baseFilename} file with a "
                  f"{type(h).__name__}")
    logger.info("aECG viewer version %s loaded", aecgviewer.__version__)

    app = QApplication(sys.argv)
    window = MainWindow(args.indexfile)
    sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
    sizePolicy.setHeightForWidth(False)
    window.setSizePolicy(sizePolicy)
    window.show()

    sys.exit(app.exec_())
Exemple #14
0
    def creabotones(self, estilo=None, titulo=None, icono=None, tooltip=None):

        # configuraciones generales
        boton_nuevo = QPushButton()
        boton_nuevo.setStyleSheet(estilo)
        boton_nuevo.setIcon(QIcon(icono))
        boton_nuevo.setToolTip(tooltip)
        boton_nuevo.setText(titulo)

        # configuracion de resize
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            boton_nuevo.sizePolicy().hasHeightForWidth())
        boton_nuevo.setSizePolicy(sizePolicy)

        return boton_nuevo
 def __init__(self):
     self.logger = logging.getLogger(__name__)
     self.logger.debug("Initializing")
     super().__init__()
     self.setLayout(QVBoxLayout())
     self.__scroll_area = QScrollArea(self)
     size_policy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum)
     size_policy.setHorizontalStretch(0)
     size_policy.setVerticalStretch(0)
     size_policy.setHeightForWidth(
         self.__scroll_area.hasHeightForWidth())
     self.__scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
     self.__scroll_area.setHorizontalScrollBarPolicy(
         Qt.ScrollBarAsNeeded)
     self.__scroll_area.setSizeAdjustPolicy(
         QAbstractScrollArea.AdjustToContents)
     self.__scroll_area.setSizePolicy(size_policy)
     self.__scroll_area.setWidgetResizable(True)
     self.layout().addWidget(self.__scroll_area)
     self.logger.debug("Initialized")
Exemple #16
0
    def __init__(self, window: ProcessMonitorWindow):
        self.window = window

        self.main_widget = QWidget(window)
        self.main_layout = QVBoxLayout()
        self.layout_connection = QHBoxLayout()
        self.txt_conenction = QLineEdit()
        self.btn_connect = QPushButton()
        self.layout_connection.addWidget(self.txt_conenction)
        self.layout_connection.addWidget(self.btn_connect)
        self.process_list = ProcessListWidget()

        self.tabs_output = ProcessOutputTabsWidget()

        self.splitter = QSplitter(Qt.Horizontal)
        self.splitter.setMinimumSize(680, 540)
        policy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
        policy.setHorizontalStretch(0)
        policy.setVerticalStretch(0)
        policy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth())
        self.splitter.setSizePolicy(policy)
        self.splitter.setStretchFactor(0, 1)
        self.splitter.setStretchFactor(1, 0)

        self.main_layout.addLayout(self.layout_connection)
        self.splitter.addWidget(self.process_list)
        self.splitter.addWidget(self.tabs_output)
        self.main_layout.addWidget(self.splitter)

        self.main_widget.setLayout(self.main_layout)
        self.statusbar = QStatusBar(window)

        self.txt_conenction.setPlaceholderText("ws://127.0.0.1:8766")
        self.txt_conenction.setText("ws://127.0.0.1:8766")
        self.btn_connect.setText("Connect")

        window.setCentralWidget(self.main_widget)
        window.setStatusBar(self.statusbar)
        window.setWindowTitle("Process Monitor")
        window.setWindowIcon(window.style().standardIcon(QStyle.SP_BrowserReload))
        self.set_disconnected_ui("Click on Connect to establish a connection")
Exemple #17
0
    def setup_waveforms(self):
        wflayout = QVBoxLayout()

        # ECG plot layout selection box
        self.cbECGLayout.addItems(
            ['12-lead stacked', '3x4 + lead II rhythm', 'Superimposed'])
        self.cbECGLayout.currentIndexChanged.connect(
            self.ecgplotlayout_changed)

        # Zoom buttons
        blayout = QHBoxLayout()

        pb_zoomin = QPushButton()
        pb_zoomin.setText("Zoom +")
        pb_zoomin.clicked.connect(self.zoom_in)

        pb_zoomreset = QPushButton()
        pb_zoomreset.setText("Zoom 1:1")
        pb_zoomreset.clicked.connect(self.zoom_reset)

        pb_zoomout = QPushButton()
        pb_zoomout.setText("Zoom -")
        pb_zoomout.clicked.connect(self.zoom_out)

        blayout.addWidget(self.cbECGLayout)
        blayout.addWidget(pb_zoomout)
        blayout.addWidget(pb_zoomreset)
        blayout.addWidget(pb_zoomin)

        wflayout.addLayout(blayout)

        # Add QScrollArea to main layout of waveforms tab
        self.aecg_display_area.setWidgetResizable(False)
        wflayout.addWidget(self.aecg_display_area)
        self.waveforms.setLayout(wflayout)
        size = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
        size.setHeightForWidth(False)
        self.aecg_display_area.setSizePolicy(size)
        self.waveforms.setSizePolicy(size)
Exemple #18
0
 def __init__(self):
     super().__init__()
     self.layout = QVBoxLayout(self)
     self.videoWindow = FurhatVideoAudioWidgetStream()
     sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
     sizePolicy.setHorizontalStretch(0)
     sizePolicy.setVerticalStretch(0)
     sizePolicy.setHeightForWidth(
         self.videoWindow.sizePolicy().hasHeightForWidth())
     self.videoWindow.setSizePolicy(sizePolicy)
     self.videoWindow.setMinimumSize(QSize(640, 480))
     self.videoWindow.setMaximumSize(QSize(640, 480))
     self.videoWindow.setObjectName("videoWindow")
     self.layout.addWidget(self.videoWindow)
     self.button_layout = QHBoxLayout()
     self.layout.addLayout(self.button_layout)
     self.recordButton = QPushButton("Record")
     self.recordButton.clicked.connect(self.start_recording)
     self.button_layout.addWidget(self.recordButton)
     self.muteButton = QPushButton("Mute")
     self.muteButton.clicked.connect(self.mute)
     self.button_layout.addWidget(self.muteButton)
     self.isRecording = False
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        self.setObjectName("main_window")
        self.setEnabled(True)
        self.resize(608, 248)
        size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(self.sizePolicy().hasHeightForWidth())
        self.setSizePolicy(size_policy)
        self.setAcceptDrops(True)
        self.setWindowTitle("FileHookPi")

        self.central_widget = QWidget(self)
        self.central_widget.setObjectName("central_widget")

        self.horizontalLayout = QHBoxLayout(self.central_widget)
        self.horizontalLayout.setObjectName("horizontalLayout")

        self.text_box = QPlainTextEdit(self.central_widget)
        self.text_box.setAcceptDrops(False)
        self.text_box.setReadOnly(True)
        self.text_box.setObjectName("text_box")

        self.horizontalLayout.addWidget(self.text_box)

        self.buttons_vertical_layout = QVBoxLayout()
        self.buttons_vertical_layout.setObjectName("buttons_vertical_layout")

        self.open_file_button = QPushButton(self.central_widget)
        self.open_file_button.setText("Open File")
        self.open_file_button.setObjectName("open_file_button")
        self.open_file_button.clicked.connect(self.select_file)

        self.buttons_vertical_layout.addWidget(self.open_file_button)

        self.line_counter = QLineEdit(self.central_widget)
        size_policy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(0)
        size_policy.setHeightForWidth(
            self.line_counter.sizePolicy().hasHeightForWidth())
        self.line_counter.setSizePolicy(size_policy)
        self.line_counter.setAcceptDrops(False)
        self.line_counter.setReadOnly(True)
        self.line_counter.setObjectName("line_counter")

        self.buttons_vertical_layout.addWidget(self.line_counter)

        self.next_line_button = QPushButton(self.central_widget)
        self.next_line_button.setText("Next Line")
        self.next_line_button.setObjectName("next_line_button")
        self.next_line_button.clicked.connect(self.advance_line)

        self.buttons_vertical_layout.addWidget(self.next_line_button)

        self.horizontalLayout.addLayout(self.buttons_vertical_layout)

        self.menuBar().addMenu(FileMenu(self))

        self.setCentralWidget(self.central_widget)

        self.current_file = None
        self.line_count = 0
Exemple #20
0
    def setupUi(self, FilewriterCtrl):
        FilewriterCtrl.resize(649, 450)
        broker_placeholder_text = "address:port/topic"
        self.central_widget = QWidget(FilewriterCtrl)
        self.vertical_layout_2 = QVBoxLayout(self.central_widget)
        self.vertical_layout = QVBoxLayout()
        self.horizontal_layout = QHBoxLayout()
        self.horizontal_layout.setContentsMargins(-1, -1, 0, -1)
        self.status_layout = QVBoxLayout()
        self.status_layout.setContentsMargins(-1, -1, -1, 0)
        self.status_topic_layout = QHBoxLayout()
        self.status_topic_layout.setContentsMargins(-1, -1, -1, 0)
        self.status_broker_label = QLabel(self.central_widget)
        self.status_topic_layout.addWidget(self.status_broker_label)
        self.status_broker_edit = QLineEdit(self.central_widget)
        self.status_broker_edit.setPlaceholderText(broker_placeholder_text)

        self.status_topic_layout.addWidget(self.status_broker_edit)
        self.status_layout.addLayout(self.status_topic_layout)
        self.line_2 = QFrame(self.central_widget)
        self.line_2.setFrameShape(QFrame.HLine)
        self.line_2.setFrameShadow(QFrame.Sunken)
        self.status_layout.addWidget(self.line_2)
        self.file_writer_table_group = QGroupBox(self.central_widget)
        size_policy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(1)
        size_policy.setHeightForWidth(
            self.file_writer_table_group.sizePolicy().hasHeightForWidth())
        self.file_writer_table_group.setSizePolicy(size_policy)
        self.vertical_layout_4 = QVBoxLayout(self.file_writer_table_group)
        self.vertical_layout_3 = QVBoxLayout()
        self.file_writers_list = QTreeView(self.file_writer_table_group)
        self.file_writers_list.setEditTriggers(
            QAbstractItemView.NoEditTriggers)
        self.file_writers_list.setIndentation(0)
        self.vertical_layout_3.addWidget(self.file_writers_list)
        self.vertical_layout_4.addLayout(self.vertical_layout_3)
        self.status_layout.addWidget(self.file_writer_table_group)
        self.files_group = QGroupBox(self.central_widget)
        size_policy.setHorizontalStretch(0)
        size_policy.setVerticalStretch(4)
        size_policy.setHeightForWidth(
            self.files_group.sizePolicy().hasHeightForWidth())
        self.files_group.setSizePolicy(size_policy)
        self.vertical_layout_6 = QVBoxLayout(self.files_group)
        self.files_list = QTreeView(self.files_group)
        self.files_list.setIndentation(0)
        self.vertical_layout_6.addWidget(self.files_list)
        self.vertical_layout_5 = QVBoxLayout()
        self.horizontal_layout_4 = QHBoxLayout()
        spacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                             QSizePolicy.Minimum)
        self.horizontal_layout_4.addItem(spacer)
        self.stop_file_writing_button = QPushButton(self.files_group)
        self.stop_file_writing_button.setEnabled(False)
        self.horizontal_layout_4.addWidget(self.stop_file_writing_button)
        self.vertical_layout_5.addLayout(self.horizontal_layout_4)
        self.vertical_layout_6.addLayout(self.vertical_layout_5)
        self.status_layout.addWidget(self.files_group)
        self.horizontal_layout.addLayout(self.status_layout)
        self.line = QFrame(self.central_widget)
        self.line.setFrameShape(QFrame.VLine)
        self.line.setFrameShadow(QFrame.Sunken)
        self.horizontal_layout.addWidget(self.line)

        self.command_layout = QVBoxLayout()
        self.command_layout.setContentsMargins(-1, 0, -1, 0)
        self.command_broker_layout = QHBoxLayout()
        self.command_broker_label = QLabel(self.central_widget)
        self.command_broker_layout.addWidget(self.command_broker_label)
        self.command_broker_edit = QLineEdit(self.central_widget)
        self.command_broker_edit.setPlaceholderText(broker_placeholder_text)
        self.command_broker_layout.addWidget(self.command_broker_edit)
        self.command_layout.addLayout(self.command_broker_layout)
        self.command_widget = FilewriterCommandWidget(FilewriterCtrl)
        self.command_layout.addWidget(self.command_widget)

        self.horizontal_layout.addLayout(self.command_layout)
        self.vertical_layout.addLayout(self.horizontal_layout)
        self.vertical_layout_2.addLayout(self.vertical_layout)
        FilewriterCtrl.setCentralWidget(self.central_widget)

        self.status_broker_label.setText("Status broker")
        self.file_writer_table_group.setTitle("File-writers")
        self.files_group.setTitle("Files")
        self.stop_file_writing_button.setText("Stop file-writing")
        self.command_broker_label.setText("Command broker")
        self.command_broker_edit.setPlaceholderText("address:port/topic")

        QMetaObject.connectSlotsByName(FilewriterCtrl)
Exemple #21
0
    def setupUi(self, parent):
        """Setup the interfaces for the clock."""

        if not self.objectName():
            self.setObjectName(u"Clock")

        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(parent.sizePolicy().hasHeightForWidth())
        parent.setSizePolicy(sizePolicy)
        parent.setAutoFillBackground(True)

        parent.setWindowFlag(Qt.Widget, True)
        if os.uname().sysname == "Linux" or self.frameless:
            parent.setWindowFlag(Qt.FramelessWindowHint, True)
    
        self.tabWidget = QTabWidget(parent)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tabWidget.setGeometry(QRect(0, 0, 800, 460))
        # This works for Mac, but seems to not work with Linux/Arm/RPi
        # tabbar = self.tabWidget.tabBar()
        # tabbar.setMinimumSize(50, 24)
        # tabfont = QFont()
        # tabfont.setBold(True)
        # tabfont.setItalic(True)
        # tabfont.setPointSize(32)
        # tabbar.setFont(tabfont)

        # Setup the TABS
        self.clock = QWidget()
        self.clock.setObjectName(u"clock")
        self.tabWidget.addTab(self.clock, "")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.clock), "Clock")

        self.weather = QWeather(parent=None, debug=self.debug)
        self.tabWidget.addTab(self.weather, "")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.weather), "Weather")

        self.settings = QWidget()
        self.settings.setObjectName(u"settings")
        self.tabWidget.addTab(self.settings, "")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.settings), "Settings")

        self.tabWidget.setCurrentIndex(0)

        #################################################################################################
        # Setup Clock Page
        #################################################################################################

        self.analog = AnalogClock(self.clock)

        # DIGITAL clock in "clock" tab
        self.Digital = QLabel(self.clock)
        self.Digital.setObjectName(u"Digital")
        self.Digital.setGeometry(QRect(0, 5, 765, 71))
        self.Digital.setAutoFillBackground(False)
        self.Digital.setStyleSheet(u"")
        self.Digital.setText(u"Current Time - Date + time")

        # Weather Icon
        self.weathericon = QWeatherIcon((480, 5), self.weather, parent=self.clock)
        self.weather.weather_updated.connect(self.weathericon.update)

        # Weather info on the Clock page.
        self.minipanel = QTempMiniPanel((475, 105), self.weather, parent=self.clock)
        self.weather.temp_updated.connect(self.minipanel.update)

        self.hilo = QHiLoTide((580, 5), parent=self.clock, debug=self.debug)


        # Moon phase
        self.moon = QMoon(pos=(450, 210), parent=self.clock, size=216, web=self.web)

        # Push buttons in "clock tab.
        push_button_width = 111
        push_button_height = 40
        push_button_x = 670
        push_button_y = 220

        self.ledball_off = QPushButton(self.clock)
        self.ledball_off.setObjectName(u"ledball_off")
        self.ledball_off.setText(u"LED off")
        self.ledball_off.setGeometry(QRect(push_button_x, push_button_y, push_button_width, push_button_height))

        self.ledball_on = QPushButton(self.clock)
        self.ledball_on.setObjectName(u"ledball_on")
        self.ledball_on.setText(u"LED on ")
        self.ledball_on.setGeometry(QRect(push_button_x, push_button_y+push_button_height, push_button_width, push_button_height))

        self.ledball_on2 = QPushButton(self.clock)
        self.ledball_on2.setObjectName(u"ledball_on2")
        self.ledball_on2.setText(u"LED on 2")
        self.ledball_on2.setGeometry(QRect(push_button_x, push_button_y+push_button_height*2, push_button_width, push_button_height))

        self.sleep = QPushButton(self.clock)
        self.sleep.setObjectName(u"sleep")
        self.sleep.setText(u"Sleep")
        self.sleep.setGeometry(QRect(push_button_x, push_button_y+push_button_height*3+10, push_button_width, push_button_height))

        #################################################################################################
        # Setup Weather Page
        #################################################################################################

        #################################################################################################
        # Setup Setting Page
        #################################################################################################
        self.timeEdit = QTimeEdit(self.settings)
        self.timeEdit.setObjectName(u"timeEdit")
        self.timeEdit.setDisplayFormat(u"h:mm AP")
        self.timeEdit.setGeometry(QRect(200, 30, 191, 41))
        font8 = QFont()
        font8.setFamily(u"Gill Sans")
        font8.setPointSize(16)
        font8.setBold(False)
        font8.setItalic(False)
        font8.setWeight(50)
        self.timeEdit.setFont(font8)
        self.timeEdit.setAutoFillBackground(True)
        self.timeEdit.setTime(self.bedtime)
        self.bedtime_label = QLabel(self.settings)
        self.bedtime_label.setObjectName(u"bedtime_label")
        self.bedtime_label.setText(u"Set Bedtime:")
        self.bedtime_label.setGeometry(QRect(200, 0, 151, 31))
        self.bedtime_label.setFont(font8)
        self.bedtime_label.setAutoFillBackground(True)
        self.Brightness_Value = QLCDNumber(self.settings)
        self.Brightness_Value.setObjectName(u"Brightness_Value")
        self.Brightness_Value.setGeometry(QRect(20, 120, 61, 31))
        self.Brightness_Value.setStyleSheet(u"color: \"White\";\n"
                                            "margin:0px;\n"
                                            "border:0px;background:\"transparent\";")
        self.Brightness_Value.setDigitCount(3)
        self.Brightness_Value.setProperty("value", 180.000000000000000)
        self.Brightness = QSlider(self.settings)
        self.Brightness.setObjectName(u"Brightness")
        self.Brightness.setGeometry(QRect(30, 160, 51, 261))
        self.Brightness.setAutoFillBackground(False)
        self.Brightness.setMaximum(255)
        self.Brightness.setValue(self.LCD_brightness)
        self.Brightness.setOrientation(Qt.Vertical)
        self.Brightness_label = QLabel(self.settings)
        self.Brightness_label.setObjectName(u"Brightness_label")
        self.Brightness_label.setText(u"Brightness")
        self.Brightness_label.setGeometry(QRect(20, 70, 101, 41))
        font10 = QFont()
        font10.setFamily(u"Arial Black")
        font10.setPointSize(12)
        font10.setBold(True)
        font10.setWeight(75)
        self.Brightness_label.setFont(font10)
        self.temp_test = QLabel(self.settings)
        self.temp_test.setObjectName(u"temp_test")
        self.temp_test.setText(u"T20.5 C")
        self.temp_test.setFont(font8)
        self.temp_test.setGeometry(QRect(630, 60, 141, 51))
        # self.temp_test.setFont(font_bold_20)
        self.temp_test_slide = QSlider(self.settings)
        self.temp_test_slide.setObjectName(u"temp_test_slide")
        self.temp_test_slide.setGeometry(QRect(660, 150, 51, 271))
        self.temp_test_slide.setAutoFillBackground(False)
        self.temp_test_slide.setMinimum(-250)
        self.temp_test_slide.setMaximum(450)
        self.temp_test_slide.setSingleStep(5)
        self.temp_test_slide.setPageStep(25)
        self.temp_test_slide.setValue(38)
        self.temp_test_slide.setOrientation(Qt.Vertical)
        self.temp_check_outside = QCheckBox(self.settings)
        self.temp_check_outside.setObjectName(u"temp_check_outside")
        self.temp_check_outside.setText(u"Outside")
        self.temp_check_outside.setGeometry(QRect(640, 110, 86, 20))
        self.grace_period = QSpinBox(self.settings)
        self.grace_period.setObjectName(u"grace_period")
        self.grace_period.setGeometry(QRect(411, 31, 111, 41))
        self.grace_period.setFont(font8)
        self.grace_period.setMinimum(1)
        self.grace_period.setMaximum(60)
        self.grace_period.setValue(self.bedtime_grace_period)
        self.grace_period.setDisplayIntegerBase(10)
        self.grace_period_label = QLabel(self.settings)
        self.grace_period_label.setObjectName(u"grace_period_label")
        self.grace_period_label.setText(u"Grace period:")
        self.grace_period_label.setGeometry(QRect(410, 10, 111, 16))
        self.grace_period_label.setFont(font8)

        #################################################################################################
        # SET ALL LABEL TEXTS
        #################################################################################################

        # if QT_CONFIG(tooltip)
        self.sleep.setToolTip(u"Put display to sleep")
        self.ledball_on2.setToolTip(u"Turn on the LED Ball, mode 2")
        self.ledball_on.setToolTip(u"Turn on the LED Ball.")
        self.ledball_off.setToolTip(u"Turn off the LED Ball.")
        # endif // QT_CONFIG(tooltip)

        #################################################################################################
        # Make the Connections.
        #################################################################################################

        self.temp_test_slide.valueChanged.connect(self.test_temp_update)
        self.temp_check_outside.clicked.connect(self.test_temp_update)

        self.ledball_off.clicked.connect(self.set_ledball_off)
        self.ledball_on.clicked.connect(self.set_ledball_on)
        self.ledball_on2.clicked.connect(self.set_ledball_on2)
        self.sleep.clicked.connect(self.set_sleep)

        self.timeEdit.timeChanged.connect(self.set_bedtime)
        self.grace_period.valueChanged.connect(self.set_grace_period)
        self.Brightness.valueChanged.connect(self.set_screen_brightness)
        self.Brightness.valueChanged.connect(self.Brightness_Value.display)
Exemple #22
0
    def setupUi(self, GroupBox):
        if not GroupBox.objectName():
            GroupBox.setObjectName(u"GroupBox")
        GroupBox.resize(535, 520)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(GroupBox.sizePolicy().hasHeightForWidth())
        GroupBox.setSizePolicy(sizePolicy)
        self.verticalLayout_2 = QVBoxLayout(GroupBox)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.groupBox_occupancy_histogram = QGroupBox(GroupBox)
        self.groupBox_occupancy_histogram.setObjectName(
            u"groupBox_occupancy_histogram")
        self.verticalLayout = QVBoxLayout(self.groupBox_occupancy_histogram)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.label_56 = QLabel(self.groupBox_occupancy_histogram)
        self.label_56.setObjectName(u"label_56")
        self.label_56.setMaximumSize(QSize(16777215, 16777215))
        self.label_56.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout.addWidget(self.label_56)

        self.lineEdit_bins = QLineEdit(self.groupBox_occupancy_histogram)
        self.lineEdit_bins.setObjectName(u"lineEdit_bins")
        self.lineEdit_bins.setMinimumSize(QSize(50, 0))
        self.lineEdit_bins.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout.addWidget(self.lineEdit_bins)

        self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout.addItem(self.horizontalSpacer_3)

        self.label_55 = QLabel(self.groupBox_occupancy_histogram)
        self.label_55.setObjectName(u"label_55")
        self.label_55.setMaximumSize(QSize(16777215, 16777215))
        self.label_55.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout.addWidget(self.label_55)

        self.lineEdit_minimum = QLineEdit(self.groupBox_occupancy_histogram)
        self.lineEdit_minimum.setObjectName(u"lineEdit_minimum")
        self.lineEdit_minimum.setMinimumSize(QSize(50, 0))
        self.lineEdit_minimum.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout.addWidget(self.lineEdit_minimum)

        self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout.addItem(self.horizontalSpacer_2)

        self.label_17 = QLabel(self.groupBox_occupancy_histogram)
        self.label_17.setObjectName(u"label_17")
        self.label_17.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout.addWidget(self.label_17)

        self.lineEdit_maximum = QLineEdit(self.groupBox_occupancy_histogram)
        self.lineEdit_maximum.setObjectName(u"lineEdit_maximum")
        self.lineEdit_maximum.setMinimumSize(QSize(50, 0))
        self.lineEdit_maximum.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout.addWidget(self.lineEdit_maximum)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.horizontalLayout_7 = QHBoxLayout()
        self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
        self.checkBox_cumulative_histogram = QCheckBox(
            self.groupBox_occupancy_histogram)
        self.checkBox_cumulative_histogram.setObjectName(
            u"checkBox_cumulative_histogram")

        self.horizontalLayout_7.addWidget(self.checkBox_cumulative_histogram)

        self.horizontalSpacer_12 = QSpacerItem(40, 20, QSizePolicy.Fixed,
                                               QSizePolicy.Minimum)

        self.horizontalLayout_7.addItem(self.horizontalSpacer_12)

        self.checkBox_stacked_histogram = QCheckBox(
            self.groupBox_occupancy_histogram)
        self.checkBox_stacked_histogram.setObjectName(
            u"checkBox_stacked_histogram")

        self.horizontalLayout_7.addWidget(self.checkBox_stacked_histogram)

        self.horizontalSpacer_11 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                               QSizePolicy.Minimum)

        self.horizontalLayout_7.addItem(self.horizontalSpacer_11)

        self.verticalLayout.addLayout(self.horizontalLayout_7)

        self.horizontalLayout_6 = QHBoxLayout()
        self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
        self.checkBox_color_segments_occupancy = QCheckBox(
            self.groupBox_occupancy_histogram)
        self.checkBox_color_segments_occupancy.setObjectName(
            u"checkBox_color_segments_occupancy")
        self.checkBox_color_segments_occupancy.setChecked(True)

        self.horizontalLayout_6.addWidget(
            self.checkBox_color_segments_occupancy)

        self.horizontalSpacer_9 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_6.addItem(self.horizontalSpacer_9)

        self.verticalLayout.addLayout(self.horizontalLayout_6)

        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                            QSizePolicy.Minimum)

        self.horizontalLayout_2.addItem(self.horizontalSpacer)

        self.pushButton_save_occupancy = QPushButton(
            self.groupBox_occupancy_histogram)
        self.pushButton_save_occupancy.setObjectName(
            u"pushButton_save_occupancy")

        self.horizontalLayout_2.addWidget(self.pushButton_save_occupancy)

        self.pushButton_plot_occupancy = QPushButton(
            self.groupBox_occupancy_histogram)
        self.pushButton_plot_occupancy.setObjectName(
            u"pushButton_plot_occupancy")
        self.pushButton_plot_occupancy.setAutoDefault(False)

        self.horizontalLayout_2.addWidget(self.pushButton_plot_occupancy)

        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.verticalLayout_2.addWidget(self.groupBox_occupancy_histogram)

        self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                            QSizePolicy.Expanding)

        self.verticalLayout_2.addItem(self.verticalSpacer_2)

        self.groupBox_nb_connections = QGroupBox(GroupBox)
        self.groupBox_nb_connections.setObjectName(u"groupBox_nb_connections")
        self.verticalLayout_3 = QVBoxLayout(self.groupBox_nb_connections)
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.checkBox_color_segments_timeseries = QCheckBox(
            self.groupBox_nb_connections)
        self.checkBox_color_segments_timeseries.setObjectName(
            u"checkBox_color_segments_timeseries")
        self.checkBox_color_segments_timeseries.setChecked(True)

        self.horizontalLayout_5.addWidget(
            self.checkBox_color_segments_timeseries)

        self.horizontalSpacer_7 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_5.addItem(self.horizontalSpacer_7)

        self.verticalLayout_3.addLayout(self.horizontalLayout_5)

        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
        self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_4.addItem(self.horizontalSpacer_5)

        self.pushButton_save_timeseries = QPushButton(
            self.groupBox_nb_connections)
        self.pushButton_save_timeseries.setObjectName(
            u"pushButton_save_timeseries")

        self.horizontalLayout_4.addWidget(self.pushButton_save_timeseries)

        self.pushButton_plot_timeseries = QPushButton(
            self.groupBox_nb_connections)
        self.pushButton_plot_timeseries.setObjectName(
            u"pushButton_plot_timeseries")
        self.pushButton_plot_timeseries.setAutoDefault(False)

        self.horizontalLayout_4.addWidget(self.pushButton_plot_timeseries)

        self.verticalLayout_3.addLayout(self.horizontalLayout_4)

        self.verticalLayout_2.addWidget(self.groupBox_nb_connections)

        self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                          QSizePolicy.Expanding)

        self.verticalLayout_2.addItem(self.verticalSpacer)

        self.groupBox_joint_occupancy = QGroupBox(GroupBox)
        self.groupBox_joint_occupancy.setObjectName(
            u"groupBox_joint_occupancy")
        self.verticalLayout_4 = QVBoxLayout(self.groupBox_joint_occupancy)
        self.verticalLayout_4.setObjectName(u"verticalLayout_4")
        self.horizontalLayout_10 = QHBoxLayout()
        self.horizontalLayout_10.setObjectName(u"horizontalLayout_10")
        self.radioButton_scatter = QRadioButton(self.groupBox_joint_occupancy)
        self.radioButton_scatter.setObjectName(u"radioButton_scatter")
        self.radioButton_scatter.setChecked(True)

        self.horizontalLayout_10.addWidget(self.radioButton_scatter)

        self.label_3 = QLabel(self.groupBox_joint_occupancy)
        self.label_3.setObjectName(u"label_3")

        self.horizontalLayout_10.addWidget(self.label_3)

        self.lineEdit_scatter_size = QLineEdit(self.groupBox_joint_occupancy)
        self.lineEdit_scatter_size.setObjectName(u"lineEdit_scatter_size")
        self.lineEdit_scatter_size.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout_10.addWidget(self.lineEdit_scatter_size)

        self.horizontalSpacer_10 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                               QSizePolicy.Minimum)

        self.horizontalLayout_10.addItem(self.horizontalSpacer_10)

        self.verticalLayout_4.addLayout(self.horizontalLayout_10)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.radioButton_heatmap = QRadioButton(self.groupBox_joint_occupancy)
        self.radioButton_heatmap.setObjectName(u"radioButton_heatmap")

        self.horizontalLayout_3.addWidget(self.radioButton_heatmap)

        self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_3.addItem(self.horizontalSpacer_4)

        self.pushButton_save_jo = QPushButton(self.groupBox_joint_occupancy)
        self.pushButton_save_jo.setObjectName(u"pushButton_save_jo")

        self.horizontalLayout_3.addWidget(self.pushButton_save_jo)

        self.pushButton_plot_jo = QPushButton(self.groupBox_joint_occupancy)
        self.pushButton_plot_jo.setObjectName(u"pushButton_plot_jo")
        self.pushButton_plot_jo.setAutoDefault(False)

        self.horizontalLayout_3.addWidget(self.pushButton_plot_jo)

        self.verticalLayout_4.addLayout(self.horizontalLayout_3)

        self.verticalLayout_2.addWidget(self.groupBox_joint_occupancy)

        self.retranslateUi(GroupBox)

        QMetaObject.connectSlotsByName(GroupBox)
Exemple #23
0
    def __init__(self):
        QMainWindow.__init__(self, None)
        self.setObjectName(_fromUtf8("MainWindow"))
        self.resize(536, 392)
        self.centralwidget = QWidget(self)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.tabWidget = QTabWidget(self.centralwidget)
        self.tabWidget.setGeometry(QtCore.QRect(10, 10, 521, 361))
        self.tabWidget.setTabsClosable(False)
        self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
        self.Insert = QWidget()
        self.Insert.setObjectName(_fromUtf8("Insert"))
        self.layoutWidget_2 = QWidget(self.Insert)
        self.layoutWidget_2.setGeometry(QtCore.QRect(10, 100, 504, 76))
        self.layoutWidget_2.setObjectName(_fromUtf8("layoutWidget_2"))
        self.gridLayout = QGridLayout(self.layoutWidget_2)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                 QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 0, 1, 1)
        self.excelBtn = QPushButton(self.layoutWidget_2)
        self.excelBtn.setMinimumSize(QtCore.QSize(200, 0))
        self.excelBtn.setObjectName(_fromUtf8("excelBtn"))
        self.gridLayout.addWidget(self.excelBtn, 0, 1, 1, 1)
        self.excelLabel = QLabel(self.layoutWidget_2)
        self.excelLabel.setText(_fromUtf8(""))
        self.excelLabel.setAlignment(QtCore.Qt.AlignRight
                                     | QtCore.Qt.AlignTrailing
                                     | QtCore.Qt.AlignVCenter)
        self.excelLabel.setObjectName(_fromUtf8("excelLabel"))
        self.gridLayout.addWidget(self.excelLabel, 1, 0, 1, 2)
        self.sqlBtn = QPushButton(self.layoutWidget_2)
        self.sqlBtn.setMinimumSize(QtCore.QSize(200, 0))
        self.sqlBtn.setObjectName(_fromUtf8("sqlBtn"))
        self.gridLayout.addWidget(self.sqlBtn, 0, 3, 1, 1)
        self.runBtn = QPushButton(self.layoutWidget_2)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.runBtn.sizePolicy().hasHeightForWidth())
        self.runBtn.setSizePolicy(sizePolicy)
        self.runBtn.setMouseTracking(False)
        self.runBtn.setAutoFillBackground(False)
        self.runBtn.setStyleSheet(_fromUtf8("background: transparent;"))
        self.runBtn.setText(_fromUtf8(""))
        icon = QIcon()
        icon.addPixmap(QPixmap(_fromUtf8("icons/run.png")), QIcon.Normal,
                       QIcon.Off)
        self.runBtn.setIcon(icon)
        self.runBtn.setIconSize(QtCore.QSize(64, 64))
        self.runBtn.setObjectName(_fromUtf8("runBtn"))
        self.gridLayout.addWidget(self.runBtn, 0, 2, 2, 1)
        spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                  QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 0, 4, 1, 1)
        self.tabWidget.addTab(self.Insert, _fromUtf8(""))
        self.Search = QWidget()
        self.Search.setObjectName(_fromUtf8("Search"))
        self.layoutWidget = QWidget(self.Search)
        self.layoutWidget.setGeometry(QtCore.QRect(0, 10, 541, 29))
        self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
        self.horizontalLayout = QHBoxLayout(self.layoutWidget)
        self.horizontalLayout.setSizeConstraint(QLayout.SetDefaultConstraint)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem2 = QSpacerItem(40, 20, QSizePolicy.MinimumExpanding,
                                  QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.searchTE = QLineEdit(self.layoutWidget)
        self.searchTE.setObjectName(_fromUtf8("searchTE"))
        self.horizontalLayout.addWidget(self.searchTE)
        self.pushButton_2 = QPushButton(self.layoutWidget)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton_2.sizePolicy().hasHeightForWidth())
        self.pushButton_2.setSizePolicy(sizePolicy)
        self.pushButton_2.setMaximumSize(QtCore.QSize(32, 16777215))
        self.pushButton_2.setStyleSheet(_fromUtf8("color: blue"))
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.horizontalLayout.addWidget(self.pushButton_2)
        self.searchBtn = QPushButton(self.layoutWidget)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.searchBtn.sizePolicy().hasHeightForWidth())
        self.searchBtn.setSizePolicy(sizePolicy)
        self.searchBtn.setStyleSheet(_fromUtf8("border: none"))
        self.searchBtn.setText(_fromUtf8(""))
        icon1 = QIcon()
        icon1.addPixmap(
            QPixmap(
                _fromUtf8(
                    "../../.designer/gitlab/ExcelToSql/icons/searchBtn.png")),
            QIcon.Normal, QIcon.Off)
        self.searchBtn.setIcon(icon1)
        self.searchBtn.setIconSize(QtCore.QSize(48, 24))
        self.searchBtn.setObjectName(_fromUtf8("searchBtn"))
        self.horizontalLayout.addWidget(self.searchBtn)
        self.tableWidget = QTableWidget(self.Search)
        self.tableWidget.setGeometry(QtCore.QRect(0, 50, 541, 271))
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        self.tableWidget.setColumnCount(3)
        self.tableWidget.setRowCount(0)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        self.tabWidget.addTab(self.Search, _fromUtf8(""))
        self.tab = QWidget()
        self.tab.setObjectName(_fromUtf8("tab"))
        self.tabWidget.addTab(self.tab, _fromUtf8(""))
        self.setCentralWidget(self.centralwidget)
        self.statusBar = QStatusBar(self)
        self.statusBar.setObjectName(_fromUtf8("statusbar"))
        self.setStatusBar(self.statusBar)

        self.retranslateUi(self)
        self.tabWidget.setCurrentIndex(1)
        QtCore.QMetaObject.connectSlotsByName(self)
        self.excelFileName = None
        self.sqlFileName = "/home/eamon/Desktop/test.sqlite"
        self.sqlLabel.setText(self.sqlFileName)

        self.excelBtn.clicked.connect(self, QtCore.SLOT("onExcelBtnClick()"))
        self.sqlBtn.clicked.connect(self, QtCore.SLOT("onSqlBtnClick()"))
        self.runBtn.clicked.connect(self, QtCore.SLOT("onRunBtnClick()"))
Exemple #24
0
    def __init__(self):
        QMainWindow.__init__(self, None)
        self.setObjectName(_fromUtf8("MainWindow"))
        self.resize(651, 280)
        self.setMinimumSize(QtCore.QSize(0, 250))
        self.centralwidget = QWidget(self)
        self.centralwidget.setObjectNasqlBtnme(_fromUtf8("centralwidget"))
        self.verticalLayout = QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        spacerItem = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                 QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.gridLayout = QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                  QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 0, 0, 1, 1)
        self.excelBtn = QPushButton(self.centralwidget)
        self.excelBtn.setMinimumSize(QtCore.QSize(200, 0))
        self.excelBtn.setObjectName(_fromUtf8("excelBtn"))
        self.gridLayout.addWidget(self.excelBtn, 0, 1, 1, 1)
        self.sqlBtn = QPushButton(self.centralwidget)
        self.sqlBtn.setMinimumSize(QtCore.QSize(200, 0))
        self.sqlBtn.setObjectName(_fromUtf8("sqlBtn"))
        self.gridLayout.addWidget(self.sqlBtn, 0, 3, 1, 1)
        self.runBtn = QPushButton(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.runBtn.sizePolicy().hasHeightForWidth())
        self.runBtn.setSizePolicy(sizePolicy)
        self.runBtn.setEnabled(False)
        self.runBtn.setMouseTracking(False)
        self.runBtn.setAutoFillBackground(False)
        self.runBtn.setStyleSheet(_fromUtf8("border: none;"))
        self.runBtn.setText(_fromUtf8(""))
        icon = QIcon()
        icon.addPixmap(QPixmap(_fromUtf8("icons/run.png")), QIcon.Normal,
                       QIcon.Off)
        self.runBtn.setIcon(icon)
        self.runBtn.setIconSize(QtCore.QSize(64, 64))
        self.runBtn.setObjectName(_fromUtf8("runBtn"))
        self.gridLayout.addWidget(self.runBtn, 0, 2, 2, 1)
        spacerItem2 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                  QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 0, 4, 1, 1)
        self.sqlLabel = QLabel(self.centralwidget)
        self.sqlLabel.setText(_fromUtf8(""))
        self.sqlLabel.setObjectName(_fromUtf8("sqlLabel"))
        self.gridLayout.addWidget(self.sqlLabel, 1, 3, 1, 2)
        self.excelLabel = QLabel(self.centralwidget)
        self.excelLabel.setText(_fromUtf8(""))
        self.excelLabel.setAlignment(QtCore.Qt.AlignRight
                                     | QtCore.Qt.AlignTrailing
                                     | QtCore.Qt.AlignVCenter)
        self.excelLabel.setObjectName(_fromUtf8("excelLabel"))
        self.gridLayout.addWidget(self.excelLabel, 1, 0, 1, 2)
        self.verticalLayout.addLayout(self.gridLayout)
        spacerItem3 = QSpacerItem(0, 0, QSizePolicy.Minimum,
                                  QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem3)
        self.setCentralWidget(self.centralwidget)
        self.statusbar = QStatusBar(self)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        self.setStatusBar(self.statusbar)

        self.retranslateUi()
        QtCore.QMetaObject.connectSlotsByName(self)

        self.excelFileName = None
        self.sqlFileName = "/home/eamon/Desktop/test.sqlite"
        self.sqlLabel.setText(self.sqlFileName)

        self.excelBtn.clicked.connect(self, QtCore.SLOT("onExcelBtnClick()"))
        self.sqlBtn.clicked.connect(self, QtCore.SLOT("onSqlBtnClick()"))
        self.runBtn.clicked.connect(self, QtCore.SLOT("onRunBtnClick()"))
Exemple #25
0
    def setupUi(self, GroupBox):
        if not GroupBox.objectName():
            GroupBox.setObjectName(u"GroupBox")
        GroupBox.resize(528, 576)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(GroupBox.sizePolicy().hasHeightForWidth())
        GroupBox.setSizePolicy(sizePolicy)
        self.verticalLayout_2 = QVBoxLayout(GroupBox)
        self.verticalLayout_2.setObjectName(u"verticalLayout_2")
        self.groupBox = QGroupBox(GroupBox)
        self.groupBox.setObjectName(u"groupBox")
        self.verticalLayout_4 = QVBoxLayout(self.groupBox)
        self.verticalLayout_4.setObjectName(u"verticalLayout_4")
        self.horizontalLayout_7 = QHBoxLayout()
        self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
        self.horizontalSpacer_7 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_7.addItem(self.horizontalSpacer_7)

        self.pushButton_degree_save = QPushButton(self.groupBox)
        self.pushButton_degree_save.setObjectName(u"pushButton_degree_save")

        self.horizontalLayout_7.addWidget(self.pushButton_degree_save)

        self.verticalLayout_4.addLayout(self.horizontalLayout_7)

        self.verticalLayout_2.addWidget(self.groupBox)

        self.verticalSpacer_2 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                            QSizePolicy.Expanding)

        self.verticalLayout_2.addItem(self.verticalSpacer_2)

        self.groupBox_degree = QGroupBox(GroupBox)
        self.groupBox_degree.setObjectName(u"groupBox_degree")
        self.verticalLayout_3 = QVBoxLayout(self.groupBox_degree)
        self.verticalLayout_3.setObjectName(u"verticalLayout_3")
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.radioButton_betweenness = QRadioButton(self.groupBox_degree)
        self.radioButton_betweenness.setObjectName(u"radioButton_betweenness")

        self.horizontalLayout_2.addWidget(self.radioButton_betweenness)

        self.radioButton_degree = QRadioButton(self.groupBox_degree)
        self.radioButton_degree.setObjectName(u"radioButton_degree")
        self.radioButton_degree.setChecked(True)

        self.horizontalLayout_2.addWidget(self.radioButton_degree)

        self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_2.addItem(self.horizontalSpacer_5)

        self.verticalLayout_3.addLayout(self.horizontalLayout_2)

        self.checkBox_averaged_frames = QCheckBox(self.groupBox_degree)
        self.checkBox_averaged_frames.setObjectName(
            u"checkBox_averaged_frames")
        self.checkBox_averaged_frames.setChecked(True)

        self.verticalLayout_3.addWidget(self.checkBox_averaged_frames)

        self.checkBox_normalized = QCheckBox(self.groupBox_degree)
        self.checkBox_normalized.setObjectName(u"checkBox_normalized")

        self.verticalLayout_3.addWidget(self.checkBox_normalized)

        self.groupBox_per_residue = QGroupBox(self.groupBox_degree)
        self.groupBox_per_residue.setObjectName(u"groupBox_per_residue")
        self.groupBox_per_residue.setCheckable(True)
        self.verticalLayout = QVBoxLayout(self.groupBox_per_residue)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.horizontalLayout_6 = QHBoxLayout()
        self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
        self.label_2 = QLabel(self.groupBox_per_residue)
        self.label_2.setObjectName(u"label_2")

        self.horizontalLayout_6.addWidget(self.label_2)

        self.comboBox = QComboBox(self.groupBox_per_residue)
        self.comboBox.setObjectName(u"comboBox")

        self.horizontalLayout_6.addWidget(self.comboBox)

        self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_6.addItem(self.horizontalSpacer_2)

        self.verticalLayout.addLayout(self.horizontalLayout_6)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.label_10 = QLabel(self.groupBox_per_residue)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout.addWidget(self.label_10)

        self.lineEdit_degree_residue_ids = QLineEdit(self.groupBox_per_residue)
        self.lineEdit_degree_residue_ids.setObjectName(
            u"lineEdit_degree_residue_ids")

        self.horizontalLayout.addWidget(self.lineEdit_degree_residue_ids)

        self.horizontalSpacer_6 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout.addItem(self.horizontalSpacer_6)

        self.verticalLayout.addLayout(self.horizontalLayout)

        self.verticalLayout_3.addWidget(self.groupBox_per_residue)

        self.groupBox_histogram = QGroupBox(self.groupBox_degree)
        self.groupBox_histogram.setObjectName(u"groupBox_histogram")
        self.groupBox_histogram.setCheckable(True)
        self.groupBox_histogram.setChecked(False)
        self.verticalLayout_5 = QVBoxLayout(self.groupBox_histogram)
        self.verticalLayout_5.setObjectName(u"verticalLayout_5")
        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.label_56 = QLabel(self.groupBox_histogram)
        self.label_56.setObjectName(u"label_56")
        self.label_56.setMaximumSize(QSize(16777215, 16777215))
        self.label_56.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout_3.addWidget(self.label_56)

        self.lineEdit_bins = QLineEdit(self.groupBox_histogram)
        self.lineEdit_bins.setObjectName(u"lineEdit_bins")
        self.lineEdit_bins.setMinimumSize(QSize(50, 0))
        self.lineEdit_bins.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout_3.addWidget(self.lineEdit_bins)

        self.label_55 = QLabel(self.groupBox_histogram)
        self.label_55.setObjectName(u"label_55")
        self.label_55.setMaximumSize(QSize(16777215, 16777215))
        self.label_55.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout_3.addWidget(self.label_55)

        self.lineEdit_minimum = QLineEdit(self.groupBox_histogram)
        self.lineEdit_minimum.setObjectName(u"lineEdit_minimum")
        self.lineEdit_minimum.setMinimumSize(QSize(50, 0))
        self.lineEdit_minimum.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout_3.addWidget(self.lineEdit_minimum)

        self.label_17 = QLabel(self.groupBox_histogram)
        self.label_17.setObjectName(u"label_17")
        self.label_17.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                   | Qt.AlignVCenter)

        self.horizontalLayout_3.addWidget(self.label_17)

        self.lineEdit_maximum = QLineEdit(self.groupBox_histogram)
        self.lineEdit_maximum.setObjectName(u"lineEdit_maximum")
        self.lineEdit_maximum.setMinimumSize(QSize(50, 0))
        self.lineEdit_maximum.setMaximumSize(QSize(50, 16777215))

        self.horizontalLayout_3.addWidget(self.lineEdit_maximum)

        self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_3.addItem(self.horizontalSpacer_3)

        self.verticalLayout_5.addLayout(self.horizontalLayout_3)

        self.horizontalLayout_8 = QHBoxLayout()
        self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
        self.checkBox_cumulative_histogram = QCheckBox(self.groupBox_histogram)
        self.checkBox_cumulative_histogram.setObjectName(
            u"checkBox_cumulative_histogram")

        self.horizontalLayout_8.addWidget(self.checkBox_cumulative_histogram)

        self.horizontalSpacer_12 = QSpacerItem(40, 20, QSizePolicy.Fixed,
                                               QSizePolicy.Minimum)

        self.horizontalLayout_8.addItem(self.horizontalSpacer_12)

        self.checkBox_stacked_histogram = QCheckBox(self.groupBox_histogram)
        self.checkBox_stacked_histogram.setObjectName(
            u"checkBox_stacked_histogram")

        self.horizontalLayout_8.addWidget(self.checkBox_stacked_histogram)

        self.horizontalSpacer_11 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                               QSizePolicy.Minimum)

        self.horizontalLayout_8.addItem(self.horizontalSpacer_11)

        self.verticalLayout_5.addLayout(self.horizontalLayout_8)

        self.horizontalLayout_9 = QHBoxLayout()
        self.horizontalLayout_9.setObjectName(u"horizontalLayout_9")
        self.checkBox_color_segments_occupancy = QCheckBox(
            self.groupBox_histogram)
        self.checkBox_color_segments_occupancy.setObjectName(
            u"checkBox_color_segments_occupancy")
        self.checkBox_color_segments_occupancy.setChecked(True)

        self.horizontalLayout_9.addWidget(
            self.checkBox_color_segments_occupancy)

        self.horizontalSpacer_9 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_9.addItem(self.horizontalSpacer_9)

        self.verticalLayout_5.addLayout(self.horizontalLayout_9)

        self.verticalLayout_3.addWidget(self.groupBox_histogram)

        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
        self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                            QSizePolicy.Minimum)

        self.horizontalLayout_5.addItem(self.horizontalSpacer)

        self.pushButton_degree_plot = QPushButton(self.groupBox_degree)
        self.pushButton_degree_plot.setObjectName(u"pushButton_degree_plot")
        self.pushButton_degree_plot.setAutoDefault(False)

        self.horizontalLayout_5.addWidget(self.pushButton_degree_plot)

        self.verticalLayout_3.addLayout(self.horizontalLayout_5)

        self.verticalLayout_2.addWidget(self.groupBox_degree)

        self.retranslateUi(GroupBox)

        QMetaObject.connectSlotsByName(GroupBox)
Exemple #26
0
    def setupUi(self, Ventana):
        if not Ventana.objectName():
            Ventana.setObjectName(u"Ventana")
        Ventana.resize(424, 600)
        Ventana.setAttribute(Qt.WA_TranslucentBackground)
        Ventana.setWindowFlag(Qt.FramelessWindowHint)
        Ventana.setStyleSheet(
            u"*{\n"
            "	font-family: century gothic;\n"
            "}\n"
            "\n"
            "QSizeGrip{\n"
            "       background: transparent;\n"
            "}\n"
            "\n"
            "QLabel{\n"
            "	color: white;\n"
            "}\n"
            "\n"
            "QScrollBar:vertical {\n"
            "            border: 1px solid #999999;\n"
            "            width:12px;    \n"
            "            margin: 0px 0px 0px 0px;\n"
            "        }\n"
            "        QScrollBar::handle:vertical {         \n"
            "       \n"
            "            min-height: 0px;\n"
            "          	border: 0px solid red;\n"
            "			border-radius: 4px;\n"
            "			background-color: rgb(182, 182, 182);\n"
            "        }\n"
            "        QScrollBar::add-line:vertical {       \n"
            "            height: 0px;\n"
            "            subcontrol-position: bottom;\n"
            "            subcontrol-origin: margin;\n"
            "        }\n"
            "        QScrollBar::sub-line:vertical {\n"
            "            height: 0 px;\n"
            "            subcontrol-position: top;\n"
            "            subcontrol-origin: margin;\n"
            "        }")
        self.gridLayout = QGridLayout(Ventana)
        self.gridLayout.setObjectName(u"gridLayout")
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.VentanaFrame = QFrame(Ventana)
        self.VentanaFrame.setObjectName(u"VentanaFrame")
        self.VentanaFrame.setStyleSheet(
            u"QFrame#VentanaFrame{\n"
            "	background-color: qlineargradient(spread:pad, x1:0.953, y1:1, x2:1, y2:0, stop:0 	#075E54, stop:1 #128C7E);\n"
            "	border-radius: 5px;\n"
            "}")
        self.VentanaFrame.setFrameShape(QFrame.StyledPanel)
        self.VentanaFrame.setFrameShadow(QFrame.Raised)
        self.gridLayout_2 = QGridLayout(self.VentanaFrame)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.gridLayout_2.setContentsMargins(-1, 0, -1, -1)
        self.Contenedor = QFrame(self.VentanaFrame)
        self.Contenedor.setObjectName(u"Contenedor")
        self.Contenedor.setStyleSheet(u"QFrame#Contenedor{\n"
                                      "	background-color: #128C7E;\n"
                                      "	border-radius: 5px;\n"
                                      "}")
        self.Contenedor.setFrameShape(QFrame.StyledPanel)
        self.Contenedor.setFrameShadow(QFrame.Raised)
        self.gridLayout_5 = QGridLayout(self.Contenedor)
        self.gridLayout_5.setObjectName(u"gridLayout_5")
        self.gridLayout_5.setContentsMargins(0, 10, 0, 10)
        self.frameAcciones = QFrame(self.Contenedor)
        self.frameAcciones.setObjectName(u"frameAcciones")
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.frameAcciones.sizePolicy().hasHeightForWidth())
        self.frameAcciones.setSizePolicy(sizePolicy)
        self.frameAcciones.setStyleSheet(u"")
        self.frameAcciones.setFrameShape(QFrame.StyledPanel)
        self.frameAcciones.setFrameShadow(QFrame.Raised)
        self.gridLayout_4 = QGridLayout(self.frameAcciones)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.btnExportar = QPushButton(self.frameAcciones)
        self.btnExportar.setObjectName(u"btnExportar")
        sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Minimum)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(
            self.btnExportar.sizePolicy().hasHeightForWidth())
        self.btnExportar.setSizePolicy(sizePolicy1)
        self.btnExportar.setMinimumSize(QSize(100, 30))
        self.btnExportar.setCursor(QCursor(Qt.PointingHandCursor))
        self.btnExportar.setStyleSheet(u"QPushButton#btnExportar{\n"
                                       "background-color: #ecf0f1;\n"
                                       "border-radius: 5px;\n"
                                       "}\n"
                                       "\n"
                                       "QPushButton#btnExportar:hover{\n"
                                       "background-color: #bdc3c7;\n"
                                       "border-radius: 5px;\n"
                                       "}")
        icon1 = QIcon()
        icon1.addFile(u":/logo/exportar.png", QSize(), QIcon.Normal, QIcon.Off)
        self.btnExportar.setIcon(icon1)
        self.btnExportar.setIconSize(QSize(16, 16))

        self.gridLayout_4.addWidget(self.btnExportar, 0, 2, 1, 1)

        self.btnAbrir = QPushButton(self.frameAcciones)
        self.btnAbrir.setObjectName(u"btnAbrir")
        sizePolicy1.setHeightForWidth(
            self.btnAbrir.sizePolicy().hasHeightForWidth())
        self.btnAbrir.setSizePolicy(sizePolicy1)
        self.btnAbrir.setMinimumSize(QSize(100, 30))
        self.btnAbrir.setCursor(QCursor(Qt.PointingHandCursor))
        self.btnAbrir.setStyleSheet(u"QPushButton#btnAbrir{\n"
                                    "background-color: #ecf0f1;\n"
                                    "border-radius: 5px;\n"
                                    "}\n"
                                    "\n"
                                    "QPushButton#btnAbrir:hover{\n"
                                    "background-color: #bdc3c7;\n"
                                    "}")
        icon2 = QIcon()
        icon2.addFile(u":/logo/anadir.png", QSize(), QIcon.Normal, QIcon.Off)
        self.btnAbrir.setIcon(icon2)
        self.btnAbrir.setIconSize(QSize(16, 16))

        self.gridLayout_4.addWidget(self.btnAbrir, 0, 1, 1, 1)

        self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.gridLayout_4.addItem(self.horizontalSpacer_2, 0, 0, 1, 1)

        self.horizontalSpacer_3 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.gridLayout_4.addItem(self.horizontalSpacer_3, 0, 3, 1, 1)

        self.gridLayout_5.addWidget(self.frameAcciones, 2, 0, 1, 1)

        self.frameTabla = QFrame(self.Contenedor)
        self.frameTabla.setObjectName(u"frameTabla")
        sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(
            self.frameTabla.sizePolicy().hasHeightForWidth())
        self.frameTabla.setSizePolicy(sizePolicy2)
        self.frameTabla.setStyleSheet(u"")
        self.frameTabla.setFrameShape(QFrame.StyledPanel)
        self.frameTabla.setFrameShadow(QFrame.Raised)
        self.horizontalLayout_2 = QHBoxLayout(self.frameTabla)
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.horizontalSpacer_4 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_2.addItem(self.horizontalSpacer_4)

        self.tableWidget = QTableWidget(self.frameTabla)
        if (self.tableWidget.columnCount() < 2):
            self.tableWidget.setColumnCount(2)
        __qtablewidgetitem = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, __qtablewidgetitem)
        __qtablewidgetitem1 = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, __qtablewidgetitem1)
        if (self.tableWidget.rowCount() < 50):
            self.tableWidget.setRowCount(50)
        __qtablewidgetitem2 = QTableWidgetItem()
        self.tableWidget.setItem(0, 0, __qtablewidgetitem2)
        self.tableWidget.setObjectName(u"tableWidget")
        sizePolicy1.setHeightForWidth(
            self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy1)
        self.tableWidget.setMinimumSize(QSize(350, 0))
        self.tableWidget.setStyleSheet(u"QTableWidget#tableWidget:item{\n"
                                       "color:white;\n"
                                       "font-weight: bold;\n"
                                       "}\n"
                                       "\n"
                                       "QTableWidget#tableWidget{\n"
                                       "border-radius:4px;\n"
                                       "background-color: #128C7E;\n"
                                       "}")
        self.tableWidget.setRowCount(50)

        self.horizontalLayout_2.addWidget(self.tableWidget)

        self.horizontalSpacer_5 = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                              QSizePolicy.Minimum)

        self.horizontalLayout_2.addItem(self.horizontalSpacer_5)

        self.gridLayout_5.addWidget(self.frameTabla, 3, 0, 1, 1)

        self.header = QFrame(self.Contenedor)
        self.header.setObjectName(u"header")
        sizePolicy.setHeightForWidth(
            self.header.sizePolicy().hasHeightForWidth())
        self.header.setSizePolicy(sizePolicy)
        self.header.setStyleSheet(u"")
        self.header.setFrameShape(QFrame.StyledPanel)
        self.header.setFrameShadow(QFrame.Raised)
        self.horizontalLayout = QHBoxLayout(self.header)
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.horizontalLayout.setContentsMargins(0, 0, 5, 0)
        self.horizontalSpacer = QSpacerItem(0, 0, QSizePolicy.Expanding,
                                            QSizePolicy.Minimum)

        self.horizontalLayout.addItem(self.horizontalSpacer)

        self.btnVerde = QPushButton(self.header)
        self.btnVerde.setObjectName(u"btnVerde")
        self.btnVerde.setMaximumSize(QSize(16, 16))
        self.btnVerde.setCursor(QCursor(Qt.PointingHandCursor))
        self.btnVerde.setStyleSheet(u"QPushButton#btnVerde{\n"
                                    "	background-color: #27ae60;\n"
                                    "	border-radius: 8px;\n"
                                    "}\n"
                                    "\n"
                                    "QPushButton#btnVerde:hover{\n"
                                    "	background-color: #10ac84;\n"
                                    "	border-radius: 8px;\n"
                                    "}")

        self.horizontalLayout.addWidget(self.btnVerde)

        self.btnAmarillo = QPushButton(self.header)
        self.btnAmarillo.setObjectName(u"btnAmarillo")
        self.btnAmarillo.setMaximumSize(QSize(16, 16))
        self.btnAmarillo.setCursor(QCursor(Qt.PointingHandCursor))
        self.btnAmarillo.setStyleSheet(u"QPushButton#btnAmarillo{\n"
                                       "background-color: yellow;\n"
                                       "border-radius: 8px;\n"
                                       "}\n"
                                       "\n"
                                       "QPushButton#btnAmarillo:hover{\n"
                                       "background-color: #f1c40f;\n"
                                       "border-radius: 8px;\n"
                                       "}\n"
                                       "")

        self.horizontalLayout.addWidget(self.btnAmarillo)

        self.btnRojo = QPushButton(self.header)
        self.btnRojo.setObjectName(u"btnRojo")
        self.btnRojo.setMaximumSize(QSize(16, 16))
        self.btnRojo.setCursor(QCursor(Qt.PointingHandCursor))
        self.btnRojo.setStyleSheet(u"QPushButton#btnRojo{\n"
                                   "background-color: red;\n"
                                   "border-radius: 8px;\n"
                                   "}\n"
                                   "\n"
                                   "QPushButton#btnRojo:hover{\n"
                                   "background-color: #e74c3c;\n"
                                   "border-radius: 8px;\n"
                                   "}")

        self.horizontalLayout.addWidget(self.btnRojo)

        self.gridLayout_5.addWidget(self.header, 0, 0, 1, 1)

        self.frameLogo = QFrame(self.Contenedor)
        self.frameLogo.setObjectName(u"frameLogo")
        sizePolicy.setHeightForWidth(
            self.frameLogo.sizePolicy().hasHeightForWidth())
        self.frameLogo.setSizePolicy(sizePolicy)
        self.frameLogo.setStyleSheet(u"")
        self.frameLogo.setFrameShape(QFrame.StyledPanel)
        self.frameLogo.setFrameShadow(QFrame.Raised)
        self.gridLayout_3 = QGridLayout(self.frameLogo)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.lblWhatsPy = QLabel(self.frameLogo)
        self.lblWhatsPy.setObjectName(u"lblWhatsPy")
        font = QFont()
        font.setFamily(u"century gothic")
        font.setBold(True)
        font.setWeight(75)
        self.lblWhatsPy.setFont(font)
        self.lblWhatsPy.setAlignment(Qt.AlignCenter)

        self.gridLayout_3.addWidget(self.lblWhatsPy, 1, 0, 1, 1)

        self.icon = QLabel(self.frameLogo)
        self.icon.setObjectName(u"icon")
        self.icon.setMaximumSize(QSize(70, 70))
        self.icon.setPixmap(QPixmap(u":/logo/logo.png"))
        self.icon.setScaledContents(True)

        self.gridLayout_3.addWidget(self.icon, 0, 0, 1, 1)

        self.gridLayout_5.addWidget(self.frameLogo, 1, 0, 1, 1)

        self.label = QLabel(self.Contenedor)
        self.label.setObjectName(u"label")
        sizePolicy.setHeightForWidth(
            self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setFont(font)
        self.label.setAlignment(Qt.AlignCenter)

        self.gridLayout_5.addWidget(self.label, 4, 0, 1, 1)

        self.gridLayout_2.addWidget(self.Contenedor, 0, 0, 1, 1)

        self.lblGrip = QLabel(self.VentanaFrame)
        self.lblGrip.setObjectName(u"lblGrip")
        sizePolicy.setHeightForWidth(
            self.lblGrip.sizePolicy().hasHeightForWidth())
        self.lblGrip.setSizePolicy(sizePolicy)
        self.lblGrip.setMaximumSize(QSize(10, 10))
        self.lblGrip.setCursor(QCursor(Qt.BusyCursor))
        self.lblGrip.setLayoutDirection(Qt.RightToLeft)
        self.lblGrip.setStyleSheet(
            u"QLabel#lblGrip:hover{\n"
            "	background: rgb(18, 140, 126);\n"
            "	border-radius: 5px;\n"
            "}\n"
            "\n"
            "QLabel#lblGrip{\n"
            "	background-color: qlineargradient(spread:pad, x1:0.953, y1:1, x2:1, y2:0, stop:0 	#075E54, stop:1 #128C7E);\n"
            "	border-radius: 5px;\n"
            "}")

        self.gridLayout_2.addWidget(self.lblGrip, 1, 0, 1, 1)

        self.gridLayout.addWidget(self.VentanaFrame, 0, 0, 1, 1)

        self.retranslateUi(Ventana)

        QMetaObject.connectSlotsByName(Ventana)
Exemple #27
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(484, 371)
        self.centralWidget = QWidget(MainWindow)
        sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.centralWidget.sizePolicy().hasHeightForWidth())
        self.centralWidget.setSizePolicy(sizePolicy)
        self.centralWidget.setObjectName("centralWidget")
        self.horizontalLayout = QHBoxLayout(self.centralWidget)
        self.horizontalLayout.setContentsMargins(11, 11, 11, 11)
        self.horizontalLayout.setSpacing(6)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setSpacing(6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.playlistView = QListView(self.centralWidget)
        self.playlistView.setAcceptDrops(True)
        self.playlistView.setProperty("showDropIndicator", True)
        self.playlistView.setDragDropMode(QAbstractItemView.DropOnly)
        self.playlistView.setAlternatingRowColors(True)
        self.playlistView.setUniformItemSizes(True)
        self.playlistView.setObjectName("playlistView")
        self.verticalLayout.addWidget(self.playlistView)
        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setSpacing(6)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.currentTimeLabel = QLabel(self.centralWidget)
        self.currentTimeLabel.setMinimumSize(QSize(80, 0))
        self.currentTimeLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                           | Qt.AlignVCenter)
        self.currentTimeLabel.setObjectName("currentTimeLabel")
        self.horizontalLayout_4.addWidget(self.currentTimeLabel)
        self.timeSlider = QSlider(self.centralWidget)
        self.timeSlider.setOrientation(Qt.Horizontal)
        self.timeSlider.setObjectName("timeSlider")
        self.horizontalLayout_4.addWidget(self.timeSlider)
        self.totalTimeLabel = QLabel(self.centralWidget)
        self.totalTimeLabel.setMinimumSize(QSize(80, 0))
        self.totalTimeLabel.setAlignment(Qt.AlignLeading | Qt.AlignLeft
                                         | Qt.AlignVCenter)
        self.totalTimeLabel.setObjectName("totalTimeLabel")
        self.horizontalLayout_4.addWidget(self.totalTimeLabel)
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        self.horizontalLayout_5 = QHBoxLayout()
        self.horizontalLayout_5.setSpacing(6)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.previousButton = QPushButton(self.centralWidget)
        self.previousButton.setText("")
        icon = QIcon()
        icon.addPixmap(QPixmap("images/control-skip-180.png"), QIcon.Normal,
                       QIcon.Off)
        self.previousButton.setIcon(icon)
        self.previousButton.setObjectName("previousButton")
        self.horizontalLayout_5.addWidget(self.previousButton)
        self.playButton = QPushButton(self.centralWidget)
        self.playButton.setText("")
        icon1 = QIcon()
        icon1.addPixmap(QPixmap("images/control.png"), QIcon.Normal, QIcon.Off)
        self.playButton.setIcon(icon1)
        self.playButton.setObjectName("playButton")
        self.horizontalLayout_5.addWidget(self.playButton)
        self.pauseButton = QPushButton(self.centralWidget)
        self.pauseButton.setText("")
        icon2 = QIcon()
        icon2.addPixmap(QPixmap("images/control-pause.png"), QIcon.Normal,
                        QIcon.Off)
        self.pauseButton.setIcon(icon2)
        self.pauseButton.setObjectName("pauseButton")
        self.horizontalLayout_5.addWidget(self.pauseButton)
        self.stopButton = QPushButton(self.centralWidget)
        self.stopButton.setText("")
        icon3 = QIcon()
        icon3.addPixmap(QPixmap("images/control-stop-square.png"),
                        QIcon.Normal, QIcon.Off)
        self.stopButton.setIcon(icon3)
        self.stopButton.setObjectName("stopButton")
        self.horizontalLayout_5.addWidget(self.stopButton)
        self.nextButton = QPushButton(self.centralWidget)
        self.nextButton.setText("")
        icon4 = QIcon()
        icon4.addPixmap(QPixmap("images/control-skip.png"), QIcon.Normal,
                        QIcon.Off)
        self.nextButton.setIcon(icon4)
        self.nextButton.setObjectName("nextButton")
        self.horizontalLayout_5.addWidget(self.nextButton)
        self.viewButton = QPushButton(self.centralWidget)
        self.viewButton.setText("")
        icon5 = QIcon()
        icon5.addPixmap(QPixmap("images/application-image.png"), QIcon.Normal,
                        QIcon.Off)
        self.viewButton.setIcon(icon5)
        self.viewButton.setCheckable(True)
        self.viewButton.setObjectName("viewButton")
        self.horizontalLayout_5.addWidget(self.viewButton)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                 QSizePolicy.Minimum)
        self.horizontalLayout_5.addItem(spacerItem)
        self.label = QLabel(self.centralWidget)
        self.label.setText("")
        self.label.setPixmap(QPixmap("images/speaker-volume.png"))
        self.label.setObjectName("label")
        self.horizontalLayout_5.addWidget(self.label)
        self.volumeSlider = QSlider(self.centralWidget)
        self.volumeSlider.setMaximum(100)
        self.volumeSlider.setProperty("value", 100)
        self.volumeSlider.setOrientation(Qt.Horizontal)
        self.volumeSlider.setObjectName("volumeSlider")
        self.horizontalLayout_5.addWidget(self.volumeSlider)
        self.verticalLayout.addLayout(self.horizontalLayout_5)
        self.horizontalLayout.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralWidget)
        self.menuBar = QMenuBar(MainWindow)
        self.menuBar.setGeometry(QRect(0, 0, 484, 22))
        self.menuBar.setObjectName("menuBar")
        self.menuFIle = QMenu(self.menuBar)
        self.menuFIle.setObjectName("menuFIle")
        MainWindow.setMenuBar(self.menuBar)
        self.statusBar = QStatusBar(MainWindow)
        self.statusBar.setObjectName("statusBar")
        MainWindow.setStatusBar(self.statusBar)
        self.open_file_action = QAction(MainWindow)
        self.open_file_action.setObjectName("open_file_action")
        self.menuFIle.addAction(self.open_file_action)
        self.menuBar.addAction(self.menuFIle.menuAction())

        self.retranslateUi(MainWindow)
        QMetaObject.connectSlotsByName(MainWindow)
Exemple #28
0
    def __init__(self):
        super().__init__()       
        # Setup UI and Show
        self.setupUi(self)
        #Forms
        self.formsMAC = list()
        self.comTransf = ComPortTransf()
        self.comCLI = KX028_CLI(self.comTransf)

        self.setStyleSheet(dockWidgetStyles)
        # Toolbars - Forms
        self.toolBarViews = self.addToolBar('Views')
        self.lblKX028 = QtWidgets.QLabel(self.toolBarViews)
        self.lblKX028.setText('1923KX028:')
        self.lblKX028.setStyleSheet(TOOLBAR_LABEL_STYLES)
        self.toolBarViews.addWidget(self.lblKX028)
        self.lblKX028.setAlignment(Qt.AlignLeft)        

        self.toolBarViews.addAction('MAC Table', self.CreateViewMAC)
        self.toolBarViews.addAction('VLAN Table', self.CreateViewVLAN)
        self.toolBarViews.addAction('Ports', self.CreateViewPort)
        self.toolBarViews.addAction('Statistics', self.CreateViewStats)
        self.toolBarViews.addAction('Debug', self.CreateViewDebug)
        # Toolbars - VV3
        self.toolBarVV3 = self.addToolBar('BB3')
        
        self.lblVV3 = QtWidgets.QLabel(self.toolBarVV3)
        self.lblVV3.setText('5600BB3:')
        self.lblVV3.setStyleSheet(TOOLBAR_LABEL_STYLES)
        self.toolBarVV3.addWidget(self.lblVV3)
        self.lblVV3.setAlignment(Qt.AlignLeft)

        self.toolBarVV3.addAction('MAC Table', self.CreateViewMAC_VV3)
        self.toolBarVV3.addAction('Registers', self.CreateDebug_VV3)
        # Toolbars - Connect
        self.toolBarCom = self.addToolBar('Connect')

        self.cbxComSel = QtWidgets.QComboBox(self.toolBarCom)
        self.toolBarCom.addWidget(self.cbxComSel)
        self.cbxComSel.setObjectName(u"cbxComSel")
        self.cbxComSel.setMinimumSize(QSize(70, 24))
        self.cbxComSel.setMaximumSize(QSize(80, 16777215))
        self.cbxComSel.currentTextChanged.connect(self.changeComPort)

        self.cbxComBaud = QtWidgets.QComboBox(self.toolBarCom)
        self.cbxComBaud.setObjectName(u"cbxComBaud")        
        self.toolBarCom.addWidget(self.cbxComBaud)
        self.cbxComBaud.setMinimumSize(QSize(100, 24))
        self.cbxComBaud.setEditable(True)        
        self.cbxComBaud.currentTextChanged.connect(self.changeComBaud)

        self.btStatus = QtWidgets.QPushButton(self.toolBarCom)
        self.btStatus.setObjectName(u"btStatus")
        self.toolBarCom.addWidget(self.btStatus)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(24)
        sizePolicy.setVerticalStretch(24)
        sizePolicy.setHeightForWidth(self.btStatus.sizePolicy().hasHeightForWidth())
        self.btStatus.setSizePolicy(sizePolicy)
        self.btStatus.setMinimumSize(QSize(24, 24))
        self.btStatus.setMaximumSize(QSize(24, 24))
        self.btStatus.setContextMenuPolicy(Qt.NoContextMenu)
        self.btStatus.setStyleSheet(u"")
        self.btStatus.setFlat(False)
        

        #self.actConnect = self.toolBarCom.addAction('Connect', self.ComConnect)
        self.btConnect = QtWidgets.QPushButton(self.toolBarCom)
        self.btConnect.setObjectName(u"btConnect")
        self.toolBarCom.addWidget(self.btConnect)        
        self.btConnect.setMinimumSize(QSize(80, 26))   
        self.btConnect.clicked.connect(self.ComConnect)     
        self.showConnected()

        # DockArea
        self.setDockNestingEnabled(False)
        self.setCorner(Qt.TopLeftCorner, Qt.LeftDockWidgetArea)
        self.setCorner(Qt.TopRightCorner, Qt.RightDockWidgetArea)
        self.setCorner(Qt.BottomLeftCorner, Qt.LeftDockWidgetArea)
        self.setCorner(Qt.BottomRightCorner, Qt.RightDockWidgetArea)
        # Central widget problem
        self.centralwidget.hide()
        #self.centralwidget.setMaximumSize(0, 0)

        self.saveFileName = str(Path().absolute()) + '/saves/Main.ini'
        settings = QSettings(self.saveFileName, QSettings.IniFormat)
        WindowRestoreGeometry(self, settings)
        self.loadSettings(saveComFileName)
        # Form Show
        self.show()
Exemple #29
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(330, 417)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.horizontalLayout = QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.lineEdit = QLineEdit(self.centralwidget)
        self.lineEdit.setObjectName("lineEdit")
        self.horizontalLayout_3.addWidget(self.lineEdit)
        self.pushButton = QPushButton(self.centralwidget)
        self.pushButton.setText("")
        icon = QIcon()
        icon.addPixmap(QPixmap("images/arrow-circle-225.png"), QIcon.Normal, QIcon.Off)
        self.pushButton.setIcon(icon)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout_3.addWidget(self.pushButton)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_4 = QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.weatherIcon = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.weatherIcon.sizePolicy().hasHeightForWidth())
        self.weatherIcon.setSizePolicy(sizePolicy)
        self.weatherIcon.setMinimumSize(QSize(64, 64))
        self.weatherIcon.setMaximumSize(QSize(64, 64))
        self.weatherIcon.setText("")
        self.weatherIcon.setObjectName("weatherIcon")
        self.horizontalLayout_4.addWidget(self.weatherIcon)
        self.weatherLabel = QLabel(self.centralwidget)
        self.weatherLabel.setText("")
        self.weatherLabel.setObjectName("weatherLabel")
        self.horizontalLayout_4.addWidget(self.weatherLabel)
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        self.gridLayout_2 = QGridLayout()
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.forecastIcon4 = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forecastIcon4.sizePolicy().hasHeightForWidth())
        self.forecastIcon4.setSizePolicy(sizePolicy)
        self.forecastIcon4.setMinimumSize(QSize(64, 64))
        self.forecastIcon4.setMaximumSize(QSize(200, 32))
        self.forecastIcon4.setBaseSize(QSize(0, 0))
        self.forecastIcon4.setText("")
        self.forecastIcon4.setAlignment(Qt.AlignCenter)
        self.forecastIcon4.setObjectName("forecastIcon4")
        self.gridLayout_2.addWidget(self.forecastIcon4, 1, 3, 1, 1)
        self.forecastTemp2 = QLabel(self.centralwidget)
        self.forecastTemp2.setText("")
        self.forecastTemp2.setObjectName("forecastTemp2")
        self.gridLayout_2.addWidget(self.forecastTemp2, 2, 1, 1, 1)
        self.forecastTemp5 = QLabel(self.centralwidget)
        self.forecastTemp5.setText("")
        self.forecastTemp5.setObjectName("forecastTemp5")
        self.gridLayout_2.addWidget(self.forecastTemp5, 2, 4, 1, 1)
        self.forecastTemp4 = QLabel(self.centralwidget)
        self.forecastTemp4.setText("")
        self.forecastTemp4.setObjectName("forecastTemp4")
        self.gridLayout_2.addWidget(self.forecastTemp4, 2, 3, 1, 1)
        self.forecastIcon2 = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forecastIcon2.sizePolicy().hasHeightForWidth())
        self.forecastIcon2.setSizePolicy(sizePolicy)
        self.forecastIcon2.setMinimumSize(QSize(64, 64))
        self.forecastIcon2.setMaximumSize(QSize(200, 32))
        self.forecastIcon2.setBaseSize(QSize(0, 0))
        self.forecastIcon2.setText("")
        self.forecastIcon2.setAlignment(Qt.AlignCenter)
        self.forecastIcon2.setObjectName("forecastIcon2")
        self.gridLayout_2.addWidget(self.forecastIcon2, 1, 1, 1, 1)
        self.forecastIcon5 = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forecastIcon5.sizePolicy().hasHeightForWidth())
        self.forecastIcon5.setSizePolicy(sizePolicy)
        self.forecastIcon5.setMinimumSize(QSize(64, 64))
        self.forecastIcon5.setMaximumSize(QSize(200, 32))
        self.forecastIcon5.setBaseSize(QSize(0, 0))
        self.forecastIcon5.setText("")
        self.forecastIcon5.setAlignment(Qt.AlignCenter)
        self.forecastIcon5.setObjectName("forecastIcon5")
        self.gridLayout_2.addWidget(self.forecastIcon5, 1, 4, 1, 1)
        self.forecastIcon1 = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forecastIcon1.sizePolicy().hasHeightForWidth())
        self.forecastIcon1.setSizePolicy(sizePolicy)
        self.forecastIcon1.setMinimumSize(QSize(64, 64))
        self.forecastIcon1.setMaximumSize(QSize(200, 32))
        self.forecastIcon1.setBaseSize(QSize(0, 0))
        self.forecastIcon1.setText("")
        self.forecastIcon1.setAlignment(Qt.AlignCenter)
        self.forecastIcon1.setObjectName("forecastIcon1")
        self.gridLayout_2.addWidget(self.forecastIcon1, 1, 0, 1, 1)
        self.forecastIcon3 = QLabel(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forecastIcon3.sizePolicy().hasHeightForWidth())
        self.forecastIcon3.setSizePolicy(sizePolicy)
        self.forecastIcon3.setMinimumSize(QSize(64, 64))
        self.forecastIcon3.setMaximumSize(QSize(200, 32))
        self.forecastIcon3.setBaseSize(QSize(0, 0))
        self.forecastIcon3.setText("")
        self.forecastIcon3.setAlignment(Qt.AlignCenter)
        self.forecastIcon3.setObjectName("forecastIcon3")
        self.gridLayout_2.addWidget(self.forecastIcon3, 1, 2, 1, 1)
        self.forecastTemp3 = QLabel(self.centralwidget)
        self.forecastTemp3.setText("")
        self.forecastTemp3.setObjectName("forecastTemp3")
        self.gridLayout_2.addWidget(self.forecastTemp3, 2, 2, 1, 1)
        self.forecastTemp1 = QLabel(self.centralwidget)
        self.forecastTemp1.setText("")
        self.forecastTemp1.setObjectName("forecastTemp1")
        self.gridLayout_2.addWidget(self.forecastTemp1, 2, 0, 1, 1)
        self.forecastTime1 = QLabel(self.centralwidget)
        self.forecastTime1.setAlignment(Qt.AlignCenter)
        self.forecastTime1.setObjectName("forecastTime1")
        self.gridLayout_2.addWidget(self.forecastTime1, 0, 0, 1, 1)
        self.forecastTime2 = QLabel(self.centralwidget)
        self.forecastTime2.setAlignment(Qt.AlignCenter)
        self.forecastTime2.setObjectName("forecastTime2")
        self.gridLayout_2.addWidget(self.forecastTime2, 0, 1, 1, 1)
        self.forecastTime3 = QLabel(self.centralwidget)
        self.forecastTime3.setAlignment(Qt.AlignCenter)
        self.forecastTime3.setObjectName("forecastTime3")
        self.gridLayout_2.addWidget(self.forecastTime3, 0, 2, 1, 1)
        self.forecastTime4 = QLabel(self.centralwidget)
        self.forecastTime4.setAlignment(Qt.AlignCenter)
        self.forecastTime4.setObjectName("forecastTime4")
        self.gridLayout_2.addWidget(self.forecastTime4, 0, 3, 1, 1)
        self.forecastTime5 = QLabel(self.centralwidget)
        self.forecastTime5.setAlignment(Qt.AlignCenter)
        self.forecastTime5.setObjectName("forecastTime5")
        self.gridLayout_2.addWidget(self.forecastTime5, 0, 4, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout_2)
        self.gridLayout = QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.formLayout = QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label_5 = QLabel(self.centralwidget)
        font = QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_5.setFont(font)
        self.label_5.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_5.setObjectName("label_5")
        self.formLayout.setWidget(2, QFormLayout.LabelRole, self.label_5)
        self.label_6 = QLabel(self.centralwidget)
        self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self.formLayout.setWidget(3, QFormLayout.LabelRole, self.label_6)
        self.temperatureLabel = QLabel(self.centralwidget)
        self.temperatureLabel.setText("")
        self.temperatureLabel.setObjectName("temperatureLabel")
        self.formLayout.setWidget(3, QFormLayout.FieldRole, self.temperatureLabel)
        self.label_7 = QLabel(self.centralwidget)
        self.label_7.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_7.setObjectName("label_7")
        self.formLayout.setWidget(4, QFormLayout.LabelRole, self.label_7)
        self.humidityLabel = QLabel(self.centralwidget)
        self.humidityLabel.setText("")
        self.humidityLabel.setObjectName("humidityLabel")
        self.formLayout.setWidget(4, QFormLayout.FieldRole, self.humidityLabel)
        self.label_8 = QLabel(self.centralwidget)
        self.label_8.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_8.setObjectName("label_8")
        self.formLayout.setWidget(5, QFormLayout.LabelRole, self.label_8)
        self.pressureLabel = QLabel(self.centralwidget)
        self.pressureLabel.setText("")
        self.pressureLabel.setObjectName("pressureLabel")
        self.formLayout.setWidget(5, QFormLayout.FieldRole, self.pressureLabel)
        self.label = QLabel(self.centralwidget)
        font = QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label.setObjectName("label")
        self.formLayout.setWidget(6, QFormLayout.LabelRole, self.label)
        self.label_2 = QLabel(self.centralwidget)
        self.label_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(7, QFormLayout.LabelRole, self.label_2)
        self.longitudeLabel = QLabel(self.centralwidget)
        self.longitudeLabel.setText("")
        self.longitudeLabel.setObjectName("longitudeLabel")
        self.formLayout.setWidget(7, QFormLayout.FieldRole, self.longitudeLabel)
        self.label_3 = QLabel(self.centralwidget)
        self.label_3.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.formLayout.setWidget(8, QFormLayout.LabelRole, self.label_3)
        self.latitudeLabel = QLabel(self.centralwidget)
        self.latitudeLabel.setText("")
        self.latitudeLabel.setObjectName("latitudeLabel")
        self.formLayout.setWidget(8, QFormLayout.FieldRole, self.latitudeLabel)
        self.label_4 = QLabel(self.centralwidget)
        self.label_4.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(9, QFormLayout.LabelRole, self.label_4)
        self.sunriseLabel = QLabel(self.centralwidget)
        self.sunriseLabel.setText("")
        self.sunriseLabel.setObjectName("sunriseLabel")
        self.formLayout.setWidget(9, QFormLayout.FieldRole, self.sunriseLabel)
        self.label_9 = QLabel(self.centralwidget)
        self.label_9.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_9.setObjectName("label_9")
        self.formLayout.setWidget(1, QFormLayout.LabelRole, self.label_9)
        self.label_10 = QLabel(self.centralwidget)
        font = QFont()
        font.setBold(True)
        font.setWeight(75)
        self.label_10.setFont(font)
        self.label_10.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter)
        self.label_10.setObjectName("label_10")
        self.formLayout.setWidget(0, QFormLayout.LabelRole, self.label_10)
        self.windLabel = QLabel(self.centralwidget)
        self.windLabel.setText("")
        self.windLabel.setObjectName("windLabel")
        self.formLayout.setWidget(1, QFormLayout.FieldRole, self.windLabel)
        self.label_11 = QLabel(self.centralwidget)
        self.label_11.setText("")
        self.label_11.setObjectName("label_11")
        self.formLayout.setWidget(0, QFormLayout.FieldRole, self.label_11)
        self.label_13 = QLabel(self.centralwidget)
        self.label_13.setText("")
        self.label_13.setObjectName("label_13")
        self.formLayout.setWidget(6, QFormLayout.FieldRole, self.label_13)
        self.label_12 = QLabel(self.centralwidget)
        self.label_12.setText("")
        self.label_12.setObjectName("label_12")
        self.formLayout.setWidget(2, QFormLayout.FieldRole, self.label_12)
        self.gridLayout.addLayout(self.formLayout, 1, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.horizontalLayout.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)

        self.retranslateUi(MainWindow)
        QMetaObject.connectSlotsByName(MainWindow)
Exemple #30
0
    def setupUi(self):
        self.setObjectName(_fromUtf8("MainWindow"))
        self.resize(565, 358)
        self.centralwidget = QWidget(self)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QLayout.SetDefaultConstraint)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem = QSpacerItem(40, 20, QSizePolicy.MinimumExpanding,
                                 QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.searchTE = QLineEdit(self.centralwidget)
        self.searchTE.setObjectName(_fromUtf8("searchTE"))
        self.horizontalLayout.addWidget(self.searchTE)
        self.searchBtn = QPushButton(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.searchBtn.sizePolicy().hasHeightForWidth())
        self.searchBtn.setSizePolicy(sizePolicy)
        self.searchBtn.setStyleSheet(_fromUtf8("border: none"))
        self.searchBtn.setText(_fromUtf8(""))
        icon = QIcon()
        icon.addPixmap(
            QPixmap(
                _fromUtf8(
                    "../.designer/gitlab/ExcelToSql/icons/searchBtn.png")),
            QIcon.Normal, QIcon.Off)
        self.searchBtn.setIcon(icon)
        self.searchBtn.setIconSize(QtCore.QSize(48, 24))
        self.searchBtn.setObjectName(_fromUtf8("searchBtn"))

        self.horizontalLayout.addWidget(self.searchBtn)
        self.pushButton_2 = QPushButton(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pushButton_2.sizePolicy().hasHeightForWidth())
        self.pushButton_2.setSizePolicy(sizePolicy)
        self.pushButton_2.setMaximumSize(QtCore.QSize(32, 16777215))
        self.pushButton_2.setStyleSheet(_fromUtf8("color: blue"))
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))

        self.horizontalLayout.addWidget(self.pushButton_2)
        # self.pushButton_2.clicked.connect(self.onRunBtnClick())

        self.verticalLayout.addLayout(self.horizontalLayout)
        self.gridLayout = QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.dateEdit = QDateEdit(self.centralwidget)
        self.dateEdit.setObjectName(_fromUtf8("dateEdit"))
        self.gridLayout.addWidget(self.dateEdit, 0, 0, 1, 1)
        self.dateEdit_2 = QDateEdit(self.centralwidget)
        self.dateEdit_2.setObjectName(_fromUtf8("dateEdit_2"))
        self.gridLayout.addWidget(self.dateEdit_2, 0, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)
        self.tableWidget = QTableWidget(self.centralwidget)
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.tableWidget.sizePolicy().hasHeightForWidth())
        self.tableWidget.setSizePolicy(sizePolicy)
        self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
        self.tableWidget.setColumnCount(3)
        self.tableWidget.setRowCount(0)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)
        self.verticalLayout.addWidget(self.tableWidget)
        self.setCentralWidget(self.centralwidget)
        self.statusbar = QStatusBar(self)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        self.setStatusBar(self.statusbar)

        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        item = QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(2, item)

        self.retranslateUi()

        QtCore.QMetaObject.connectSlotsByName(self)
        print("A")
        self.pushButton_2.clicked.connect(self, QtCore.SLOT("onRunBtnClick()"))
        print("B")

        conn = sqlite3.connect("/home/eamon/Desktop/test.sqlite")
        result = conn.execute("SELECT * FROM Sheet1")
        for raw_number, raw_data in enumerate(result):
            self.tableWidget.insertRow(raw_number)
            #            print(raw_number)
            for column_number, data in enumerate(raw_data):
                item = QTableWidgetItem(str(data))
                self.tableWidget.setItem(raw_number, column_number, item)


#                print("\t", column_number)

        conn.close()