summaryrefslogtreecommitdiff
path: root/ui/qt/syntax_line_edit.h
AgeCommit message (Collapse)AuthorFilesLines
2016-06-24Qt: Keep the syntax line edit cursor active.Gerald Combs1-0/+1
Ignore focusOutEvents when the syntax line edit completer is active. This keeps it from hiding its cursor. Bug: 12520 Change-Id: I8e25b92c097e039e26e2381c5209be1e27a6a7cd Reviewed-on: https://code.wireshark.org/review/16126 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Jim Young <jim.young.ws@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-23Override shortcuts in SyntaxLineEdit.Gerald Combs1-0/+1
Add an ::event member function to SyntaxLineEdit that looks for ShortcutOverride events and accepts them. This keeps them from being interpreted as shortcuts in the main window. Note that the current code accepts everything, and that we should probably restrict this to AltGr only. Bug: 12270 Change-Id: I01765ce2447d220a102d97fcbbe47579341ce075 Reviewed-on: https://code.wireshark.org/review/14570 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-18Qt: Fixup the Display Filter Expression syntax logic.Gerald Combs1-1/+0
In the Display Filter Expression dialog, only disable the OK button when we have an invalid filter. Move the deprecated warning string from DisplayFilterEdit::checkFilter to SyntaxLineEdit::checkDisplayFilter so that we can use it in more places. Change-Id: I938f5f10258f4fd9dd3a33c174dd9958c9634766 Reviewed-on: https://code.wireshark.org/review/13317 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-08Add a Busy status to SyntaxLineEdit.Gerald Combs1-1/+2
For CaptureFilterEdit it's possible to have an indeterminate state while we're waiting on name resolution. Add a Busy status to SyntaxLineEdit and set the text color to a mix of the normal foreground and background colors (gray on most platforms). Make the Busy state valid so that we don't have to wait on an annoyingly-long name resolution to start capturing. Update the global capture option filters using the main welcome capture filter when we start a capture instead of when we've finished checking the filter syntax. Connect the CaptureFilterEdit returnPressed signal no matter what so that we can start a capture by pressing return in the welcome screen CaptureFilterEdit. Add a fake resolution timeout to the CaptureFilterSyntaxWorker debug code to make testing the different states easier. Bug: 11950 Change-Id: I0cf01c0fbc0dd8065cdf5a91f1d6b224291b1ce6 Reviewed-on: https://code.wireshark.org/review/13110 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-20Qt: Add missing multi-field column validationMichal Labedzki1-0/+1
GTK already has it, but Qt forgot about it, so multi-field custom column works ok if previously saved in GTK-shark. Invalid validation prevent from modifying and saving multi-field custom column in Qt version. While at it, rename "custom field" to "custom fields" to ensure we think about multi-field custom column. Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb Reviewed-on: https://code.wireshark.org/review/12685 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-03Add the Display Filter Expression dialog.Gerald Combs1-0/+2
Changes from the GTK+ UI: - The display filter is built on the fly with immediate syntax feedback. - Slightly different layout. - You can search for fields. Make the plain SyntaxLineEdit a bit more plain. Bug: 11128 Change-Id: I06a48cd7b9ba7b9dc193b0199540aede4eb62fa7 Reviewed-on: https://code.wireshark.org/review/8742 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-20Add capture filter autocompletion.Gerald Combs1-0/+26
Autocomplete on recent and saved capture filters along with the primitives in gencode.l in the libpcap sources. Move common autocomplete code to SyntaxLineEdit. Change-Id: I0931a6775bacf9c917c294befbbdaade51d19b93 Reviewed-on: https://code.wireshark.org/review/8542 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-0/+2
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-06Qt: Add a context menu to the packet list header.Gerald Combs1-0/+1
Don't carry over the sort items from the GTK+ UI (for now, at least). Update some names. Add a column editor frame similar to the "Go to Packet" and "Search" frames. Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77 Reviewed-on: https://code.wireshark.org/review/6277 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-07Add a Qt I/O Graph dialog.Gerald Combs1-2/+9
For each graph you can set: - Its visibility - A name - A display filter - Color, from a fixed list - Plot style: Line, Impulse, Bar, Stacked Bar, Dot, Square, Diamond - Basic Y Axes (packets/s, bytes/s, bits/s) - Computed Y Axes (SUM, MIN, AVG, MAX) - Smoothing You can pan and zoom using the mouse and keyboard. Clicking on a graph selects the last packet for that interval. If all graphs have the same Y axis a single label is shown, otherwise a legend is shown. The time scale (X axis) can be toggled between relative seconds and the time of day. Graphs can be saved as PDF, PNG, BMP, and JPEG. Settings are "sticky" via the io_graphs UAT. To do: - Minimize graph drawing delays. - Figure out why smoothing differs from GTK+ - Everything else at the top of io_graph_dialog.cpp - Fix empty resets. A fair amount of code was copied from TCPStreamDialog. We might want to subclass QCustomPlot and place the shared code there. Move common syntax checking to SyntaxLineEdit. Move some common code from ui/gtk/io_stat.c to ui/io_graph_item.[ch] and use it in both GTK+ and Qt. Make the io_graph_item_t array allocation in io_stat.c static. The behavior should be identical and this gives us additional compile-time checks. Change-Id: I9a3d544469b7048f0761fdbf7bcf20f44ae76577 Reviewed-on: https://code.wireshark.org/review/435 Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-1/+1
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-04-10Add a license header.Gerald Combs1-0/+23
svn path=/trunk/; revision=48811
2012-10-08Add a PacketRangeGroupBox widget. Use it to implement "Export SelectedGerald Combs1-0/+30
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been implemented so we can't test that either. Create a SyntaxLineEdit widget from the QLineEdit code in DisplayFilterEdit. Use it in the file import and export dialogs and the PacketRangeGroupBox widget. This lets us provide instant feedback instead of popping up an error dialog. Expand the Tango color list based on http://emilis.info/other/extended_tango . Rearrange QtShark.pro to (hopefully) work better with Qt Creator. svn path=/trunk/; revision=45405