aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/filter_expression_frame.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-11-11Qt: Update styleSheet in AccordionFrameStig Bjørlykke1-8/+0
Update all widget styleSheet in AccordionFrame instead of in each frame implementation.
2023-11-10Qt: Update styleSheet on ApplicationPaletteChange eventStig Bjørlykke1-4/+8
Update styleSheet used in AccordionFrame on ApplicationPaletteChange event received in WiresharkMainWindow to support switch between Light mode and Dark mode.
2023-11-09Qt: Add QLineEdit border in AccordionFrameStig Bjørlykke1-0/+4
Add a border and a border-radius to make the QLineEdit used in AccordionFrame look better on macOS. This is a similar style as used in DisplayFilterCombo. Update AddressEditorFrame, ColumnEditorFrame, FilterExpressionFrame PreferenceEditorFrame, SearchFrame and GoToPacket. Store the style_sheet in DisplayFilterEdit to be used in alignActionButtons().
2022-04-04Qt: Split MainApplication out from WiresharkApplication.Gerald Combs1-4/+4
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back WiresharkApplication as a thin superclass of MainApplication, similar to LogsharkApplication. Change all of our wsApp references to mainApp. We will likely have to change many or most of them back, but that's a commit for another time.
2021-03-08Remove modelines in ui/qt.Gerald Combs1-13/+0
Remove the editor modeline blocks from most of the source files in ui/qt by running perl -i -p0e 's{ \n+ /[ *\n]+ editor \s+ modelines .* shiftwidth= .* \*/ \s+ } {\n}gsix' $( ag -g '\.(cpp|h)' ) then cleaning up the remaining files by hand. This *shouldn't* affect anyone since - All of the source files in ui/qt use 4 space indentation, which matches the default in our top-level .editorconfig - The one notable editor that's likely to be used on these files and *doesn't* support EditorConfig (Qt Creator) defaults to 4 space indentation.
2019-11-17Qt: Cleanup space inside parenthesesStig Bjørlykke1-5/+5
Remove randomly used space inside parentheses to make the coding style uniform. Add space after if, for and while. Change-Id: I519f5994b6f73d8a57a5004d51ca460276c618fe Reviewed-on: https://code.wireshark.org/review/35112 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-11-12Qt: Cleanup push/pop InfosRoland Knall1-3/+4
Currently push pop is propagated by a massive load of signals which partly are also propagated through parent objects. This moves the status handling to WiresharkApplication, also pathlining future moves to move status to different classes or use additional methods of status information Change-Id: Ibcb2c98688f1adf40dce1483f336596ef992bb06 Reviewed-on: https://code.wireshark.org/review/35071 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-08-09Qt: Fix Preference dialog translationRoland Knall1-1/+1
The title names of each section are not presented correctly Bug: 15977 Change-Id: I68ab0fb6fc7131f9d2af67fa38c509ed6808c7d3 Reviewed-on: https://code.wireshark.org/review/34218 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-10prefs,ui: properly migrate old filter expressionsPeter Wu1-5/+1
When legacy filter expressions preferences are present, be sure to (1) save the dfilter_buttons file when updating the preferences file and (2) save the preferences file after updating the dfilter_buttons file. Without doing (1), the old buttons will be lost. Without (2), restarting Wireshark will result in duplicate buttons. Only write the files if the user actually made other changes to avoid breaking profiles by just opening Wireshark. Bug: 15114 Bug: 15121 Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1 Reviewed-on: https://code.wireshark.org/review/29488 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-26Qt: Allow filter with deprecated syntax as buttonStig Bjørlykke1-2/+5
Also update widgets at startup. Bug: 14369 Change-Id: I2621b78289620a131bcad21d5ec23b048e4b218c Reviewed-on: https://code.wireshark.org/review/25475 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-04Convert preference dialog to use more models.Michael Mann1-14/+3
Convert Advanced view and Modules view to use a single base model, loading the preferences once and then filter and display what they need with QSortFilterProxyModel derived classes. Convert the PreferencePane "types" to just strings. This allows a more straightforward relationship between the "special" modules that need custom widgets for preference manipulation and it also removes dependency on preferences_dialog.h for many files. Change-Id: I091deb3061564aa4d1564e9ca1c792715961b083 Reviewed-on: https://code.wireshark.org/review/25134 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-25Qt: AccordionFrame users keyPressEvent() fixesStig Bjørlykke1-0/+3
- Declare keyPressEvent() virtual. - Give keyPressEvent() to parent when done. Change-Id: If1c05e86a5ab71dd239c025cdb2bcfb1ef484811 Reviewed-on: https://code.wireshark.org/review/24573 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-20Qt: Fix various smalles issues with drag-dropRoland Knall1-0/+3
Cleanup adding a filter and implement some sanity checks in the drop code Change-Id: I1778be16abdea3f93ed11fc610962c4a23f10a2f Reviewed-on: https://code.wireshark.org/review/24505 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2017-09-19Qt: Add key events to accept and reject changes in FilterExpressionFrameStig Bjørlykke1-1/+20
Change-Id: Iba3fe50b3ca4953fc59ebd6235d04f6878d183a4 Reviewed-on: https://code.wireshark.org/review/23607 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-26Qt: Create models directoryRoland Knall1-1/+1
Following the move for widgets and utils directory, moving models and delegates to the utils directory. Guidelines for this directory are: - Implementation of a model - Implementation of a delegate - Utility class for data storage used by a model Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I3bb868af7d3570437682b722a0cd46c906628570 Reviewed-on: https://code.wireshark.org/review/22790 Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-27Qt: Context menu for toolbar filter buttonsRoland Knall1-7/+60
Adds a context menu for the toolbar filter buttons, which allows for opening the preference for the filter buttons, as well as direct edit, removal and disable functionality Change-Id: I5f2d132737c77804cf22834574dfe3c02f85fbdf Reviewed-on: https://code.wireshark.org/review/22327 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-26Fix Filter Tooltip button and frameRoland Knall1-2/+4
Make the frame into a two-row frame to better accomodate the comments field, and reinstate the correct action for the buttons Change-Id: I171e4bc3c7f195b7179cd6b1c2ab4ab42ede9c04 Reviewed-on: https://code.wireshark.org/review/22405 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-26Add support for comments for a display filter buttonMichael Mann1-1/+2
Add a field to the display filter button UAT to allow comments to be displayed as part of the tooltip to the diplay filter button Bug: 13814 Change-Id: I74459e4102856258d31d6429e2fd924a9f798cd5 Reviewed-on: https://code.wireshark.org/review/22390 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-26Convert filter expressions preference data to a UAT.Michael Mann1-1/+5
The filter expressions data was shoved into the preference file in a very loose, non-arrayed form. It's much easier to manage in code (and for users in a separate file) as a UAT. The GTK GUI was hacked to use the existing UAT dialog rather than rewrite the pref_filter_expressions.c to support a UAT. Should be okay since it's deprecated. Change-Id: I688cebb4b7b6594878c1398365e79a205f1902d9 Ping-Bug: 13814 Reviewed-on: https://code.wireshark.org/review/22354 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-13qt: use #include <file.h> for generated include filesMartin Kaiser1-1/+1
make sure that generated include files are picked up only from the directories set by -I (or /I), not from the current directory if we use #include "file.h", Visual Studio searches for file.h in the same diretory as the source file that includes file.h if we do an out-of-tree build with cmake and the source directory contains files from an in-tree build (done with autotools), we might end up including the wrong file Change-Id: Iaaed2626258b6ff0c12485fe3f436bd03bbb5adf Reviewed-on: https://code.wireshark.org/review/15873 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-19Qt: Update AccordionFrame widgets to use common layoutStig Bjørlykke1-0/+6
- Use QPushButton for buttons and set the "Find" button as default in SearchFrame. - Use QPushButton for buttons, added a "Packet:" label, and set the "Go to packet" button as default in GoToFrame. - Set Qt::WA_MacSmallSize in OS X for FilterExpressionFrame and PreferenceEditorFrame. - Removed QFrame::StyledPanel and QFrame::Raised from ColumnEditorFrame. - Update ui files to reflect that AccordionFrame is used for AddressEditorFrame, FilterExpressionFrame and PreferenceEditorFrame. Change-Id: Icfbfff973535317997109a1020dfe24ba932e098 Reviewed-on: https://code.wireshark.org/review/13995 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-01Qt Frames: Use ButtonBox instead of buttonsRoland Knall1-6/+8
In these frames the Ok and Close buttons are implemented as standalone buttons. This leads to the scenario, that they break plattform-ui preferences on the one hand, as well as not being the same order throughout. This patch replaces all Ok/Close buttons with the Qt button box, which handles the plattform-ui internally, and additionally allways enforces the same order. Change-Id: If62b90016b222322f60c0962da04c8277589a57f Reviewed-on: https://code.wireshark.org/review/12335 Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-12Qt: save preferences after creating a filter from expression framePascal Quantin1-0/+2
Bug: 11690 Change-Id: Ice6a2341d3f39c107a3c9d6a0e23fd98312b48a8 Reviewed-on: https://code.wireshark.org/review/11748 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-29Qt: Add the ability to add filter expressions.Gerald Combs1-0/+112
Add a "+" icon to the display filter toolbar which allows the addition of a new filter expression button. (Hopefully this will be the last main window UI change before 2.0.) Change-Id: I52bf56bf699dddb7b387b9f4de1bf8b35eb3c4ce Reviewed-on: https://code.wireshark.org/review/11375 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>