Ejemplo n.º 1
0
void PacketList::showEvent (QShowEvent *event) {
    Q_UNUSED(event);

    for (int i = 0; i < prefs.num_cols; i++) {
        int fmt, col_width;
        const char *long_str;

        fmt = get_column_format(i);
        long_str = get_column_width_string(fmt, i);
        if (long_str) {
            col_width = packet_list_model_->columnTextSize(long_str);
        } else {
            col_width = packet_list_model_->columnTextSize(MIN_COL_WIDTH_STR);
        }
        setColumnWidth(i, col_width);
    }
    setColumnVisibility();
}
Ejemplo n.º 2
0
void PacketList::showEvent (QShowEvent *event) {
    Q_UNUSED(event);

    if (!cap_file_) return;

    for (int i = 0; i < cap_file_->cinfo.num_cols; i++) {
        int fmt, col_width;
        const char *long_str;

        fmt = get_column_format(i);
        long_str = get_column_width_string(fmt, i);
        if (long_str) {
            col_width = wsApp->monospaceTextSize(long_str);
        } else {
            col_width = wsApp->monospaceTextSize(MIN_COL_WIDTH_STR);
        }
        setColumnWidth(i, col_width);
    }
}