102 info_data_t *captureInfoData() {
return &info_data_; }
105 QMenu *createPopupMenu()
override;
107 CaptureFile *captureFile() {
return &capture_file_; }
109 void setFunnelMenus(
void);
110 void removeAdditionalToolbar(QString toolbarName);
112 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
113 void removeInterfaceToolbar(
const char *menu_title);
115 QString getMwFileName();
116 void setMwFileName(QString fileName);
119 bool eventFilter(QObject *obj, QEvent *event)
override;
120 bool event(QEvent *event)
override;
121 void keyPressEvent(QKeyEvent *event)
override;
122 void closeEvent(QCloseEvent *event)
override;
123 void dragEnterEvent(QDragEnterEvent *event)
override;
124 void dropEvent(QDropEvent *event)
override;
125 void changeEvent(QEvent* event)
override;
131 MatchSelectedReplace,
139 enum FileCloseContext {
147 Ui::StratosharkMainWindow *main_ui_;
149 QWidget *previous_focus_;
151 QActionGroup *show_hide_actions_;
152 QActionGroup *time_display_actions_;
153 QActionGroup *time_precision_actions_;
155 QList<QPair<QAction *, bool> > freeze_actions_;
156 QPointer<QWidget> freeze_focus_;
157 QMap<QAction *, ts_type> td_actions;
158 QMap<QAction *, ts_precision> tp_actions;
165 bool capture_stopping_;
166 bool capture_filter_valid_;
169 CaptureOptionsDialog *capture_options_dialog_;
173#ifdef HAVE_SOFTWARE_UPDATE
174 QAction *update_action_;
177 QPoint dragStartPosition;
182 void mergeCaptureFile();
183 void importCaptureFile();
184 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
185 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
186 void exportSelectedPackets();
187 void exportDissections(export_type_e export_type);
190 void fileAddExtension(QString &file_name,
int file_type, ws_compression_type compression_type);
192 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
195 void initMainToolbarIcons();
196 void initShowHideMainWidgets();
197 void initTimeDisplayFormatMenu();
198 void initTimePrecisionFormatMenu();
199 void initFreezeActions();
201 void setMenusForCaptureFile(
bool force_disable =
false)
override;
202 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
203 void setMenusForCaptureStopping();
204 void setForCapturedPackets(
bool have_captured_packets);
205 void setMenusForFileSet(
bool enable_list_files);
206 void updateStyleSheet();
208 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
210 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
211 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
213 void captureFileReadStarted(
const QString &action);
215 void addMenuActions(QList<QAction *> &actions,
int menu_group);
216 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
217 void goToConversationFrame(
bool go_next,
bool start_current =
true);
218 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
222 void closePacketDialogs();
225 void fieldFilterChanged(
const QByteArray field_filter);
228 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
250 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
251 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
252 void filterPackets(QString new_filter = QString(),
bool force =
false)
override;
253 void updateForUnsavedChanges();
254 void layoutToolbars();
255 void updatePreferenceActions();
256 void updateRecentActions();
258 void setTitlebarForCaptureFile();
260 void showCaptureOptionsDialog();
270 void captureFileOpened();
271 void captureFileReadFinished();
272 void captureFileClosing();
273 void captureFileClosed();
279 void initViewColorizeMenu();
280 void initConversationMenus();
281 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
282 void initFollowStreamMenus();
290 void startCapture(QStringList);
292 void pushLiveCaptureInProgress();
293 void popLiveCaptureInProgress();
296 void loadWindowGeometry();
297 void saveWindowGeometry();
298 void mainStackChanged(
int);
299 void updateRecentCaptures();
300 void addPacketComment();
301 void editPacketComment();
302 void deletePacketComment();
303 void deleteCommentsFromPackets();
304 QString commentToMenuText(QString text,
int max_len = 40);
305 void setEditCommentsMenu();
306 void setMenusForSelectedPacket();
308 void interfaceSelectionChanged();
309 void captureFilterSyntaxChanged(
bool valid);
310 void redissectPackets();
311 void checkDisplayFilter();
312 void fieldsChanged();
313 void reloadLuaPlugins();
314 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
315 void showColumnEditor(
int column);
316 void showPreferenceEditor();
317 void addStatsPluginsToMenu();
318 void addDynamicMenus();
319 void reloadDynamicMenus();
320 void addPluginIFStructures();
321 QMenu * searchSubMenu(QString objectName);
322 void activatePluginIFToolbar(
bool);
324 void startInterfaceCapture(
bool valid,
const QString capture_filter);
326 void applyGlobalCommandLineOptions();
327 void setFeaturesEnabled(
bool enabled =
true);
329 void on_actionNewDisplayFilterExpression_triggered();
330 void onFilterSelected(QString,
bool);
331 void onFilterPreferences();
332 void onFilterEdit(
int uatIndex);
335 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
342 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
349 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
350 void openTapParameterDialog();
352#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
353 void softwareUpdateRequested();
356 void connectFileMenuActions();
359 void connectEditMenuActions();
360 void copySelectedItems(StratosharkMainWindow::CopySelected selection_type);
362 void editTimeShift();
363 void editConfigurationProfiles();
364 void editTimeShiftFinished(
int);
366 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
367 void deleteAllPacketComments();
368 void deleteAllPacketCommentsFinished(
int result);
369 void showPreferencesDialog(QString module_name)
override;
371 void connectViewMenuActions();
372 void showHideMainWidgets(QAction *action);
373 void setTimestampFormat(QAction *action);
374 void setTimestampPrecision(QAction *action);
375 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
376 void editResolvedName();
377 void setNameResolution();
379 void showColoringRulesDialog();
380 void colorizeConversation(
bool create_rule =
false);
381 void colorizeActionTriggered();
382 void openPacketDialog(
bool from_reference =
false);
383 void reloadCaptureFileAsFormatOrCapture();
384 void reloadCaptureFile();
386 void connectGoMenuActions();
388 void setPreviousFocus();
389 void resetPreviousFocus();
391 void connectCaptureMenuActions();
392 void startCaptureTriggered();
394 void connectAnalyzeMenuActions();
396 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
397 void applyFieldAsColumn();
399 void filterMenuAboutToShow();
401 void applyConversationFilter();
403 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
404 void openFollowStreamDialog(
int proto_id);
406 void statCommandExpertInfo(
const char *,
void *);
408 void connectToolsMenuActions();
410 void connectHelpMenuActions();
412#ifdef HAVE_SOFTWARE_UPDATE
413 void checkForUpdates();
416 void goToCancelClicked();
417 void goToGoClicked();
418 void goToLineEditReturnPressed();
420 void connectStatisticsMenuActions();
422 void showResolvedAddressesDialog();
423 void showConversationsDialog();
424 void showEndpointsDialog();
426 void openStatisticsTreeDialog(
const char *abbr);
427 void statCommandIOGraph(
const char *,
void *);
428 void showIOGraphDialog(io_graph_item_unit_t, QString)
override;
430 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false)
override;
432 void externalMenuItemTriggered();
434 void on_actionContextWikiProtocolPage_triggered();
435 void on_actionContextFilterFieldReference_triggered();
437 void extcap_options_finished(
int result);
438 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:161