Ejemplo n.º 1
0
def main():

    app = SignallingApplication("openmolar-admin")

    ui = AdminMainWindow()
    ui.show()
    app.exec_()
    app = None
Ejemplo n.º 2
0
def main():

    app = SignallingApplication("openmolar-admin")

    ui = AdminMainWindow()
    ui.show()
    app.exec_()
    app = None
Ejemplo n.º 3
0
def main():
    '''
    main entry point for lib_openmolar.client
    '''
    if "-v" in sys.argv:
        LOGGER.setLevel(logging.DEBUG)
    else:
        LOGGER.setLevel(logging.INFO)

    app = SignallingApplication("openmolar-client")
    ui = ClientMainWindow()
    ui.show()
    app.exec_()
    app = None
Ejemplo n.º 4
0
def main():
    '''
    main entry point for lib_openmolar.client
    '''
    if "-v" in sys.argv:
        LOGGER.setLevel(logging.DEBUG)
    else:
        LOGGER.setLevel(logging.INFO)

    app = SignallingApplication("openmolar-client")
    ui = ClientMainWindow()
    ui.show()
    app.exec_()
    app = None
    def set_but_text(self):
        self.but.setText("set mode (current='%s')"% self.MODES[self.mode])

    def change_mode(self):
        '''
        toggle through the modes
        '''
        self.mode += 1
        if self.mode > self.schedule_controller.NOTES_MODE:
            self.mode = self.schedule_controller.BROWSE_MODE

        self.set_but_text()
        self.schedule_controller.set_mode(self.mode)

    def sig_catcher(self, *args):
        QtGui.QMessageBox.information(self, "signal",
        "signal emitted %s"% str(args))

if __name__ == "__main__":
    from lib_openmolar.common.qt4.widgets import SignallingApplication
    app = SignallingApplication("test_application")

    from lib_openmolar.client.connect import DemoClientConnection
    cc = DemoClientConnection()
    cc.connect()

    obj = TestWindow()
    obj.show()
    app.exec_()

Ejemplo n.º 6
0
        usually called when the database has connected/changed
        '''
        QtGui.QApplication.instance().setOverrideCursor(QtCore.Qt.WaitCursor)
        self.diary_control.refresh()
        self.model.load()
        self.diary_control.set_limits(self.model.start_date,
            self.model.end_date)
        QtGui.QApplication.instance().restoreOverrideCursor()

    def Advise(self, *args):
        if __name__ == "__main__":
            print args
        self.emit(QtCore.SIGNAL("Advise"), *args)

if __name__ == "__main__":

    from lib_openmolar.common.qt4.widgets import SignallingApplication
    app = SignallingApplication("test_application")

    mw = QtGui.QMainWindow()

    from lib_openmolar.client.connect import DemoClientConnection
    cc = DemoClientConnection()
    cc.connect()

    di = DiaryInterface(mw)
    di.refresh()

    mw.setCentralWidget(di)
    mw.show()
    app.exec_()
Ejemplo n.º 7
0
                return True
            else:
                return False
        else:
            self.Advise(_("No changes Found"))


if __name__ == "__main__":

    def _test_dock_widget(dw):
        dw.show()
        dw.setFloating(True)

    from lib_openmolar.common.qt4.widgets import SignallingApplication

    app = SignallingApplication("openmolar-client")
    mw = QtGui.QMainWindow()
    mw.setMinimumSize(500, 300)

    from lib_openmolar.client.connect import DemoClientConnection

    cc = DemoClientConnection()

    SETTINGS.load_plugins()

    pi = PatientInterface(mw)

    cc.connect()
    pi.load_patient(1)

    mw.setCentralWidget(pi)
Ejemplo n.º 8
0
        query = 'delete from appointments where ix=?'
        q_query = QtSql.QSqlQuery(SETTINGS.psql_conn)
        q_query.prepare(query)
        q_query.addBindValue(ix)

        result = q_query.exec_()
        if q_query.lastError().isValid():
            LOGGER.error(q_query.lastError().text())
        return result


if __name__ == "__main__":
    from lib_openmolar.client.connect import DemoClientConnection
    from lib_openmolar.common.qt4.widgets import SignallingApplication

    app = SignallingApplication("openmolar-test")

    cc = DemoClientConnection()
    cc.connect()

    model = PatientDiaryModel()

    tv = QtGui.QTreeView()
    tv.setMinimumWidth(800)
    tv.setModel(model)
    tv.setAlternatingRowColors(True)
    tv.show()

    model.set_patient(1)
    model.refresh()