예제 #1
0
 def createView(self):
     """This required function creates the main view container for
        this module, in this case a QTabWidget to hold all the table
        views. The rest of the GUI is handled by the superclass.
     """
     self.tabs = QTabWidget()
     return self.tabs
예제 #2
0
    def setup_ui(self):
        """ Construct the UI for the dialog.

        """
        tab_widget = QTabWidget()

        general_widget = QWidget()
        general_layout = QVBoxLayout()

        general_layout.addWidget(self.setup_general_server_group())
        general_widget.setLayout(general_layout)
        tab_widget.addTab(general_widget, 'General')

        advanced_widget = QWidget()
        advanced_layout = QVBoxLayout()

        warning_label = QLabel('Caution: Changing these settings can potentially break the application.')
        warning_label.setStyleSheet('QLabel { color: red; }')
        advanced_layout.addWidget(warning_label)

        advanced_layout.addWidget(self.setup_advanced_server_group())
        advanced_layout.addWidget(self.setup_advanced_storage_group())
        advanced_widget.setLayout(advanced_layout)
        tab_widget.addTab(advanced_widget, 'Advanced')

        layout = QVBoxLayout()
        layout.addWidget(tab_widget)
        self.setLayout(layout)
예제 #3
0
    def createWidgets(self):
        self.extensionLabel = QLabel("&Extension")
        self.extensionComboBox = QComboBox()
        for markup in self.state.model.markups():
            self.extensionComboBox.addItem(markup)
        self.tooltips.append((self.extensionComboBox, """\
<p><b>Extension</b></p>
<p>Choose the file extension to view and edit its custom markup.</p>"""))
        self.extensionLabel.setBuddy(self.extensionComboBox)
        self.helpButton = QPushButton(QIcon(":/help.svg"), "Help")
        self.tooltips.append(
            (self.helpButton, "Help on the Custom Markup dialog"))
        self.addButton = QPushButton(QIcon(":/add.svg"), "&Add...")
        self.tooltips.append((self.addButton, """\
<p><b>Add</b></p>
<p>Add a new custom markup to the index.</p>"""))
        self.deleteButton = QPushButton(QIcon(":/delete.svg"), "&Delete...")
        self.tooltips.append((self.deleteButton, """\
<p><b>Delete</b></p>
<p>Permanently delete the custom markup from the index's <tt>.xix</tt>
file. (Note that <tt>.ucp</tt> custom markup cannot be deleted.)</p>"""))
        self.closeButton = QPushButton(QIcon(":/dialog-close.svg"), "&Close")
        self.tooltips.append((self.closeButton, """<p><b>Close</b></p>
<p>Close the dialog.</p>"""))
        self.tabWidget = QTabWidget()
        self.documentPanel = CustomMarkupPanels.Document.Panel(
            self.state, self)
        self.characterPanel = CustomMarkupPanels.Character.Panel(
            self.state, self)
        self.tabWidget.addTab(self.documentPanel, "D&ocument")
        self.tabWidget.addTab(self.characterPanel, "C&haracter")
예제 #4
0
class TabDialog(QDialog):
    """This dialog contains tabs with options for everything related
       to the module. Inheriting modules can add their own tabs
       to this dialog by overriding buildTagDialog in ModuleFrame. They
       should all super in order to keep the original tabs.

       Example: a module might create a tab that determines what
       the default aggregation method is for dropped data
    """

    def __init__(self, parent, title=""):
        """Construct a TabDialog with the ModuleFrame parent and the
           given title.
        """
        super(TabDialog, self).__init__(parent)

        self.setWindowTitle(title)
        self.tabs = QTabWidget(self)
        self.setModal(True)

        # Need a layout to get resizing to work
        layout = QGridLayout()
        layout.addWidget(self.tabs, 0, 0)
        self.setLayout(layout)

    def addTab(self, tab, name, index=0):
        """Add the given tab to the TabDialog under the given name
           at the given index. The index 0 means the tab will be
           the active one when the TabDialog is raised.
        """
        viewArea = QScrollArea()
        viewArea.setWidget(tab)
        viewArea.setWidgetResizable(True)
        self.tabs.insertTab(index, viewArea, name)
        self.tabs.setCurrentIndex(0)
예제 #5
0
class MainWindowNurse(QMainWindow):
    def __init__(self, user, parent=None):
        QMainWindow.__init__(self, None)
        self.parent = parent
        self.user = user
        self.crtlDatabase = Nurse.NurseApplication()
        self.initUI()
        self.initLayout()

    def initUI(self):
        posX, posY, sizeW, sizeH = Setting.GEOMETRY_MAINWIDOW
        self.setGeometry(posX, posY, sizeW, sizeH)
        self.setWindowTitle("Nurse window")
        self.setTab()
        self.show()

    def initLayout(self):
        layout = QGridLayout()
        layout.addWidget(self.tabWidget)
        centralWidget = QWidget()
        centralWidget.setLayout(layout)
        self.setCentralWidget(centralWidget)

    def setTab(self):
        self.tabWidget = QTabWidget()
        self.tabWidget.setStyleSheet(Setting.SS_TabWidget)
        self.tab1 = Tab1_PatientClass.Tab1Patient(self.user, self)
        self.tabWidget.addTab(self.tab1, "Patient")

    def getPatientByAN(self, AN):
        return self.crtlDatabase.getPatientByAN(AN)

    def getAppointmentByAN(self, AN):
        return self.crtlDatabase.getAppointmentByAN(AN)
예제 #6
0
class Form(QDialog):

    def __init__(self, parent=None):
        
        super(Form, self).__init__()

        self.tab = QTabWidget()

        # Add demo data for tab 1
        x = np.random.normal(size=1000)
        y = np.random.normal(size=1000)
        plot1 = PlotWidget()
        plot1.plot(x, y, pen=None, symbol='o')

        self.tab.insertTab(0, plot1, "random")

        # Add demo data for tab 2
        x = np.linspace(0, 6*np.pi, 1000)
        y = np.sin(x)
        plot2 = PlotWidget()
        plot2.plot(x, y)

        self.tab.insertTab(1, plot2, "sinus")

        self.main_window = QMainWindow()
        self.main_window.setCentralWidget(self.tab)
        self.main_window.show()

        # Force the window to stay on top
        self.setWindowFlags(Qt.WindowStaysOnTopHint)
