示例#1
0
    def __init__(self, parent = None):
        super(ReceptionPage, self).__init__(parent)

        self.notes_widget = NotesWidget(self)
        self.notes_widget.set_type(NotesWidget.RECEPTION)

        self.menu_bar = QtGui.QToolBar()
        self.menu_bar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)

        ## TODO placeholder icon
        icon = QtGui.QIcon.fromTheme("dialog-question")
        self.action_payment = QtGui.QAction(icon, "Take Payment", self)
        self.menu_bar.addAction(self.action_payment)

        right_widget =  QtGui.QLabel("Placeholder", self)
        right_widget.setMinimumWidth(100)
        right_widget.setMaximumWidth(150)

        self.pt_diary_widget = PtDiaryWidget()

        layout = QtGui.QGridLayout(self)
        layout.setMargin(3)
        layout.setSpacing(3)
        layout.addWidget(self.notes_widget, 0, 0)
        layout.addWidget(right_widget, 0, 1)
        layout.addWidget(self.pt_diary_widget, 1, 0, 1, 2)
        layout.addWidget(self.menu_bar, 2, 0, 1, 2)

        self.connect_signals()
示例#2
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self._proc_code_dock_widget = None  #initialise if needed.

        self.control_panel = ControlPanel(self)
        '''a pointer to the :doc:`ControlPanel`'''

        self.details_browser = DetailsBrowser(self)
        '''a pointer to the :doc:`DetailsBrowser`'''

        self.reception_page = ReceptionPage(self)
        '''a pointer to the :doc:`ReceptionPage`'''

        self.charts_page = ChartsPage(self)
        '''a pointer to the :doc:`ChartsPage`'''

        self.treatment_page = TreatmentPage(self)
        '''a pointer to the :doc:`TreatmentPage`'''

        self.notes_page = NotesWidget(self)
        '''a pointer to the :doc:`NotesWidget`'''

        self.estimates_page = EstimatesPage(self)
        '''a pointer to the :doc:`EstimatesPage`'''

        self.history_page = HistoryPage(self)
        '''a pointer to the :doc:`HistoryPage`'''

        # summary_page shares the "model" of the static chart
        model = self.charts_page.static.chart_data_model
        self.summary_page = SummaryPage(model, self)
        '''a pointer to the :doc:`SummaryPage`'''

        self.options_widget = PatientInterfaceOptionsWidget(self)
        '''a pointer to the :doc:`PatientInterfaceOptionsWidget`'''

        self.options_widget.tab_index_changed(0)

        self.tab_widget = QtGui.QTabWidget(self)
        '''a pointer to the TabWidget'''
        self.tab_widget.tabBar().setFocusPolicy(QtCore.Qt.NoFocus)
        self.tab_widget.addTab(self.reception_page, _("Reception"))
        self.tab_widget.addTab(self.summary_page, _("Summary"))
        self.tab_widget.addTab(self.charts_page, _("Charts"))
        self.tab_widget.addTab(self.treatment_page, _("Treatment"))
        self.tab_widget.addTab(self.estimates_page, _("Estimates"))
        self.tab_widget.addTab(self.notes_page, _("Notes"))
        self.tab_widget.addTab(self.history_page, _("History"))
        self.tab_widget.setCornerWidget(self.options_widget)

        left_widget = QtGui.QWidget()
        left_widget.setMaximumWidth(240)
        layout = QtGui.QVBoxLayout(left_widget)
        layout.setMargin(0)
        layout.addWidget(self.control_panel)
        layout.addWidget(self.details_browser)

        layout = QtGui.QHBoxLayout(self)
        layout.addWidget(left_widget)
        layout.addWidget(self.tab_widget)

        ## keep this dialog everpresent..
        ## it can then keep a record of previous searches etc...
        self._find_dialog = None

        self.load_history, self.history_pos = [], -1
        self.pt = None
        #self.clear()
        self.connect_signals()