102 info_data_t *captureInfoData() {
return &info_data_; }
105 virtual QMenu *createPopupMenu();
107 CaptureFile *captureFile() {
return &capture_file_; }
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 virtual bool eventFilter(QObject *obj, QEvent *event);
119 virtual bool event(QEvent *event);
120 virtual void keyPressEvent(QKeyEvent *event);
121 virtual void closeEvent(QCloseEvent *event);
122 virtual void dragEnterEvent(QDragEnterEvent *event);
123 virtual void dropEvent(QDropEvent *event);
124 virtual void changeEvent(QEvent* event);
129 MatchSelectedReplace,
137 enum FileCloseContext {
145 Ui::StratosharkMainWindow *main_ui_;
147 QWidget *previous_focus_;
149 QActionGroup *show_hide_actions_;
150 QActionGroup *time_display_actions_;
151 QActionGroup *time_precision_actions_;
153 QList<QPair<QAction *, bool> > freeze_actions_;
154 QPointer<QWidget> freeze_focus_;
155 QMap<QAction *, ts_type> td_actions;
156 QMap<QAction *, ts_precision> tp_actions;
163 bool capture_stopping_;
164 bool capture_filter_valid_;
167 CaptureOptionsDialog *capture_options_dialog_;
175#ifdef HAVE_SOFTWARE_UPDATE
176 QAction *update_action_;
179 QPoint dragStartPosition;
184 void mergeCaptureFile();
185 void importCaptureFile();
186 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
187 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
188 void exportSelectedPackets();
189 void exportDissections(export_type_e export_type);
192 void fileAddExtension(QString &file_name,
int file_type, wtap_compression_type compression_type);
194 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
197 void initMainToolbarIcons();
198 void initShowHideMainWidgets();
199 void initTimeDisplayFormatMenu();
200 void initTimePrecisionFormatMenu();
201 void initFreezeActions();
203 void setMenusForCaptureFile(
bool force_disable =
false);
204 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
205 void setMenusForCaptureStopping();
206 void setForCapturedPackets(
bool have_captured_packets);
207 void setMenusForFileSet(
bool enable_list_files);
208 void setWindowIcon(
const QIcon &icon);
209 void updateStyleSheet();
211 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
213 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
214 QMenu* findOrAddMenu(QMenu *parent_menu,
const QStringList& menu_parts);
216 void captureFileReadStarted(
const QString &action);
218 void addMenuActions(QList<QAction *> &actions,
int menu_group);
219 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
220 void goToConversationFrame(
bool go_next,
bool start_current =
true);
221 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
225 void closePacketDialogs();
228 void fieldFilterChanged(
const QByteArray field_filter);
231 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
253 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
254 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
255 void filterPackets(QString new_filter = QString(),
bool force =
false);
256 void updateForUnsavedChanges();
257 void layoutToolbars();
258 void updatePreferenceActions();
259 void updateRecentActions();
261 void setTitlebarForCaptureFile();
263 void showCaptureOptionsDialog();
273 void captureFileOpened();
274 void captureFileReadFinished();
275 void captureFileClosing();
276 void captureFileClosed();
282 void initViewColorizeMenu();
283 void initConversationMenus();
284 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
285 void initFollowStreamMenus();
293 void startCapture(QStringList);
295 void pushLiveCaptureInProgress();
296 void popLiveCaptureInProgress();
299 void loadWindowGeometry();
300 void saveWindowGeometry();
301 void mainStackChanged(
int);
302 void updateRecentCaptures();
303 void recentActionTriggered();
304 void addPacketComment();
305 void editPacketComment();
306 void deletePacketComment();
307 void deleteCommentsFromPackets();
308 QString commentToMenuText(QString text,
int max_len = 40);
309 void setEditCommentsMenu();
310 void setMenusForSelectedPacket();
312 void interfaceSelectionChanged();
313 void captureFilterSyntaxChanged(
bool valid);
314 void redissectPackets();
315 void checkDisplayFilter();
316 void fieldsChanged();
317 void reloadLuaPlugins();
318 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
319 void showColumnEditor(
int column);
320 void showPreferenceEditor();
321 void addStatsPluginsToMenu();
322 void addDynamicMenus();
323 void reloadDynamicMenus();
324 void addPluginIFStructures();
325 QMenu * searchSubMenu(QString objectName);
326 void activatePluginIFToolbar(
bool);
328 void startInterfaceCapture(
bool valid,
const QString capture_filter);
330 void applyGlobalCommandLineOptions();
331 void setFeaturesEnabled(
bool enabled =
true);
333 void on_actionNewDisplayFilterExpression_triggered();
334 void onFilterSelected(QString,
bool);
335 void onFilterPreferences();
336 void onFilterEdit(
int uatIndex);
339 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
346 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
353 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
354 void openTapParameterDialog();
356#if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
357 void softwareUpdateRequested();
360 void connectFileMenuActions();
363 void connectEditMenuActions();
364 void copySelectedItems(StratosharkMainWindow::CopySelected selection_type);
366 void editTimeShift();
367 void editConfigurationProfiles();
368 void editTimeShiftFinished(
int);
370 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
371 void deleteAllPacketComments();
372 void deleteAllPacketCommentsFinished(
int result);
373 void showPreferencesDialog(QString module_name);
375 void connectViewMenuActions();
376 void showHideMainWidgets(QAction *action);
377 void setTimestampFormat(QAction *action);
378 void setTimestampPrecision(QAction *action);
379 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
380 void editResolvedName();
381 void setNameResolution();
383 void showColoringRulesDialog();
384 void colorizeConversation(
bool create_rule =
false);
385 void colorizeActionTriggered();
386 void openPacketDialog(
bool from_reference =
false);
387 void reloadCaptureFileAsFormatOrCapture();
388 void reloadCaptureFile();
390 void connectGoMenuActions();
392 void setPreviousFocus();
393 void resetPreviousFocus();
395 void connectCaptureMenuActions();
396 void startCaptureTriggered();
398 void connectAnalyzeMenuActions();
400 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
401 void applyFieldAsColumn();
403 void filterMenuAboutToShow();
405 void applyConversationFilter();
407 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
408 void openFollowStreamDialog(
int proto_id);
410 void statCommandExpertInfo(
const char *,
void *);
412 void connectToolsMenuActions();
414 void connectHelpMenuActions();
416#ifdef HAVE_SOFTWARE_UPDATE
417 void checkForUpdates();
420 void goToCancelClicked();
421 void goToGoClicked();
422 void goToLineEditReturnPressed();
424 void connectStatisticsMenuActions();
426 void showResolvedAddressesDialog();
427 void showConversationsDialog();
428 void showEndpointsDialog();
430 void openStatisticsTreeDialog(
const char *abbr);
431 void statCommandIOGraph(
const char *,
void *);
432 void showIOGraphDialog(io_graph_item_unit_t, QString);
434 void showPlotDialog(
const QString& y_field = QString(),
bool filtered =
false);
436 void externalMenuItemTriggered();
438 void on_actionContextWikiProtocolPage_triggered();
439 void on_actionContextFilterFieldReference_triggered();
441 void extcap_options_finished(
int result);
442 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