예제 #7
0
    def __init__(self, boundary_settings, parent=None):
        super(FoamBoundaryWidget, self).__init__(parent)

        assert (boundary_settings)  # each variable could have empty dict

        self.setWindowTitle("Add raw dict as boundary settings")
        self.tabWidget = QTabWidget()
        self.tabs = OrderedDict()
        for variable in boundary_settings.keys():
            vtab = FoamDictWidget(boundary_settings[variable], self)  # accept empty or None
            self.tabs[variable] = vtab
            if variable in _VARIABLE_NAMES.keys():
                variable_name = _VARIABLE_NAMES[variable]
            else:
                variable_name = variable
            self.tabWidget.addTab(vtab, variable_name)
        self.tabWidget.resize(300,300)  # todo: sizeHint()

        self.myLayout = QVBoxLayout()
        help_text = """keys and values are raw string (without ;) 
e.g. 'uniform (1 0 0)', add all necessary key-value pairs
to overwrite automatically generated boundary settings"""
        self.labelHelpText = QLabel(help_text)
        self.labelHelpText.setWordWrap(True)
        self.myLayout.addWidget(self.labelHelpText)
        self.myLayout.addWidget(self.tabWidget)
        self.setLayout(self.myLayout)
예제 #8
0
class TabDialog(QDialog):
    """This dialog contains tabs with options for everything related
       to the module. Inheriting modules can add their own tabs
       to this dialog by overriding buildTagDialog in ModuleFrame. They
       should all super in order to keep the original tabs.

       Example: a module might create a tab that determines what
       the default aggregation method is for dropped data
    """
    def __init__(self, parent, title=""):
        """Construct a TabDialog with the ModuleFrame parent and the
           given title.
        """
        super(TabDialog, self).__init__(parent)

        self.setWindowTitle(title)
        self.tabs = QTabWidget(self)
        self.setModal(True)

        # Need a layout to get resizing to work
        layout = QGridLayout()
        layout.addWidget(self.tabs, 0, 0)
        self.setLayout(layout)

    def addTab(self, tab, name, index=0):
        """Add the given tab to the TabDialog under the given name
           at the given index. The index 0 means the tab will be
           the active one when the TabDialog is raised.
        """
        viewArea = QScrollArea()
        viewArea.setWidget(tab)
        viewArea.setWidgetResizable(True)
        self.tabs.insertTab(index, viewArea, name)
        self.tabs.setCurrentIndex(0)
 def __init__(self, parent=None):
     '''
     Constructor
     '''
     QDialog.__init__(self, parent)
     self._ui = Ui_CreditsDialog()
     self._ui.setupUi(self)
     
     creditsTab = QTabWidget()
     creditSections = info.CREDITS.keys()
     for creditSection in creditSections:
         creditTab = QWidget()
         creditsTab.addTab(creditTab, creditSection)
         vbox = QVBoxLayout(creditTab)
         creditList = ""
         for person in info.CREDITS[creditSection]:
             creditList += ("\n%s [%s]" % (person['name'], person['email']))
         creditLabel = QLabel()
         creditLabel.setStyleSheet("QLabel { background-color : white}")
         creditLabel.setText(creditList)
         creditLabel.setAlignment(Qt.AlignTop | Qt.AlignLeft)
         vbox.addWidget(creditLabel)
     
     vbox = QVBoxLayout()
     vbox.setContentsMargins(0, 0, 0, 0)
     vbox.addWidget(creditsTab)
     self._ui.frame_CreditsTab.setLayout(vbox)
예제 #10
0
    def __init__(self, boundary_settings, parent=None):
        super(FoamBoundaryWidget, self).__init__(parent)

        assert (boundary_settings)  # each variable could have empty dict

        self.tabWidget = QTabWidget()
        self.tabs = OrderedDict()
        for variable in boundary_settings.keys():
            vtab = FoamDictWidget(boundary_settings[variable],
                                  self)  # accept empty or None
            self.tabs[variable] = vtab
            if variable in _VARIABLE_NAMES.keys():
                variable_name = _VARIABLE_NAMES[variable]
            else:
                variable_name = variable
            self.tabWidget.addTab(vtab, variable_name)
        self.tabWidget.resize(300, 300)

        self.myLayout = QVBoxLayout()
        help_text = """keys and values are raw string (without ;) e.g. 'uniform (1 0 0)'
        leave the table empty if do not want to overwrite setting by raw dict in this table
        """
        self.myLayout.addWidget(QLabel(help_text))
        self.myLayout.addWidget(self.tabWidget)
        self.setLayout(self.myLayout)
예제 #11
0
    def __init__(self, renderController, parent=None):
        super(RenderPropWidget, self).__init__(parent=parent)

        # Three tabs: Visualization, data info and slices
        self.visParamTabWidget = RenderParameterWidget(renderController)
        self.dataInfoTabWidget = RenderInfoWidget()
        self.slicesTabWidget = RenderSlicerParamWidget(renderController)

        # Create the load dataset widget
        self.loadDataWidget = QWidget()
        self.loadDataButton = QPushButton()
        self.loadDataButton.setText("Load a dataset")

        layout = QVBoxLayout()
        layout.setAlignment(Qt.AlignTop)
        layout.addWidget(self.loadDataButton)
        self.loadDataWidget.setLayout(layout)

        # Create the tab widget
        self.tabWidget = QTabWidget()
        self.tabWidget.addTab(self.visParamTabWidget, "Visualization")
        self.tabWidget.addTab(self.slicesTabWidget, "Slices")
        self.tabWidget.addTab(self.dataInfoTabWidget, "Data info")

        self.currentTabIndex = 0
        self.extraTabWidget = None
        self.tabWidget.currentChanged.connect(self.tabIndexChanged)

        layout = QVBoxLayout()
        layout.addWidget(self.loadDataWidget)
        self.setLayout(layout)
예제 #12
0
    def __init__(self, main, parent=None):
        QTabWidget.__init__(self, parent=parent)
        self.main = main
        self.parent = parent
        self._restoreFunc = None

        self.setupUi()
예제 #13
0
 def createTabWidget(self):
     self.tabPanel = QTabWidget()
     self.tabPanel.addTab(self.createPositionPanel(), "Position")
     self.tabPanel.addTab(self.createCorporateEventPanel(), "Corporate Event")
     self.tabPanel.addTab(self.createPnLPanel(), "PnL")
     self.tabPanel.addTab(self.createReportMovementPanel(), "Report Movement")
     self.tabPanel.addTab(self.createImporterMovementPanel(), "Import Movement")
     return self.tabPanel
예제 #14
0
 def setTab(self):
     self.tabWidget = QTabWidget()
     self.tabWidget.setStyleSheet(
         "QTabBar::tab { height: 35px; width: 100px; }")
     self.tab1 = Tab1_AllRoomClass.Tab1AllRoom()
     self.tab2 = Tab2_ManagePatientClass.Tab2ManagePatient()
     self.tabWidget.addTab(self.tab1, "Manage Room")
     self.tabWidget.addTab(self.tab2, "Patient")
예제 #15
0
 def setupUi(self):
     self.setWindowTitle('Tab Test')
     self.tabs = QTabWidget(self)
     self.setCentralWidget(self.tabs)
     # QMainWindow inherits QWidget, thus it can simply be added as child
     # widget
     tab = ToolbarTabWidget()
     self.tabs.addTab(tab, 'spam')
