Ejemplo n.º 1
0
int main(int argc, char* argv[])
{
	Printer* printer = NULL;
	Printer* console_printer = console_printer_create();
	Printer* file_printer = file_printer_create("./log.txt");

	printer = console_printer;
	printer->print(printer, "hello world!\n");
	printer->destroy(printer);

	printer = file_printer;
	printer->print(printer, "hello world!\n");
	printer->destroy(printer);

	return 0;
}
Ejemplo n.º 2
0
int main(int argc, char *argv[])
{
    QApplication app(argc,argv);
    
    Settings *settings = Settings::instance();
    Database *db = Database::instance();
    Printer *printer = Printer::instance();
    
    Tabs tabs(&app);
    tabs.show();
    app.setMainWidget(&tabs);
    int retVal = app.exec();
    db->destroy();
    printer->destroy();
    settings->destroy();
    return retVal;
}