from lino.apps.spz.spz import SPZ from lino.apps.spz.loaders import LOADERS from lino.adamo.store import Populator from lino.forms import gui loadfrom=r".\SPZ" app=SPZ() sess=app.quickStartup() #sess.populate(CpasPopulator()) for lc in LOADERS: sess.runTask(lc(loadfrom)) gui.run(sess)
class LinoDemo(Application): #name="Lino/Demo" years = '2005' author = "Luc Saffre" def showMainForm(self, sess): frm = sess.form(label="LinoDemo Main menu", doc="""\ This is the LinoDemo main menu. """ + ("\n" * 10)) m = frm.addMenu("apps", "&Applications") m.addItem("timings", label="&Timings").setHandler(sess.runTask, Timings) m.addItem("keeper", label="&Keeper").setHandler(sess.runTask, Keeper) self.addProgramMenu(sess, frm) frm.addOnClose(sess.close) frm.show() if __name__ == '__main__': sess = LinoDemo().startup() gui.run(sess)
frm.addLabel(label="Random Quote:", doc=fortune+('\n'*10)) m = frm.addMenu("&File") m.addItem(label="&Quit",action=frm.close) m = frm.addMenu("&Contacts") m.addItem(label="&Partners").setHandler(self.showTableGrid, ui, Partners) m.addItem(label="&Cities").setHandler(self.showTableGrid, ui, Cities) m.addItem(label="&Nations").setHandler(self.showTableGrid, ui, Nations) m = frm.addMenu("&Sales") OUT = self.getSession().peek(Journals,'OUT') m.addItem(label="&Invoices").setHandler(self.showTableGrid, ui, Invoices, jnl=OUT) m = frm.addMenu("&?") m.addItem(label="&About",action=ui.showAbout) return frm if __name__ == "__main__": schema = demo.makeSchema(big=True) app = MyApplication(schema) app.parse_args() gui.run(app)
## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## Lino is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ## License for more details. ## You should have received a copy of the GNU General Public License ## along with Lino; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA raise "moved to timings_tables.pt" import timings_tables as tables #from lino.apps.timings.tables import TABLES from lino.adamo.ddl import Schema if __name__ == '__main__': from lino.forms import gui app=Timings() app.quickStartup() #app.main() gui.run(app)