예제 #16
0
 def __init__(self, parent=None):
     QTabWidget.__init__(self, parent)
     self.setTabsClosable(True)
     self.setMovable(True)
     self.LastFile = None
     # to see if is new or opened
     # self.setCornerWidget(parent, QtCore.Qt.TopRightCorner)
     #self.tabNavigator = TabNavigator()
     self._already_open = []
예제 #17
0
 def __init__(self, parent=None):
     QTabWidget.__init__(self, parent)
     self.setTabsClosable(True)
     self.setMovable(True)
     self.LastFile = None
     # to see if is new or opened
    # self.setCornerWidget(parent, QtCore.Qt.TopRightCorner)
     #self.tabNavigator = TabNavigator()
     self._already_open = []
예제 #18
0
 def setTab(self):
     self.tabWidget = QTabWidget()
     self.tabWidget.setStyleSheet(Setting.SS_TabWidget)
     self.tab1 = Tab1_CalendarClass.Tab1Calendar(self.user, self)
     self.tab2 = Tab2_PatientClass.Tab2Patient(self.user, self)
     self.tab3 = Tab3_AppointmentClass.Tab3Appointment(self.user, self)
     self.tabWidget.addTab(self.tab1, "Dashboard")
     self.tabWidget.addTab(self.tab2, "Patient")
     self.tabWidget.addTab(self.tab3, "Appointment")
예제 #19
0
 def addTab(self, name ):
     
     newWidget = QWidget()
     layout = QVBoxLayout( newWidget )
     labelEmpty = QLabel(); labelEmpty.setMinimumHeight(5)
     buttonDelete = QPushButton( "Delete Tab" )
     layout.addWidget( labelEmpty )
     layout.addWidget( buttonDelete )
     QTabWidget.addTab( self, newWidget, name )
     
     QtCore.QObject.connect( buttonDelete, QtCore.SIGNAL( 'clicked()' ), self.deleteTab )
예제 #20
0
 def addTab(self, name ):
     
     newWidget = QWidget()
     layout = QVBoxLayout( newWidget )
     labelEmpty = QLabel(); labelEmpty.setMinimumHeight(5)
     buttonDelete = QPushButton( "Delete Tab" )
     layout.addWidget( labelEmpty )
     layout.addWidget( buttonDelete )
     QTabWidget.addTab( self, newWidget, name )
     
     QtCore.QObject.connect( buttonDelete, QtCore.SIGNAL( 'clicked()' ), self.deleteTab )
