10 #ifndef LOGRAY_MAIN_WINDOW_H
11 #define LOGRAY_MAIN_WINDOW_H
56 #include <QMainWindow>
63 # include <QSocketNotifier>
75 class CaptureOptionsDialog;
94 Q_DECLARE_METATYPE(ts_type)
95 Q_DECLARE_METATYPE(ts_precision)
107 info_data_t *captureInfoData() {
return &info_data_; }
110 virtual QMenu *createPopupMenu();
112 CaptureFile *captureFile() {
return &capture_file_; }
114 void removeAdditionalToolbar(QString toolbarName);
116 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
117 void removeInterfaceToolbar(
const char *menu_title);
119 QString getMwFileName();
120 void setMwFileName(QString fileName);
123 virtual bool eventFilter(QObject *obj, QEvent *event);
124 virtual bool event(QEvent *event);
125 virtual void keyPressEvent(QKeyEvent *event);
126 virtual void closeEvent(QCloseEvent *event);
127 virtual void dragEnterEvent(QDragEnterEvent *event);
128 virtual void dropEvent(QDropEvent *event);
129 virtual void changeEvent(QEvent* event);
134 MatchSelectedReplace,
142 enum FileCloseContext {
150 Ui::LograyMainWindow *main_ui_;
153 QMap<QString, QTextCodec *> text_codec_map_;
154 QWidget *previous_focus_;
156 QActionGroup *show_hide_actions_;
157 QActionGroup *time_display_actions_;
158 QActionGroup *time_precision_actions_;
160 QList<QPair<QAction *, bool> > freeze_actions_;
161 QPointer<QWidget> freeze_focus_;
162 QMap<QAction *, ts_type> td_actions;
163 QMap<QAction *, ts_precision> tp_actions;
170 bool capture_stopping_;
171 bool capture_filter_valid_;
172 bool use_capturing_title_;
175 CaptureOptionsDialog *capture_options_dialog_;
179 #if defined(Q_OS_MAC)
183 #ifdef HAVE_SOFTWARE_UPDATE
184 QAction *update_action_;
187 QPoint dragStartPosition;
192 void mergeCaptureFile();
193 void importCaptureFile();
194 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
195 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
196 void exportSelectedPackets();
197 void exportDissections(export_type_e export_type);
200 void fileAddExtension(QString &file_name,
int file_type, wtap_compression_type compression_type);
202 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
205 void findTextCodecs();
207 void initMainToolbarIcons();
208 void initShowHideMainWidgets();
209 void initTimeDisplayFormatMenu();
210 void initTimePrecisionFormatMenu();
211 void initFreezeActions();
213 void setTitlebarForCaptureInProgress();
214 void setMenusForCaptureFile(
bool force_disable =
false);
215 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
216 void setMenusForCaptureStopping();
217 void setForCapturedPackets(
bool have_captured_packets);
218 void setMenusForFileSet(
bool enable_list_files);
219 void setWindowIcon(
const QIcon &icon);
220 QString replaceWindowTitleVariables(QString title);
221 void updateStyleSheet();
223 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu,
int depth);
225 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
226 QMenu* findOrAddMenu(QMenu *parent_menu, QString& menu_text);
228 void captureFileReadStarted(
const QString &action);
230 void addMenuActions(QList<QAction *> &actions,
int menu_group);
231 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
232 void goToConversationFrame(
bool go_next);
233 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
237 void closePacketDialogs();
240 void fieldFilterChanged(
const QByteArray field_filter);
244 void captureActive(
int);
247 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
261 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type,
bool is_tempfile =
false);
262 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
263 void filterPackets(QString new_filter = QString(),
bool force =
false);
264 void updateForUnsavedChanges();
265 void layoutToolbars();
266 void updatePreferenceActions();
267 void updateRecentActions();
269 void setTitlebarForCaptureFile();
270 void setWSWindowTitle(QString title = QString());
272 void showCaptureOptionsDialog();
282 void captureFileOpened();
283 void captureFileReadFinished();
284 void captureFileClosing();
285 void captureFileClosed();
293 void initViewColorizeMenu();
294 void initConversationMenus();
295 static bool addFollowStreamMenuItem(
const void *key,
void *value,
void *userdata);
296 void initFollowStreamMenus();
304 void startCapture(QStringList);
306 void pushLiveCaptureInProgress();
307 void popLiveCaptureInProgress();
310 void loadWindowGeometry();
311 void saveWindowGeometry();
312 void mainStackChanged(
int);
313 void updateRecentCaptures();
314 void recentActionTriggered();
315 void addPacketComment();
316 void editPacketComment();
317 void deletePacketComment();
318 void deleteCommentsFromPackets();
319 QString commentToMenuText(QString text,
int max_len = 40);
320 void setEditCommentsMenu();
321 void setMenusForSelectedPacket();
323 void interfaceSelectionChanged();
324 void captureFilterSyntaxChanged(
bool valid);
325 void redissectPackets();
326 void checkDisplayFilter();
327 void fieldsChanged();
328 void reloadLuaPlugins();
329 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
330 void showColumnEditor(
int column);
331 void showPreferenceEditor();
332 void addStatsPluginsToMenu();
333 void addDynamicMenus();
334 void reloadDynamicMenus();
335 void addPluginIFStructures();
336 QMenu * searchSubMenu(QString objectName);
337 void activatePluginIFToolbar(
bool);
338 void updateTitlebar();
340 void startInterfaceCapture(
bool valid,
const QString capture_filter);
342 void applyGlobalCommandLineOptions();
343 void setFeaturesEnabled(
bool enabled =
true);
345 void on_actionNewDisplayFilterExpression_triggered();
346 void onFilterSelected(QString,
bool);
347 void onFilterPreferences();
348 void onFilterEdit(
int uatIndex);
351 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
358 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
365 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
366 void openTapParameterDialog();
368 #if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
369 void softwareUpdateRequested();
385 void connectFileMenuActions();
388 void connectEditMenuActions();
389 void copySelectedItems(LograyMainWindow::CopySelected selection_type);
391 void editTimeShift();
392 void editConfigurationProfiles();
393 void editTimeShiftFinished(
int);
395 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result,
unsigned nComment);
396 void deleteAllPacketComments();
397 void deleteAllPacketCommentsFinished(
int result);
398 void showPreferencesDialog(QString module_name);
400 void connectViewMenuActions();
401 void showHideMainWidgets(QAction *action);
402 void setTimestampFormat(QAction *action);
403 void setTimestampPrecision(QAction *action);
404 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
405 void editResolvedName();
406 void setNameResolution();
408 void showColoringRulesDialog();
409 void colorizeConversation(
bool create_rule =
false);
410 void colorizeActionTriggered();
411 void openPacketDialog(
bool from_reference =
false);
412 void reloadCaptureFileAsFormatOrCapture();
413 void reloadCaptureFile();
415 void connectGoMenuActions();
417 void setPreviousFocus();
418 void resetPreviousFocus();
420 void connectCaptureMenuActions();
421 void startCaptureTriggered();
423 void connectAnalyzeMenuActions();
425 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
426 void applyFieldAsColumn();
428 void filterMenuAboutToShow();
430 void applyConversationFilter();
432 void openFollowStreamDialog(
int proto_id,
unsigned stream_num,
unsigned sub_stream_num,
bool use_stream_index =
true);
433 void openFollowStreamDialog(
int proto_id);
435 void statCommandExpertInfo(
const char *,
void *);
437 void connectToolsMenuActions();
439 void connectHelpMenuActions();
441 #ifdef HAVE_SOFTWARE_UPDATE
442 void checkForUpdates();
445 void goToCancelClicked();
446 void goToGoClicked();
447 void goToLineEditReturnPressed();
449 void connectStatisticsMenuActions();
451 void showResolvedAddressesDialog();
452 void showConversationsDialog();
453 void showEndpointsDialog();
455 void openStatisticsTreeDialog(
const char *abbr);
456 void statCommandIOGraph(
const char *,
void *);
457 void showIOGraphDialog(io_graph_item_unit_t, QString);
459 void externalMenuItemTriggered();
461 void on_actionContextWikiProtocolPage_triggered();
462 void on_actionContextFilterFieldReference_triggered();
464 void extcap_options_finished(
int result);
465 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
Definition: accordion_frame.h:18
Definition: byte_view_tab.h:29
Definition: capture_event.h:21
Definition: capture_file.h:21
Definition: file_set_dialog.h:29
Definition: filter_dialog.h:28
Definition: funnel_statistics.h:32
Definition: logray_main_window.h:98
bool openCaptureFile(QString cf_path, QString display_filter, unsigned int type, bool is_tempfile=false)
Definition: logray_main_window_slots.cpp:157
Definition: main_application.h:49
Definition: main_window.h:45
Definition: packet_list.h:40
Definition: print_dialog.h:27
Definition: proto_tree.h:29
Definition: welcome_page.h:27
Definition: wireshark_application.h:16
Definition: capture_session.h:137
Definition: capture_info.h:40
Definition: packet_info.h:44