102 info_data_t *captureInfoData() {
return &info_data_; }
105 virtual QMenu *createPopupMenu();
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 virtual bool eventFilter(QObject *obj, QEvent *event);
120 virtual bool event(QEvent *event);
121 virtual void keyPressEvent(QKeyEvent *event);
122 virtual void closeEvent(QCloseEvent *event);
123 virtual void dragEnterEvent(QDragEnterEvent *event);
124 virtual void dropEvent(QDropEvent *event);
125 virtual void changeEvent(QEvent* event);
130 MatchSelectedReplace,
138 enum FileCloseContext {
146 Ui::StratosharkMainWindow *main_ui_;
148 QWidget *previous_focus_;
150 QActionGroup *show_hide_actions_;
151 QActionGroup *time_display_actions_;
152 QActionGroup *time_precision_actions_;
154 QList<QPair<QAction *, bool> > freeze_actions_;
155 QPointer<QWidget> freeze_focus_;
156 QMap<QAction *, ts_type> td_actions;
157 QMap<QAction *, ts_precision> tp_actions;
164 bool capture_stopping_;
165 bool capture_filter_valid_;
168 CaptureOptionsDialog *capture_options_dialog_;
176#ifdef HAVE_SOFTWARE_UPDATE
177 QAction *update_action_;
180 QPoint dragStartPosition;
185 void mergeCaptureFile();
186 void importCaptureFile();
187 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
188 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
189 void exportSelectedPackets();
190 void exportDissections(export_type_e export_type);
193 void fileAddExtension(QString &file_name,
int file_type, ws_compression_type compression_type);
195 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
198 void initMainToolbarIcons();
199 void initShowHideMainWidgets();
200 void initTimeDisplayFormatMenu();
201 void initTimePrecisionFormatMenu();
202 void initFreezeActions();
204 void setMenusForCaptureFile(
bool force_disable =
false);
205 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
206 void setMenusForCaptureStopping();
207 void setForCapturedPackets(
bool have_captured_packets);
208 void setMenusForFileSet(
bool enable_list_files);
209 void setWindowIcon(
const QIcon &icon);
210 void updateStyleSheet();
212 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
214 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
215 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
217 void captureFileReadStarted(
const QString &action);
219 void addMenuActions(QList<QAction *> &actions,
int menu_group);
220 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
221 void goToConversationFrame(
bool go_next,
bool start_current =
true);
222 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
226 void closePacketDialogs();
229 void fieldFilterChanged(
const QByteArray field_filter);
232 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
254 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
255 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
256 void filterPackets(QString new_filter = QString(),
bool force =
false);
257 void updateForUnsavedChanges();
258 void layoutToolbars();
259 void updatePreferenceActions();
260 void updateRecentActions();
262 void setTitlebarForCaptureFile();
264 void showCaptureOptionsDialog();
274 void captureFileOpened();
275 void captureFileReadFinished();
276 void captureFileClosing();
277 void captureFileClosed();
283 void initViewColorizeMenu();
284 void initConversationMenus();
285 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
286 void initFollowStreamMenus();
294 void startCapture(QStringList);
296 void pushLiveCaptureInProgress();
297 void popLiveCaptureInProgress();
300 void loadWindowGeometry();
301 void saveWindowGeometry();
302 void mainStackChanged(
int);
303 void updateRecentCaptures();
304 void recentActionTriggered();
305 void addPacketComment();
306 void editPacketComment();
307 void deletePacketComment();
308 void deleteCommentsFromPackets();
309 QString commentToMenuText(QString text,
int max_len = 40);
310 void setEditCommentsMenu();
311 void setMenusForSelectedPacket();
313 void interfaceSelectionChanged();
314 void captureFilterSyntaxChanged(
bool valid);
315 void redissectPackets();
316 void checkDisplayFilter();
317 void fieldsChanged();
318 void reloadLuaPlugins();
319 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
320 void showColumnEditor(
int column);
321 void showPreferenceEditor();
322 void addStatsPluginsToMenu();
323 void addDynamicMenus();
324 void reloadDynamicMenus();
325 void addPluginIFStructures();
326 QMenu * searchSubMenu(QString objectName);
327 void activatePluginIFToolbar(
bool);
329 void startInterfaceCapture(
bool valid,
const QString capture_filter);
331 void applyGlobalCommandLineOptions();
332 void setFeaturesEnabled(
bool enabled =
true);
334 void on_actionNewDisplayFilterExpression_triggered();
335 void onFilterSelected(QString,
bool);
336 void onFilterPreferences();
337 void onFilterEdit(
int uatIndex);
340 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
347 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
354 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
355 void openTapParameterDialog();
357#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
358 void softwareUpdateRequested();
361 void connectFileMenuActions();
364 void connectEditMenuActions();
365 void copySelectedItems(StratosharkMainWindow::CopySelected selection_type);
367 void editTimeShift();
368 void editConfigurationProfiles();
369 void editTimeShiftFinished(
int);
371 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
372 void deleteAllPacketComments();
373 void deleteAllPacketCommentsFinished(
int result);
374 void showPreferencesDialog(QString module_name);
376 void connectViewMenuActions();
377 void showHideMainWidgets(QAction *action);
378 void setTimestampFormat(QAction *action);
379 void setTimestampPrecision(QAction *action);
380 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
381 void editResolvedName();
382 void setNameResolution();
384 void showColoringRulesDialog();
385 void colorizeConversation(
bool create_rule =
false);
386 void colorizeActionTriggered();
387 void openPacketDialog(
bool from_reference =
false);
388 void reloadCaptureFileAsFormatOrCapture();
389 void reloadCaptureFile();
391 void connectGoMenuActions();
393 void setPreviousFocus();
394 void resetPreviousFocus();
396 void connectCaptureMenuActions();
397 void startCaptureTriggered();
399 void connectAnalyzeMenuActions();
401 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
402 void applyFieldAsColumn();
404 void filterMenuAboutToShow();
406 void applyConversationFilter();
408 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
409 void openFollowStreamDialog(
int proto_id);
411 void statCommandExpertInfo(
const char *,
void *);
413 void connectToolsMenuActions();
415 void connectHelpMenuActions();
417#ifdef HAVE_SOFTWARE_UPDATE
418 void checkForUpdates();
421 void goToCancelClicked();
422 void goToGoClicked();
423 void goToLineEditReturnPressed();
425 void connectStatisticsMenuActions();
427 void showResolvedAddressesDialog();
428 void showConversationsDialog();
429 void showEndpointsDialog();
431 void openStatisticsTreeDialog(
const char *abbr);
432 void statCommandIOGraph(
const char *,
void *);
433 void showIOGraphDialog(io_graph_item_unit_t, QString);
435 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false);
437 void externalMenuItemTriggered();
439 void on_actionContextWikiProtocolPage_triggered();
440 void on_actionContextFilterFieldReference_triggered();
442 void extcap_options_finished(
int result);
443 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:160