예제 #21
0
class MainWindow(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        self.setupUi()

    def setupUi(self):
        self.setWindowTitle('Tab Test')
        self.tabs = QTabWidget(self)
        self.setCentralWidget(self.tabs)
        # QMainWindow inherits QWidget, thus it can simply be added as child
        # widget
        tab = ToolbarTabWidget()
        self.tabs.addTab(tab, 'spam')
예제 #22
0
class Console():
    def __init__(self, targetLayoutContainer):
        self.textarea = QTextEdit()
        self.commits = QListWidget()
        
        self.commits.addAction(QAction('Rollback to this revision', self.commits, triggered=self.rollback))
        self.commits.setContextMenuPolicy(Qt.ActionsContextMenu)
        
        self.widget = QTabWidget()
        self.widget.addTab(self.textarea, 'Log')
        self.widget.addTab(self.commits, 'Commits')
        
        targetLayoutContainer.addWidget(self.widget)
        
    def color(self, module, function, color,  *args):
        print module, function, args
        
        prettyString = '<font color="' + color + '"><b>', module, '</b><i>::', function, '</i> --> ', ''.join(args), '</font>'
        self.textarea.append(''.join(prettyString))    
        
    def info(self, module, function, *args):
        print module, function, args
        
        prettyString = '<font color="black"><b>', module, '</b><i>::', function, '</i> --> ', ''.join(args), '</font>'
        self.textarea.append(''.join(prettyString))
        
    def error(self, module, function, *args):
        print module, function, args
        
        prettyString = '<font color="red"><b>', module, '</b><i>::', function, '</i> --> ', ''.join(args), '</font>'
        self.textarea.append(''.join(prettyString))
        
    def warn(self, module, function, *args):
        print module, function, args
        
        prettyString = '<font color="#BE9900"><b>', module, '</b><i>::', function, '</i> --> ', ''.join(args), '</font>'
        self.textarea.append(''.join(prettyString))
        
    def set_commits(self, commits):
        self.commits.clear()
        
        for commit in commits:
            self.commits.addItem(commit)
            
    def clear(self):
        self.textarea.clear()
        
    def rollback(self):
        targetCommit = self.commits.currentItem().text().split(' ')[0]
        if QMessageBox.warning(None, 'Rollback to commit?', 'All commits after ' + targetCommit + ' will be lost, proceed?', QMessageBox.Yes, QMessageBox.No) == QMessageBox.Yes:
            rollback(targetCommit)
예제 #23
0
    def __init__(self, parent, title=""):
        """Construct a TabDialog with the ModuleFrame parent and the
           given title.
        """
        super(TabDialog, self).__init__(parent)

        self.setWindowTitle(title)
        self.tabs = QTabWidget(self)
        self.setModal(True)

        # Need a layout to get resizing to work
        layout = QGridLayout()
        layout.addWidget(self.tabs, 0, 0)
        self.setLayout(layout)
class MultiRenderPropWidget(QWidget):
	"""
	MultiRenderPropWidget is a widget that is displayed under the multi render
	widget. It contains tabs with some controls for interaction and
	visualization of the combined / multi-volume render widget.
	"""
	def __init__(self, multiRenderController, parent=None):
		super(MultiRenderPropWidget, self).__init__(parent=parent)

		# Two tabs: Visualization and Data info
		self.mixParamWidget = RenderParameterWidget(multiRenderController)
		self.transformParamWidget = TransformationParameterWidget()
		self.registrationHistoryWidget = TransformationHistoryWidget()
		self.slicesTabWidget = RenderSlicerParamWidget(multiRenderController)

		# Create the tab widget
		self.tabWidget = QTabWidget()
		self.tabWidget.addTab(self.mixParamWidget, "Mix")
		self.tabWidget.addTab(self.transformParamWidget, "Transformation")
		self.tabWidget.addTab(self.registrationHistoryWidget, "History")
		self.tabWidget.addTab(self.slicesTabWidget, "Slices")

		layout = QVBoxLayout()
		self.setLayout(layout)
		layout.addWidget(self.tabWidget)

		self.registrationHistoryWidget.setMultiRenderWidget(multiRenderController.multiRenderWidget)
예제 #25
0
class ManagerWindow(QMainWindow):
    """
    This is the Add-on Manager's custom window. Not much else to say, really.
    """

    def __init__(self, parent=None):
        super(ManagerWindow, self).__init__(parent)

        # Set the window title and size.
        self.setWindowTitle(self.tr("Add-on Manager"))
        self.setMinimumSize(400, 300)

        # Build the main widget.
        self.tabs = QTabWidget(self)
        self.setCentralWidget(self.tabs)

        # Load up all our tabs.
        for addon_type in sorted(addons.manager._types.keys()):
            tab = AddonTypeTab(addon_type)
            self.tabs.addTab(tab, tab.windowIcon(), tab.windowTitle())

        # Let plugins get in on this.
        plugins.run_signal('opened_addon_manager', self)

        # Icons and Style!
        #style.enable_aero(self)
        self.reload_icons()
        style.style_reloaded.connect(self.reload_icons)
        

    def reload_icons(self):
        """ Reload all of our icons. Which is... one icon. """
        self.setWindowIcon(style.icon('addon-manager'))

    def showRaise(self):
        """ Show and raise the window. """
        self.show()
        self.raise_()
        self.setFocus()

    ##### The Close Event #####################################################

    def closeEvent(self, event):
        """ Disconnect any signals and remove our reference. """
        global _manager_window
        if _manager_window is self:
            _manager_window = None

        style.style_reloaded.disconnect(self.reload_icons)
        plugins.run_signal('closed_addon_manager', self)
예제 #26
0
파일: loader.py 프로젝트: hineybush/keyplus
    def __init__(self, parent, header, device_settings, firmware_settings,
                 error_codes, *args):
        QDialog.__init__(self, parent, *args)
        self.setGeometry(300, 200, 570, 450)
        self.setWindowTitle("Device information")
        table_model = DeviceInformationTable(self, header, device_settings)
        dev_settings_table = QTableView()
        dev_settings_table.setModel(table_model)

        table_model = DeviceInformationTable(self, header, firmware_settings)
        fw_settings_table = QTableView()
        fw_settings_table.setModel(table_model)

        table_model = DeviceInformationTable(self, header, error_codes)
        error_code_table = QTableView()
        error_code_table.setModel(table_model)

        # set font
        # font = QFont("monospace", 10)
        font = QFont("", 10)
        dev_settings_table.setFont(font)
        fw_settings_table.setFont(font)
        # set column width to fit contents (set font first!)
        dev_settings_table.resizeColumnsToContents()
        fw_settings_table.resizeColumnsToContents()
        error_code_table.resizeColumnsToContents()

        tab_view = QTabWidget()
        tab_view.addTab(dev_settings_table, "User settings")
        tab_view.addTab(fw_settings_table, "Firmware settings")
        tab_view.addTab(error_code_table, "Error Codes")

        layout = QVBoxLayout(self)
        layout.addWidget(tab_view)
        self.setLayout(layout)
예제 #27
0
 def __init__(self):
     super(STMainWindow, self).__init__()
     self.createActions()
     self.createMenus()
     layout = QVBoxLayout()
     self.tabs = QTabWidget()
     self.tabs.setTabPosition(QTabWidget.West)
     self.tabs.currentChanged[int].connect(self.tabChanged)
     self.sessiontab = sweattrails.qt.sessiontab.SessionTab(self)
     self.tabs.addTab(self.sessiontab, "Sessions")
     self.tabs.addTab(sweattrails.qt.fitnesstab.FitnessTab(self),
                      "Fitness")
     self.tabs.addTab(sweattrails.qt.profiletab.ProfileTab(self),
                      "Profile")
     self.usertab = sweattrails.qt.usertab.UserTab(self)
     self.tabs.addTab(self.usertab, "Users")
     self.usertab.hide()
     layout.addWidget(self.tabs)
     w = QWidget(self)
     w.setLayout(layout)
     self.setCentralWidget(w)
     self.statusmessage = QLabel()
     self.statusmessage.setMinimumWidth(200)
     self.statusBar().addPermanentWidget(self.statusmessage)
     self.progressbar = QProgressBar()
     self.progressbar.setMinimumWidth(100)
     self.progressbar.setMinimum(0)
     self.progressbar.setMaximum(100)
     self.statusBar().addPermanentWidget(self.progressbar)
     self.setWindowTitle("SweatTrails")
     self.setWindowIconText("SweatTrails")
     icon = QPixmap("image/sweatdrops.png")
     self.setWindowIcon(QIcon(icon))
     QCoreApplication.instance().refresh.connect(self.userSet)
예제 #28
0
 def __init__(self):
     if Jaime.instance:
         raise Exception("Can't call to constructor with another instance created")
     
     self.tabs_widget = QTabWidget()
     self.view = QWebView()
     self.page = QWebPage()
     self.config = SafeConfigParser()        
     Logger.getLoggerFor(self.__class__)
     
     self.tabs_widget.insertTab(0,self.view,'label')
     self.tabs = {}        
     
     self.graph_file = None
     
     self.close_tab_timer = QTimer()
     self.close_tab_timer.setSingleShot(False)
     #cada 30 segundos se cierra un tab
     self.close_tab_timer.setInterval(10000)
     self.view.setPage(self.page)
     self.tabs['mainTab'] = self.view
     
     self.network_manager = CustomNetworkAccessManager.getInstance()        
     self.navigator = Navigator.getInstance()
     self.route_node = YahooRouteNode.getInstance()
     self.graph_parser = GraphParser.getInstance()        
     self.page.setNetworkAccessManager(self.network_manager)
예제 #29
0
파일: report.py 프로젝트: tinavas/FSERP
 def __init__(self):
     ####
     self.report_tab_5 = QWidget()
     self.report_tab_5.setStyleSheet("")
     self.report_tab_5.setObjectName("report_tab_5")
     self.horizontalLayout_8 = QHBoxLayout(self.report_tab_5)
     self.horizontalLayout_8.setObjectName("horizontalLayout_8")
     self.report_detail_tabWidget = QTabWidget(self.report_tab_5)
     self.report_detail_tabWidget.setObjectName("report_detail_tabWidget")
     self.add_tabs()
     self.horizontalLayout_8.addWidget(self.report_detail_tabWidget)
     ###signals and slots && other stuffs
     # self.mainwindow = Ui_MainWindow  # just for the ease of finding the attributes in pycharm
     self.report_detail_tabWidget.currentChanged.connect(self.change_focus)
     self.report_tab_5.setFocusPolicy(Qt.StrongFocus)
     self.report_tab_5.focusInEvent = self.change_focus
예제 #30
0
파일: TableModule.py 프로젝트: LLNL/boxfish
 def createView(self):
     """This required function creates the main view container for
        this module, in this case a QTabWidget to hold all the table
        views. The rest of the GUI is handled by the superclass.
     """
     self.tabs = QTabWidget()
     return self.tabs
예제 #31
0
    def setUpClass(cls):
        super(TestCopyPaste, cls).setUpClass()

        # operation_definition_cache.refresh()

        app = QApplication.instance()
        if app is None:
            app = QApplication(sys.argv)
            # Fix issues with combo box that gets cleared too fast
            app.setEffectEnabled(Qt.UI_AnimateCombo, False)
            cls.app = app

        cls.mw = QMainWindow()
        cls.mw.setMinimumSize(1024, 768)
        cls.edit_order_widget = EditOrderPartsWidget(
            None, None, True, cls.remote_documents_service)
        cls.edit_order_widget._show_blank_order(cls.customer.customer_id)

        # -TRACE-
        cls.order_overview_widget = OrderOverviewWidget(None, None, None, True)
        cls.stack = QTabWidget(None)
        cls.stack.addTab(cls.edit_order_widget, "Edit order")
        # -TRACE-
        cls.stack.addTab(cls.order_overview_widget, "Orders overview")

        cls.mw.setCentralWidget(cls.stack)
        cls.mw.show()
        QTest.qWaitForWindowShown(cls.mw)
        cls.app.processEvents()
예제 #32
0
파일: multi.py 프로젝트: Bertram25/ceed
    def __init__(self, compatibilityManager, filePath):
        editors.UndoStackTabbedEditor.__init__(self, compatibilityManager, filePath)
        QTabWidget.__init__(self)

        self.setTabPosition(QTabWidget.South)
        self.setTabShape(QTabWidget.Triangular)

        self.currentChanged.connect(self.slot_currentChanged)

        # will be -1, that means no tabs are selected
        self.currentTabIndex = self.currentIndex()
        # when canceling tab transfer we have to switch back and avoid unnecessary deactivate/activate cycle
        self.ignoreCurrentChanged = False
        # to avoid unnecessary undo command pushes we ignore currentChanged if we are
        # inside ModeChangeCommand.undo or redo
        self.ignoreCurrentChangedForUndo = False
    def __init__(self, renderController, parent=None):
        super(RenderPropWidget, self).__init__(parent=parent)

        # Three tabs: Visualization, data info and slices
        self.visParamTabWidget = RenderParameterWidget(renderController)
        self.dataInfoTabWidget = RenderInfoWidget()
        self.slicesTabWidget = RenderSlicerParamWidget(renderController)

        # Create the load dataset widget
        self.loadDataWidget = QWidget()
        self.loadDataButton = QPushButton()
        self.loadDataButton.setText("Load a dataset")

        layout = QVBoxLayout()
        layout.setAlignment(Qt.AlignTop)
        layout.addWidget(self.loadDataButton)
        self.loadDataWidget.setLayout(layout)

        # Create the tab widget
        self.tabWidget = QTabWidget()
        self.tabWidget.addTab(self.visParamTabWidget, "Visualization")
        self.tabWidget.addTab(self.dataInfoTabWidget, "Data info")
        self.tabWidget.addTab(self.slicesTabWidget, "Slices")

        layout = QVBoxLayout()
        layout.addWidget(self.loadDataWidget)
        self.setLayout(layout)
예제 #34
0
    def __init__(self):

        super(StartView, self).__init__()

        self.setWindowTitle("hello")
        self.resize(1024, 768)

        # Menu
        main_menu = self.menuBar()

        self.create = main_menu.addMenu('&Create')
        self.run = main_menu.addMenu('&Run')
        self.report = main_menu.addMenu('&Report')
        self.help = main_menu.addMenu('&Help')

        action_batch = self.create.addAction('&Batch')
        action_case = self.create.addAction('&Case')
        action_data = self.create.addAction('&Data')
        action_web = self.create.addAction('&Web')
        action_run = self.run.addAction('&Run')
        action_test = self.run.addAction('&Test')
        action_report = self.report.addAction('&Report')

        self.connect(action_batch, SIGNAL('triggered()'), self.open_batch)
        self.connect(action_case, SIGNAL('triggered()'), self.open_case)
        self.connect(action_test, SIGNAL('triggered()'), self.open_test)
        self.connect(action_data, SIGNAL('triggered()'), self.open_data)
        self.connect(action_web, SIGNAL('triggered()'), self.open_web_object)
        self.connect(action_run, SIGNAL('triggered()'), self.open_run)
        self.connect(action_report, SIGNAL('triggered()'), self.open_report)

        # Dock
        self.dock_category = DockCategory()  # category widget
        self.dock_log = DockBottom()  # log widget
        self.dock_detail = DockDetail()  # detail widget

        self.__dock_displayed = False

        # center widget
        self.__wid_center = QTabWidget()
        self.setCentralWidget(self.__wid_center)

        self.__wid_center.setStyleSheet(get_theme("TabViewMain"))

        self.__wid_center.setTabsClosable(True)
        self.connect(self.__wid_center, SIGNAL("tabCloseRequested(int)"),
                     self.close_tab)
예제 #35
0
파일: guiv2.py 프로젝트: dylziez/SMG
    def __init__(self):
        """ automatically called __init__ function """

        super(UiMain, self).__init__()

        # initialize all the variables that are going to be defined in the
        # future
        self.update_dialog = None
        self.update_dialog_lbl = None
        self.app_select_box = None
        self.selector_lbl = None
        self.current_playing_lbl = None
        self.current_playing = None
        self.misc_messages = None
        self.start_btn = None
        self.output_dir_lbl = None
        self.select_output_dir_btn = None
        self.output_cur_dir_lbl = None
        self.active_items_list = None
        self.inactive_items_list = None
        self.switch_active_item_button_off = None
        self.switch_active_item_button_on = None
        self.switch_output_split_btn = None
        self.switch_output_split_lbl = None

        # initialize the system tray
        # self.system_tray = QSystemTrayIcon(self)
        # self.system_tray.setIcon(QIcon(resource_path('icon.png')))
        # self.system_tray.show()
        # self.system_tray.setToolTip('SMG')
        # self.system_tray.activated.connect(self.on_systray_activated)

        # initialize the main window
        self.setObjectName('self')
        self.setWindowTitle('SMG - By Azeirah')
        self.resize(400, 250)

        # Gives the self an icon
        self.setWindowIcon(QIcon(resource_path('icon.png')))

        # create the tabs
        # the tab widget itself
        self.tabbed_windows = QTabWidget(self)
        self.tabbed_windows.resize(400, 300)

        # tab 1, contains the music player selection
        self.music_players = QFrame()

        # tab 2, contains options
        self.options = QFrame()
        self.tabbed_windows.addTab(self.music_players, 'Music players')
        self.tabbed_windows.addTab(self.options, 'Options')

        # initializes the two tabs, with all the code down below
        self.tab_music_players()
        self.tab_options()

        # shows the main window
        self.show()
예제 #36
0
파일: waste.py 프로젝트: tinavas/FSERP
    def __init__(self):
        ####
        self.waste_tab_6 = QWidget()
        self.waste_tab_6.setStyleSheet("")
        self.waste_tab_6.setObjectName("waste_tab_6")
        self.verticalLayout = QVBoxLayout(self.waste_tab_6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.waste_detail_tabWidget = QTabWidget(self.waste_tab_6)
        self.waste_detail_tabWidget.setObjectName("waste_detail_tabWidget")
        self.add_tabs()
        self.verticalLayout.addWidget(self.waste_detail_tabWidget)

        ##signals and slotts && other stuffs
        # self.mainwindow = Ui_MainWindow  # just for the ease of finding the attributes in pycharm
        self.waste_detail_tabWidget.currentChanged.connect(self.change_focus)
        self.waste_tab_6.setFocusPolicy(Qt.StrongFocus)
        self.waste_tab_6.focusInEvent = self.change_focus
예제 #37
0
    def __init__(self, compatibilityManager, filePath):
        editors.UndoStackTabbedEditor.__init__(self, compatibilityManager,
                                               filePath)
        QTabWidget.__init__(self)

        self.setTabPosition(QTabWidget.South)
        self.setTabShape(QTabWidget.Triangular)

        self.currentChanged.connect(self.slot_currentChanged)

        # will be -1, that means no tabs are selected
        self.currentTabIndex = self.currentIndex()
        # when canceling tab transfer we have to switch back and avoid unnecessary deactivate/activate cycle
        self.ignoreCurrentChanged = False
        # to avoid unnecessary undo command pushes we ignore currentChanged if we are
        # inside ModeChangeCommand.undo or redo
        self.ignoreCurrentChangedForUndo = False
예제 #38
0
파일: gui.py 프로젝트: rancesol/cobaya
class DefaultsDialog(QWidget):

    def __init__(self, kind, module, parent=None):
        super(DefaultsDialog, self).__init__()
        self.clipboard = parent.clipboard
        self.setWindowTitle("%s : %s" % (kind, module))
        self.setGeometry(0, 0, 500, 500)
        self.move(
            QApplication.desktop().screenGeometry().center() - self.rect().center())
        self.show()
        # Main layout
        self.layout = QVBoxLayout()
        self.setLayout(self.layout)
        self.display_tabs = QTabWidget()
        self.display = {}
        for k in ["yaml", "python", "bibliography"]:
            self.display[k] = QTextEdit()
            self.display[k].setLineWrapMode(QTextEdit.NoWrap)
            self.display[k].setFontFamily("mono")
            self.display[k].setCursorWidth(0)
            self.display[k].setReadOnly(True)
            self.display_tabs.addTab(self.display[k], k)
        self.layout.addWidget(self.display_tabs)
        # Fill text
        defaults_txt = get_default_info(
            module, kind, return_yaml=True, fail_if_not_found=True)
        from cobaya.yaml import yaml_load
        self.display["python"].setText(
            "from collections import OrderedDict\n\ninfo = " +
            pformat(yaml_load(defaults_txt)))
        self.display["yaml"].setText(defaults_txt)
        self.display["bibliography"].setText(get_bib_module(module, kind))
        # Buttons
        self.buttons = QHBoxLayout()
        self.close_button = QPushButton('Close', self)
        self.copy_button = QPushButton('Copy to clipboard', self)
        self.buttons.addWidget(self.close_button)
        self.buttons.addWidget(self.copy_button)
        self.close_button.released.connect(self.close)
        self.copy_button.released.connect(self.copy_clipb)
        self.layout.addLayout(self.buttons)

    @Slot()
    def copy_clipb(self):
        self.clipboard.setText(self.display_tabs.currentWidget().toPlainText())
예제 #39
0
파일: cherry.py 프로젝트: mcvmcv/cherry
	def initUI(self): 
		self.setWindowTitle('Cherry Picker')
		self.menubar					= MenuBar()
		self.setMenuBar(self.menubar)
		self.statusBar()
		self.tabs						= QTabWidget()
		self.tabs.setTabsClosable(True)
		self.setCentralWidget(self.tabs)
		self.showMaximized()
예제 #40
0
파일: Options.py 프로젝트: ra2003/xindex
    def createWidgets(self):
        self.generalPanel = OptionsPanels.General.Panel(self.state,
                                                        self.config, self)
        self.rulesPanel = OptionsPanels.Rules.Panel(self.state,
                                                    self.config, self)
        self.displayPanel = OptionsPanels.Display.Panel(self.state,
                                                        self.config, self)
        self.tabWidget = QTabWidget()
        self.tabWidget.addTab(self.generalPanel, "&1  General")
        self.tabWidget.addTab(self.rulesPanel, "&2  Rules")
        self.tabWidget.addTab(self.displayPanel, "&3  Display")
        self.helpButton = QPushButton(QIcon(":/help.svg"), "Help")
        self.tooltips.append((self.helpButton,
                              "Help on the Options dialog"))
        self.closeButton = QPushButton(QIcon(":/dialog-close.svg"),
                                       "&Close")
        self.tooltips.append((self.closeButton, """<p><b>Close</b></p>
<p>Close the dialog, and apply any changes to the index.</p>"""))
예제 #41
0
    def __init__(self):
        QWidget.__init__(self)

        self.title = u"Web对象管理"

        # Page
        _page = PageContainer()

        # Window
        _window = ViewWindow()

        # Widget
        _widget = WidgetContainer()

        # 页面 tab
        _tab = QTabWidget()
        _tab.addTab(_page, _page.title)
        _tab.addTab(_window, _window.title)
        _tab.addTab(_widget, _widget.title)

        _tab.setTabPosition(QTabWidget.West)
        _tab.setStyleSheet(get_theme("TabViewWeb"))

        # 测试区
        self.__test = WidgetTest()
        self.__test.setStyleSheet(get_theme("TestWidget"))

        # 主layout
        _layout = QHBoxLayout()
        _layout.addWidget(_tab)
        _layout.addWidget(self.__test)

        _layout.setStretch(0, 5)
        _layout.setStretch(1, 1)

        _layout.setContentsMargins(0, 0, 0, 0)
        _layout.setSpacing(0)

        self.setLayout(_layout)

        # 信号
        _page.sig_selected.connect(self.set_page)
        _widget.sig_selected.connect(self.set_widget)
        self.__test.sig_exec.connect(self.send)
예제 #42
0
    def testBug909(self):
        fileName = QFile(adjust_filename('bug_909.ui', __file__))
        loader = QUiLoader()
        main_win = loader.load(fileName)
        self.assertEqual(sys.getrefcount(main_win), 2)
        fileName.close()

        tw = QTabWidget(main_win)
        main_win.setCentralWidget(tw)
        main_win.show()
예제 #43
0
 def __init__(self, targetLayoutContainer):
     self.textarea = QTextEdit()
     self.commits = QListWidget()
     
     self.commits.addAction(QAction('Rollback to this revision', self.commits, triggered=self.rollback))
     self.commits.setContextMenuPolicy(Qt.ActionsContextMenu)
     
     self.widget = QTabWidget()
     self.widget.addTab(self.textarea, 'Log')
     self.widget.addTab(self.commits, 'Commits')
     
     targetLayoutContainer.addWidget(self.widget)
예제 #44
0
class MainWindowRoomManager(QMainWindow):
    def __init__(self, user):
        QMainWindow.__init__(self, None)
        self.initUI()
        self.initLayout()
        self.user = user

    def initUI(self):
        posX, posY, sizeW, sizeH = Setting.GEOMETRY_MAINWIDOW
        self.setGeometry(posX, posY, sizeW, sizeH)
        self.setWindowTitle("RoomManager Main Window")
        self.setTab()
        self.show()

    def initLayout(self):
        layout = QGridLayout()
        layout.addWidget(self.tabWidget)
        centralWidget = QWidget()
        centralWidget.setLayout(layout)
        self.setCentralWidget(centralWidget)

    def setTab(self):
        self.tabWidget = QTabWidget()
        self.tabWidget.setStyleSheet(
            "QTabBar::tab { height: 35px; width: 100px; }")
        self.tab1 = Tab1_AllRoomClass.Tab1AllRoom()
        self.tab2 = Tab2_ManagePatientClass.Tab2ManagePatient()
        self.tabWidget.addTab(self.tab1, "Manage Room")
        self.tabWidget.addTab(self.tab2, "Patient")
예제 #45
0
class TabView():
    def __init__(self, targetLayoutContainer):
        self.tabs = QTabWidget()
        targetLayoutContainer.addWidget(self.tabs, 10)
    
    def set_logger(self, logger):
        self.logger = logger
        
    def show_page(self, page):
        print 'page is ' + page.item.name
        widget = QWidget()
        
        layout = QHBoxLayout()
        widget.setLayout(layout)
        
        pageWidget = pages.get_page_widget(page, layout, self)
        self.tabs.insertTab(0, widget, page.label)
        self.tabs.setCurrentIndex(0)
        
    def save_page(self, page):
        self.logger.info(__name__, 'save_page', page.description())
        controller.save_page(page)
        
    def clear(self):
        self.tabs.clear()
        print 'cleared'
예제 #46
0
    def _init_widgets(self):

        tab = QTabWidget()

        self._init_pathgroups_tab(tab)
        self._init_settings_tab(tab)
        self._init_avoids_tab(tab)

        layout = QVBoxLayout()
        layout.addWidget(tab)
        layout.setContentsMargins(0, 0, 0, 0)

        self.setLayout(layout)
예제 #47
0
    def createWidgets(self):
        self.tabWidget = QTabWidget()
        self.generalOutputPanel = OutputPanels.GeneralOutput.Panel(
            self.state, self.config, self)
        self.entryXRefOutputPanel = OutputPanels.EntryXRefOutput.Panel(
            self.state, self.config, self)
        self.subentryXRefOutputPanel = (OutputPanels.SubentryXRefOutput.Panel(
            self.state, self.config, self))
        self.specificOutputPanel = OutputPanels.SpecificOutput.Panel(
            self.state, self.config, self)
        self.tabWidget.addTab(self.generalOutputPanel, "&1 General")
        self.tabWidget.addTab(self.entryXRefOutputPanel,
                              "&2 Entry Cross-references")
        self.tabWidget.addTab(self.subentryXRefOutputPanel,
                              "&3 Subentry Cross-references")
        self.tabWidget.addTab(self.specificOutputPanel, "&4 Format Specific")
        self.helpButton = QPushButton(QIcon(":/help.svg"), "Help")
        self.tooltips.append(
            (self.helpButton, "Help on the Output Options dialog"))
        self.closeButton = QPushButton(QIcon(":/dialog-close.svg"), "&Close")
        self.tooltips.append((self.closeButton, """<p><b>Close</b></p>
<p>Close the dialog.</p>"""))
예제 #48
0
    def addTab(self, widget, title):
        if self.tabs is None:
            self.tabs = QTabWidget(self)
            self.tabs.currentChanged[int].connect(self.tabChanged)

            # Remove stretch at the bottom:
            self._removeStretch()
            self.vbox.addWidget(self.tabs, 1)
        if isinstance(widget, FormPage):
            self.form.addSubLayout(widget.form)
        self.tabs.addTab(widget, title)
        self._tabs[title] = widget
        return widget
예제 #49
0
    def __init__(self, parent, title=""):
        """Construct a TabDialog with the ModuleFrame parent and the
           given title.
        """
        super(TabDialog, self).__init__(parent)

        self.setWindowTitle(title)
        self.tabs = QTabWidget(self)
        self.setModal(True)

        # Need a layout to get resizing to work
        layout = QGridLayout()
        layout.addWidget(self.tabs, 0, 0)
        self.setLayout(layout)
예제 #50
0
    def __init__(self, parent=None):
        super(ManagerWindow, self).__init__(parent)

        # Set the window title and size.
        self.setWindowTitle(self.tr("Add-on Manager"))
        self.setMinimumSize(400, 300)

        # Build the main widget.
        self.tabs = QTabWidget(self)
        self.setCentralWidget(self.tabs)

        # Load up all our tabs.
        for addon_type in sorted(addons.manager._types.keys()):
            tab = AddonTypeTab(addon_type)
            self.tabs.addTab(tab, tab.windowIcon(), tab.windowTitle())

        # Let plugins get in on this.
        plugins.run_signal('opened_addon_manager', self)

        # Icons and Style!
        #style.enable_aero(self)
        self.reload_icons()
        style.style_reloaded.connect(self.reload_icons)
예제 #51
0
class mainWindow(QMainWindow):
    def __init__(self):
        QMainWindow.__init__(self)
        self.setWindowTitle("SimulationZ")
        self.setMinimumSize(700,500)
        self.workspaceLayout = QGridLayout()
        self.workspace = QTabWidget()
        self.workspace.setTabsClosable(True)
        
        self.graphScene = QGraphicsScene()
        self.sceneView = QGraphicsView()
        self.sceneView.setScene(self.graphScene)
        
        self.Editor = Editor(self.sceneView)
        
        self.menuBar = menuBar.menuBar(self)
        self.setMenuBar(self.menuBar)

        self.mainArea = Layout.layout(self.Editor,self.sceneView)
        self.setCentralWidget(self.mainArea)
        
        self.toolBar = self.mainArea.childAt(1,0)
        
    def exitFile(self):     
        if self.i==0:         
            userInfo =QMessageBox.question(self,self.language.Exit,self.language.RUSURE,QMessageBox.Yes | QMessageBox.No)
            if userInfo == QMessageBox.Yes: 
                self.close()
            else:
                pass
        else:
            userInfo =QMessageBox.question(self,self.language.Exit,self.language.OTab,QMessageBox.Yes | QMessageBox.No)
            if userInfo == QMessageBox.Yes: 
                self.close()
            else:
                pass
예제 #52
0
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)

        # Variables
        self._tabs = {}
        self._widgets = {}
        self._readonly = False

        # Widgets
        self._wdg_tab = QTabWidget()

        # Layouts
        layout = QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)
        layout.addWidget(self._wdg_tab)
        self.setLayout(layout)
