コード例 #1
0
ファイル: filter.py プロジェクト: pjamesjoyce/futura
    def __init__(self, parent=None):
        super(SubFilterWidget, self).__init__(parent)

        ui_path = 'sub_filter_widget.ui'
        ui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               ui_path)
        load_ui_file(ui_path, self)

        self.search_term = QtWidgets.QLineEdit()
        self.database_choice = QtWidgets.QComboBox()
        self.database_choice.addItems(
            findMainWindow().loader.database.database_names)
        self.location_widget = LocationInputWidget()

        self.input_widgets = {
            'Database': self.database_choice,
            'Location': self.location_widget,
            'Other': self.search_term
        }
        for k, widget in self.input_widgets.items():
            self.horizontalLayout.addWidget(widget)
            if k != 'Other':
                widget.hide()

        self.subaddButton.setIcon(qicons.add)
        self.subaddButton.pressed.connect(self.add_another)

        self.subremoveButton.setIcon(qicons.remove)
        self.subremoveButton.pressed.connect(self.remove_me)

        self.item_box.currentIndexChanged.connect(self.check_item_type)
コード例 #2
0
ファイル: filter.py プロジェクト: pjamesjoyce/futura
    def __init__(self, parent=None):
        super(FilterListerDialog, self).__init__(parent)

        ui_path = 'blank_dialog.ui'
        ui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               ui_path)

        load_ui_file(ui_path, self)
        self.filter_widget = FilterListerWidget()
        self.baseLayout.addWidget(self.filter_widget)
コード例 #3
0
ファイル: run_dialog.py プロジェクト: pjamesjoyce/futura
    def __init__(self, parent=None):
        super(RunDialog, self).__init__(parent)

        ui_path = 'onrun.ui'
        ui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               ui_path)

        load_ui_file(ui_path, self)

        self.buttonPressed = None

        self.pushButton_2.pressed.connect(self.pushButton_2_pressed)
コード例 #4
0
ファイル: main.py プロジェクト: pjamesjoyce/futura
    def __init__(self):
        super(MainWindow, self).__init__(None)

        #ui_path = os.path.join('main_window', 'main.ui')
        ui_path = 'main.ui'
        ui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               ui_path)
        load_ui_file(ui_path, self)

        self.setLocale(
            QtCore.QLocale(QtCore.QLocale.English,
                           QtCore.QLocale.UnitedStates))

        self.loader = FuturaGuiLoader()
        self.identifier = 'MainWindow'

        # Window title
        self.setWindowTitle("{} {}".format(APP_NAME, APP_VERSION))

        self.main_horizontal_box = QtWidgets.QHBoxLayout()

        self.left_panel = LeftPanel(self)
        self.right_panel = RightPanel(self)

        self.splitter.addWidget(self.left_panel)
        self.splitter.addWidget(self.right_panel)
        self.splitter.setStretchFactor(0, 2)
        self.splitter.setStretchFactor(1, 1)

        signals.show_load_actions.emit()

        self.menu_bar = MenuBar(self)

        #Add a progress bar to the status bar
        self.statusBar().showMessage('Ready')
        self.progress_bar = QtWidgets.QProgressBar()
        self.statusBar().addPermanentWidget(self.progress_bar)
        self.progress_bar.setGeometry(30, 40, 50, 25)
        self.progress_bar.setValue(0)
        self.progress_bar.hide()

        # Small icon in main window titlebar
        self.icon = qicons.futura
        self.setWindowIcon(self.icon)

        self.connect_signals()
コード例 #5
0
ファイル: filter.py プロジェクト: pjamesjoyce/futura
    def __init__(self, parent=None):
        super(FilterListerWidget, self).__init__(parent)

        ui_path = 'filter_lister_widget.ui'
        ui_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                               ui_path)

        load_ui_file(ui_path, self)

        self.addButton.setIcon(qicons.add)
        self.addButton.pressed.connect(self.add_filter_step)

        self.removeButton.setIcon(qicons.remove)
        self.removeButton.pressed.connect(self.remove_filter_step)

        self.testButton.pressed.connect(self.test_filter)

        self.filter_steps = []

        self.add_filter_step()