101 info_data_t *captureInfoData() {
return &info_data_; }
104 QMenu *createPopupMenu()
override;
106 CaptureFile *captureFile() {
return &capture_file_; }
108 void setFunnelMenus(
void);
109 void removeAdditionalToolbar(QString toolbarName);
111 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
112 void removeInterfaceToolbar(
const char *menu_title);
114 QString getMwFileName();
115 void setMwFileName(QString fileName);
118 bool eventFilter(QObject *obj, QEvent *event)
override;
119 bool event(QEvent *event)
override;
120 void keyPressEvent(QKeyEvent *event)
override;
121 void closeEvent(QCloseEvent *event)
override;
122 void dragEnterEvent(QDragEnterEvent *event)
override;
123 void dropEvent(QDropEvent *event)
override;
124 void changeEvent(QEvent* event)
override;
128 bool tryClosingCaptureFile(QString before_what, FileCloseContext context = Default)
override;
133 MatchSelectedReplace,
141 Ui::StratosharkMainWindow *main_ui_;
143 QWidget *previous_focus_;
145 QActionGroup *show_hide_actions_;
146 QActionGroup *time_display_actions_;
147 QActionGroup *time_precision_actions_;
149 QList<QPair<QAction *, bool> > freeze_actions_;
150 QPointer<QWidget> freeze_focus_;
151 QMap<QAction *, ts_type> td_actions;
152 QMap<QAction *, ts_precision> tp_actions;
159 bool capture_stopping_;
160 bool capture_filter_valid_;
163 CaptureOptionsDialog *capture_options_dialog_;
167 QPoint dragStartPosition;
172 void mergeCaptureFile();
173 void importCaptureFile();
174 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
175 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
176 void exportSelectedPackets();
177 void exportDissections(export_type_e export_type);
180 void fileAddExtension(QString &file_name,
int file_type, ws_compression_type compression_type);
184 void initMainToolbarIcons();
185 void initShowHideMainWidgets();
186 void initTimeDisplayFormatMenu();
187 void initTimePrecisionFormatMenu();
188 void initFreezeActions();
190 void setMenusForCaptureFile(
bool force_disable =
false)
override;
191 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
192 void setMenusForCaptureStopping();
193 void setForCapturedPackets(
bool have_captured_packets);
194 void setMenusForFileSet(
bool enable_list_files);
195 void updateStyleSheet();
197 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
199 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
200 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
202 void captureFileReadStarted(
const QString &action);
204 void addMenuActions(QList<QAction *> &actions,
int menu_group);
205 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
206 void goToConversationFrame(
bool go_next,
bool start_current =
true);
207 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
211 void closePacketDialogs();
214 void fieldFilterChanged(
const QByteArray field_filter);
217 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
239 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
240 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
241 void filterPackets(QString new_filter = QString(),
bool force =
false)
override;
242 void updateForUnsavedChanges();
243 void layoutToolbars();
244 void updatePreferenceActions();
245 void updateRecentActions();
247 void setTitlebarForCaptureFile();
249 void showCaptureOptionsDialog();
259 void captureFileOpened();
260 void captureFileReadFinished();
261 void captureFileClosing();
262 void captureFileClosed();
265 void openLuaDebuggerDialog();
272 void initViewColorizeMenu();
273 void initConversationMenus();
274 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
275 void initFollowStreamMenus();
283 void startCapture(QStringList);
285 void pushLiveCaptureInProgress();
286 void popLiveCaptureInProgress();
289 void loadWindowGeometry();
290 void saveWindowGeometry();
291 void mainStackChanged(
int);
292 void updateRecentCaptures();
293 void addPacketComment();
294 void editPacketComment();
295 void deletePacketComment();
296 void deleteCommentsFromPackets();
297 QString commentToMenuText(QString text,
int max_len = 40);
298 void setEditCommentsMenu();
299 void setMenusForSelectedPacket();
301 void interfaceSelectionChanged();
302 void captureFilterSyntaxChanged(
bool valid);
303 void redissectPackets();
304 void checkDisplayFilter();
305 void fieldsChanged();
306 void reloadLuaPlugins();
307 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
308 void showColumnEditor(
int column);
309 void showPreferenceEditor();
310 void addStatsPluginsToMenu();
311 void addDynamicMenus();
312 void reloadDynamicMenus();
313 void addPluginIFStructures();
314 QMenu * searchSubMenu(QString objectName);
315 void activatePluginIFToolbar(
bool);
317 void startInterfaceCapture(
bool valid,
const QString capture_filter);
319 void applyGlobalCommandLineOptions();
320 void setFeaturesEnabled(
bool enabled =
true);
322 void on_actionNewDisplayFilterExpression_triggered();
323 void onFilterSelected(QString,
bool);
324 void onFilterPreferences();
325 void onFilterEdit(
int uatIndex);
328 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
335 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
342 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
343 void openTapParameterDialog();
345 void connectFileMenuActions();
348 void connectEditMenuActions();
349 void copySelectedItems(StratosharkMainWindow::CopySelected selection_type);
351 void editTimeShift();
352 void editConfigurationProfiles();
353 void editTimeShiftFinished(
int);
355 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
356 void deleteAllPacketComments();
357 void deleteAllPacketCommentsFinished(
int result);
358 void showPreferencesDialog(QString module_name)
override;
360 void connectViewMenuActions();
361 void showHideMainWidgets(QAction *action);
362 void setTimestampFormat(QAction *action);
363 void setTimestampPrecision(QAction *action);
364 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
365 void editResolvedName();
366 void setNameResolution();
368 void showColoringRulesDialog();
369 void colorizeConversation(
bool create_rule =
false);
370 void colorizeActionTriggered();
371 void openPacketDialog(
bool from_reference =
false);
372 void reloadCaptureFileAsFormatOrCapture();
373 void reloadCaptureFile();
375 void connectGoMenuActions();
377 void setPreviousFocus();
378 void resetPreviousFocus();
380 void connectCaptureMenuActions();
381 void startCaptureTriggered();
383 void connectAnalyzeMenuActions();
385 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
386 void applyFieldAsColumn();
388 void filterMenuAboutToShow();
390 void applyConversationFilter();
392 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
393 void openFollowStreamDialog(
int proto_id);
395 void statCommandExpertInfo(
const char *,
void *);
397 void connectToolsMenuActions();
399 void connectHelpMenuActions();
401 void goToCancelClicked();
402 void goToGoClicked();
403 void goToLineEditReturnPressed();
405 void connectStatisticsMenuActions();
407 void showResolvedAddressesDialog();
408 void showConversationsDialog();
409 void showEndpointsDialog();
411 void openStatisticsTreeDialog(
const char *abbr);
412 void statCommandIOGraph(
const char *,
void *);
413 void showIOGraphDialog(io_graph_item_unit_t, QString)
override;
415 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false)
override;
417 void externalMenuItemTriggered();
419 void on_actionContextWikiProtocolPage_triggered();
420 void on_actionContextFilterFieldReference_triggered();
422 void extcap_options_finished(
int result);
423 void showExtcapOptionsDialog(QString device_name,
bool startCaptureOnClose);
bool openCaptureFile(QString cf_path, QString display_filter, unsigned int type, bool is_tempfile=false)
Definition stratoshark_main_window_slots.cpp:159