예제 #53
0
    def __init__(self, parent, settings):
        QDialog.__init__( self, parent )

        self.settings = settings

        tabWidget = QTabWidget()

        #Representations
        self.repWidget = RepresentationPane(self.settings.get_rep_settings())

        tabWidget.addTab(self.repWidget,'Representations')


        #Network Tab

        self.networkWidget = NetworkPane(self.settings.get_network_settings())
        tabWidget.addTab(self.networkWidget, 'Network')


        self.specWidget = SpecgramPane(self.settings.get_specgram_settings())
        tabWidget.addTab(self.specWidget,'Spectrogram')


        layout = QVBoxLayout()
        layout.addWidget(tabWidget)

        #Accept cancel
        self.acceptButton = QPushButton('Ok')
        self.cancelButton = QPushButton('Cancel')

        self.acceptButton.clicked.connect(self.accept)
        self.cancelButton.clicked.connect(self.reject)

        hbox = QHBoxLayout()
        hbox.addWidget(self.acceptButton)
        hbox.addWidget(self.cancelButton)
        ac = QWidget()
        ac.setLayout(hbox)
        layout.addWidget(ac)

        self.setLayout(layout)

        self.network_changed = False
        self.rep_changed = False
        self.specgram_changed = False
예제 #54
0
class SessionDetails(QWidget):
    def __init__(self, parent = None):
        super(SessionDetails, self).__init__(parent)
        self.tabs = QTabWidget(self)
        layout = QVBoxLayout(self)
        layout.addWidget(self.tabs)
        self.setMinimumSize(600, 600)

    def setSession(self, session):
        self.tabs.clear()
        self.tabs.addTab(IntervalPage(session, self), str(session.start_time))

    def setTab(self, tab):
        t = self.tabs.currentWidget()
        t.setTab(tab)

    def addInterval(self, interval):
        self.tabs.addTab(IntervalPage(interval, self), str(interval.timestamp))
