void load_graph(const char *filename, graph *graph) { // open the file std::ifstream graph_file; graph_file.open(filename); get_meta_data(graph_file, graph); int* scratch = (int*) malloc(sizeof(int) * (graph->num_nodes + graph->num_edges)); read_graph_file(graph_file, scratch); build_start(graph, scratch); build_edges(graph, scratch); free(scratch); }
opkg_build::opkg_build(QWidget *parent) : QWidget(parent), ui(new Ui::opkg_build) { ui->setupUi(this); ui->progressBar->hide(); QObject::connect(&build_thread_obj,SIGNAL(input_status(QString)),this,SLOT(on_input_statu(QString))); QObject::connect(&build_thread_obj,SIGNAL(change_statu_word(QString)),this,SLOT(on_change_statu_word(QString))); QObject::connect(&build_thread_obj,SIGNAL(change_progress(int)),this,SLOT(on_change_progress(int))); QObject::connect(&build_thread_obj,SIGNAL(done()),this,SLOT(on_done())); QObject::connect(this,SIGNAL(make_start(QString,QString,QString,QString,QString,QString)),&build_thread_obj,SIGNAL(build_start(QString,QString,QString,QString,QString,QString))); build_thread_obj.start(); }