//------------------------------------------------------------------------------ // Name: showEvent // Desc: Ensures the column sizes are correct, connects the sig/slot for // syncing with the Debugger UI, then populates the Call Stack table. //------------------------------------------------------------------------------ void DialogBacktrace::showEvent(QShowEvent *) { resizeEvent(NULL); //Sync with the Debugger UI. connect(edb::v1::debugger_ui, SIGNAL(gui_updated()), this, SLOT(populate_table())); //Populate the tabel with our call stack info. populate_table(); }
GtkWidget * designer_widget_new (designer_design_t *design, designer_design_changed_callback_t design_changed_callback, designer_node_focussed_callback_t node_focussed_callback, designer_node_title_change_callback_t node_title_change_callback) { GtkWidget *table; widget_data_t *data; data = g_new0(widget_data_t, 1); data->design = design; data->design_changed_callback = design_changed_callback; data->node_focussed_callback = node_focussed_callback; data->node_title_change_callback = node_title_change_callback; table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 4); gtk_table_set_col_spacings (GTK_TABLE (table), 4); gtk_widget_show (table); data->widget = table; populate_table (data); reset_widget_data (data); g_object_set_data(G_OBJECT(table), "designer-data", data); g_object_set_data(G_OBJECT(data->drawing_area), "designer-data", data); update_area_conditional(data, TRUE); return table; }
void HeapInspection::heap_inspection(outputStream* st, bool need_prologue) { ResourceMark rm; KlassInfoTable cit(start_of_perm_gen()); if (!cit.allocation_failed()) { size_t missed_count = populate_table(&cit, need_prologue); if (missed_count != 0) { st->print_cr("WARNING: Ran out of C-heap; undercounted " SIZE_FORMAT " total instances in data below", missed_count); } KlassInfoHisto histo("\n" " num #instances #bytes class name\n" "----------------------------------------------"); HistoClosure hc(&histo); cit.iterate(&hc); histo.sort(); histo.print_on(st); } else { st->print_cr("WARNING: Ran out of C-heap; histogram not generated"); } st->flush(); }
int main( int argc, char *argv[]) { Arb_connection *conn = NULL; int rc; int i; char server[128]; char database[128]; /* schema */ char user[128]; char password[128]; char application[128]; char infile[256]; Widget widgets[ARRSZ]; short iind[ARRSZ][MAX_TBL_COLS]; memset( widgets, 0, sizeof(widgets)); memset( iind, 0, sizeof(iind)); get_env_param( argc, argv, 0, server, database, user, password); strcpy( application, __FILE__); #if 0 printf( "server = '%s'\n" "database = '%s'\n" "user = '******'\n" "password = '******'\n" "application = '%s'\n", server, database, user, password, application); #endif init_DLAYER_THREAD(); rc = arb_database_login( server, database, user, password, application, ALLOW_BCP, &conn); if( rc == SUCCESS) puts( "Login successful."); else { puts( "Login failed."); exit(1); } drop_table( conn, TABLENAME); create_testcols_table( conn); create_insert_procedure( conn); populate_table( conn, widgets); arb_close(conn,1); exit_DLAYER_THREAD(); return 0; }
ColourTable::ColourTable (QWidget *parent, ColourMap &input, ColourList &list) : QTableWidget(1, 2, parent ) //, "RColourTable") { this->setObjectName( "RColourTable" ); //### JAS Deactivated next line //&&& setSorting(FALSE); //@@@ JAS in Qt4 use QTableWidget()::sortItems(), but only options are ascending //@@@ JAS or descendings. There is no "unsorted" option. setSelectionBehavior( QAbstractItemView::SelectRows ); /* horizontalHeader()->setLabel(0, tr("Name")); horizontalHeader()->setLabel(1, tr("Color")); */ setHorizontalHeaderLabels( QStringList() << tr("Name") << tr("Color") ); populate_table(input, list); connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)), SLOT(slotEditEntry(int, int))); }
void test_function() { Table t= create(string_comprar, string_delete, string_comprar, dummy_string_delete); const char *values[]= {"BWI: Baltimore, MD", "BOS: Boston, MA", "IAD: DC - Dulles", "DCA: DC - Reagan National", "PHI: Philadelphia, PA", "JFK: New York, NY"}; const int num_entries= 6; populate_table(&t, (void**)values, num_entries); reset(&t); populate_table(&t, (void**)values, num_entries); clear(&t); }
void HeapInspection::heap_inspection(outputStream* st) { ResourceMark rm; if (_print_help) { for (int c=0; c<KlassSizeStats::_num_columns; c++) { st->print("%s:\n\t", name_table[c]); const int max_col = 60; int col = 0; for (const char *p = help_table[c]; *p; p++,col++) { if (col >= max_col && *p == ' ') { st->print("\n\t"); col = 0; } else { st->print("%c", *p); } } st->print_cr(".\n"); } return; } KlassInfoTable cit(_print_class_stats); if (!cit.allocation_failed()) { size_t missed_count = populate_table(&cit); if (missed_count != 0) { st->print_cr("WARNING: Ran out of C-heap; undercounted " SIZE_FORMAT " total instances in data below", missed_count); } // Sort and print klass instance info const char *title = "\n" " num #instances #bytes class name\n" "----------------------------------------------"; KlassInfoHisto histo(&cit, title); HistoClosure hc(&histo); cit.iterate(&hc); histo.sort(); histo.print_histo_on(st, _print_class_stats, _csv_format, _columns); } else { st->print_cr("WARNING: Ran out of C-heap; histogram not generated"); } st->flush(); }
void search_execs(char *dir, t_lst **hash_t) { DIR *stream; struct dirent *dp; char *path; if ((stream = opendir(dir))) { dp = (struct dirent*)malloc(sizeof(struct dirent)); while ((dp = readdir(stream))) { path = ft_retprintf("%s/%s", dir, dp->d_name); if (!access(path, X_OK)) populate_table(dir, dp->d_name, hash_t); ft_strdel(&path); } free(dp); closedir(stream); } }
//------------------------------------------------------------------------------ // Name: hideEvent // Desc: Disconnects the signal/slot when the dialog goes away so that // populate_table() is not called unnecessarily. //------------------------------------------------------------------------------ void DialogBacktrace::hideEvent(QHideEvent *) { disconnect(edb::v1::debugger_ui, SIGNAL(gui_updated()), this, SLOT(populate_table())); }