예제 #55
0
파일: caerus.py 프로젝트: xiphffff/Caerus
    def __init__(self):
        super(Caerus, self).__init__()

        self.exit_cb = None

        self.status_bar = self.statusBar()

        self.exit_app = QAction(self.tr("Exit"), self)

        self.file_menu = self.menuBar().addMenu("&File")
        self.file_menu.addAction(self.exit_app)

        self.employers = Employers(self,
                                   [self.tr("ID"),
                                    self.tr("Name"),
                                    self.tr("Street Address"),
                                    self.tr("City"),
                                    self.tr("State"),
                                    self.tr("Zip Code"),
                                    self.tr("Phone Number"),
                                    self.tr("E-mail Address"),
                                    self.tr("Contact Person")])

        self.employees = Employees(self,
                                   [self.tr("ID"),
                                    self.tr("First Name"),
                                    self.tr("Last Name"),
                                    self.tr("E-mail Address"),
                                    self.tr("Phone Number"),
                                    self.tr("Cell Number"),
                                    self.tr("Street Address"),
                                    self.tr("City"),
                                    self.tr("State"),
                                    self.tr("Zip Code")])

        self.reports = Reports(self)

        context = QTabWidget(self)

        context.addTab(self.employers, self.tr("Workplaces"))
        context.addTab(self.employees, self.tr("Employees"))
        context.addTab(self.reports,   self.tr("Reports"))

        self.setCentralWidget(context)
