QMenu * FeaturesUI::createFileMenu ( QWidget * parent ) { QMenu * file = new QMenu ( "&File", parent ); QAction * loadQueryImage = new QAction ( "&Load Query Image", file ); file->addAction ( loadQueryImage ); QObject::connect ( loadQueryImage, SIGNAL ( triggered () ), this, SLOT ( cb_load_query_image () ) ); file->addMenu ( createLoadQueryFeaturesMenu ( file ) ); file->addMenu ( createLoadImageDatabaseMenu ( file ) ); QAction * exit = new QAction ( "&Exit", file ); file->addAction ( exit ); QObject::connect ( exit, SIGNAL ( triggered () ), this, SLOT ( cb_exit () ) ); return file; }
static void MS_CALLBACK dsa_cb(int p, int n, void *arg) { char c='*'; static int ok=0,num=0; if (p == 0) { c='.'; num++; }; if (p == 1) c='+'; if (p == 2) { c='*'; ok++; } if (p == 3) c='\n'; BIO_write(arg,&c,1); (void)BIO_flush(arg); if (!ok && (p == 0) && (num > 1)) { BIO_printf((BIO *)arg,"error in dsatest\n"); cb_exit(1); } }
static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb) { char c='*'; static int ok=0,num=0; if (p == 0) { c='.'; num++; }; if (p == 1) c='+'; if (p == 2) { c='*'; ok++; } if (p == 3) c='\n'; fwrite(&c,1, 1, cb->arg); fflush(cb->arg); if (!ok && (p == 0) && (num > 1)) { fprintf(cb->arg,"error in dsatest\n"); cb_exit(1); } return 1; }