예제 #56
0
	def __init__(self):
		super(uiManager, self).__init__()

		self.setMinimumSize(900,500)
		self.setWindowTitle("Manage")

		self.aFileModel = FileModel() # Add files
		self.sFileModel = FileModel() # Queried files
		self.eFileModel = FileModel() # Editing files

		self.tabWidget = QTabWidget()
		self.setCentralWidget(self.tabWidget)

		self.defActions()

		self.addTab()
		self.searchTab()
		self.editTab()
		self.testtab()

		self.statusBar().showMessage("Hi.")
예제 #57
0
    def __init__(self):
        QMainWindow.__init__(self)
        self.setWindowTitle("SimulationZ")
        self.setMinimumSize(700,500)
        self.workspaceLayout = QGridLayout()
        self.workspace = QTabWidget()
        self.workspace.setTabsClosable(True)
        
        self.graphScene = QGraphicsScene()
        self.sceneView = QGraphicsView()
        self.sceneView.setScene(self.graphScene)
        
        self.Editor = Editor(self.sceneView)
        
        self.menuBar = menuBar.menuBar(self)
        self.setMenuBar(self.menuBar)

        self.mainArea = Layout.layout(self.Editor,self.sceneView)
        self.setCentralWidget(self.mainArea)
        
        self.toolBar = self.mainArea.childAt(1,0)
	def __init__(self, multiRenderController, parent=None):
		super(MultiRenderPropWidget, self).__init__(parent=parent)

		# Two tabs: Visualization and Data info
		self.mixParamWidget = RenderParameterWidget(multiRenderController)
		self.transformParamWidget = TransformationParameterWidget()
		self.registrationHistoryWidget = TransformationHistoryWidget()
		self.slicesTabWidget = RenderSlicerParamWidget(multiRenderController)

		# Create the tab widget
		self.tabWidget = QTabWidget()
		self.tabWidget.addTab(self.mixParamWidget, "Mix")
		self.tabWidget.addTab(self.transformParamWidget, "Transformation")
		self.tabWidget.addTab(self.registrationHistoryWidget, "History")
		self.tabWidget.addTab(self.slicesTabWidget, "Slices")

		layout = QVBoxLayout()
		self.setLayout(layout)
		layout.addWidget(self.tabWidget)

		self.registrationHistoryWidget.setMultiRenderWidget(multiRenderController.multiRenderWidget)
예제 #59
0
파일: ui.py 프로젝트: apt-shansen/siding
    def __init__(self, parent=None):
        ManagerWindow.__init__(self, parent)

        # Set the window title and size.
        self.setWindowTitle(self.tr("Add-on Manager"))
        self.setMinimumSize(400, 300)

        # Build the main widget.
        self.tabs = QTabWidget(self)
        self.setCentralWidget(self.tabs)

        # Load up all our tabs.
        for addon_type in sorted(addons.manager._types.keys()):
            tab = AddonTypeTab(addon_type)
            self.tabs.addTab(tab, tab.windowIcon(), tab.windowTitle())

        # Let plugins get in on this.
        plugins.run_signal('opened_addon_manager', self)

        # Icons and Style!
        style.enable_aero(self)
        self.reload_icons()
        style.style_reloaded.connect(self.reload_icons)