10 #ifndef LOGRAY_MAIN_WINDOW_H
11 #define LOGRAY_MAIN_WINDOW_H
58 #include <QMainWindow>
65 # include <QSocketNotifier>
77 class CaptureOptionsDialog;
97 Q_DECLARE_METATYPE(ts_type)
98 Q_DECLARE_METATYPE(ts_precision)
110 info_data_t *captureInfoData() {
return &info_data_; }
113 virtual QMenu *createPopupMenu();
115 CaptureFile *captureFile() {
return &capture_file_; }
117 void removeAdditionalToolbar(QString toolbarName);
119 void addInterfaceToolbar(
const iface_toolbar *toolbar_entry);
120 void removeInterfaceToolbar(
const gchar *menu_title);
122 QString getMwFileName();
123 void setMwFileName(QString fileName);
126 virtual bool eventFilter(QObject *obj, QEvent *event);
127 virtual bool event(QEvent *event);
128 virtual void keyPressEvent(QKeyEvent *event);
129 virtual void closeEvent(QCloseEvent *event);
130 virtual void dragEnterEvent(QDragEnterEvent *event);
131 virtual void dropEvent(QDropEvent *event);
132 virtual void changeEvent(QEvent* event);
137 MatchSelectedReplace,
145 enum FileCloseContext {
153 Ui::LograyMainWindow *main_ui_;
156 QMap<QString, QTextCodec *> text_codec_map_;
157 QWidget *previous_focus_;
159 QActionGroup *show_hide_actions_;
160 QActionGroup *time_display_actions_;
161 QActionGroup *time_precision_actions_;
163 QList<QPair<QAction *, bool> > freeze_actions_;
164 QPointer<QWidget> freeze_focus_;
165 QMap<QAction *, ts_type> td_actions;
166 QMap<QAction *, ts_precision> tp_actions;
173 bool capture_stopping_;
174 bool capture_filter_valid_;
175 bool use_capturing_title_;
178 CaptureOptionsDialog *capture_options_dialog_;
182 #if defined(Q_OS_MAC)
186 #ifdef HAVE_SOFTWARE_UPDATE
187 QAction *update_action_;
190 QPoint dragStartPosition;
195 void mergeCaptureFile();
196 void importCaptureFile();
197 bool saveCaptureFile(
capture_file *cf,
bool dont_reopen);
198 bool saveAsCaptureFile(
capture_file *cf,
bool must_support_comments =
false,
bool dont_reopen =
false);
199 void exportSelectedPackets();
200 void exportDissections(export_type_e export_type);
203 void fileAddExtension(QString &file_name,
int file_type, wtap_compression_type compression_type);
205 bool testCaptureFileClose(QString before_what, FileCloseContext context = Default);
208 void findTextCodecs();
210 void initMainToolbarIcons();
211 void initShowHideMainWidgets();
212 void initTimeDisplayFormatMenu();
213 void initTimePrecisionFormatMenu();
214 void initFreezeActions();
216 void setTitlebarForCaptureInProgress();
217 void setMenusForCaptureFile(
bool force_disable =
false);
218 void setMenusForCaptureInProgress(
bool capture_in_progress =
false);
219 void setMenusForCaptureStopping();
220 void setForCapturedPackets(
bool have_captured_packets);
221 void setMenusForFileSet(
bool enable_list_files);
222 void setWindowIcon(
const QIcon &icon);
223 QString replaceWindowTitleVariables(QString title);
225 void externalMenuHelper(
ext_menu_t * menu, QMenu * subMenu, gint depth);
227 void setForCaptureInProgress(
bool capture_in_progress =
false,
bool handle_toolbars =
false, GArray *ifaces = NULL);
228 QMenu* findOrAddMenu(QMenu *parent_menu, QString& menu_text);
230 void captureFileReadStarted(
const QString &action);
232 void addMenuActions(QList<QAction *> &actions,
int menu_group);
233 void removeMenuActions(QList<QAction *> &actions,
int menu_group);
234 void goToConversationFrame(
bool go_next);
235 void colorizeWithFilter(QByteArray filter,
int color_number = -1);
239 void closePacketDialogs();
242 void fieldFilterChanged(
const QByteArray field_filter);
246 void captureActive(
int);
249 void showExtcapOptions(QString &device_name,
bool startCaptureOnClose);
263 bool openCaptureFile(QString cf_path, QString display_filter,
unsigned int type, gboolean is_tempfile = FALSE);
264 bool openCaptureFile(QString cf_path = QString(), QString display_filter = QString()) {
return openCaptureFile(cf_path, display_filter, WTAP_TYPE_AUTO); }
265 void filterPackets(QString new_filter = QString(),
bool force =
false);
266 void updateForUnsavedChanges();
267 void layoutToolbars();
268 void updatePreferenceActions();
269 void updateRecentActions();
271 void setTitlebarForCaptureFile();
272 void setWSWindowTitle(QString title = QString());
274 void showCaptureOptionsDialog();
284 void captureFileOpened();
285 void captureFileReadFinished();
286 void captureFileClosing();
287 void captureFileClosed();
295 void initViewColorizeMenu();
296 void initConversationMenus();
297 static bool addExportObjectsMenuItem(
const void *key,
void *value,
void *userdata);
298 void initExportObjectsMenus();
306 void startCapture(QStringList);
308 void popLiveCaptureInProgress();
311 void loadWindowGeometry();
312 void saveWindowGeometry();
313 void mainStackChanged(
int);
314 void updateRecentCaptures();
315 void recentActionTriggered();
316 void addPacketComment();
317 void editPacketComment();
318 void deletePacketComment();
319 void deleteCommentsFromPackets();
320 QString commentToMenuText(QString text,
int max_len = 40);
321 void setEditCommentsMenu();
322 void setMenusForSelectedPacket();
324 void interfaceSelectionChanged();
325 void captureFilterSyntaxChanged(
bool valid);
326 void redissectPackets();
327 void checkDisplayFilter();
328 void fieldsChanged();
329 void reloadLuaPlugins();
330 void showAccordionFrame(
AccordionFrame *show_frame,
bool toggle =
false);
331 void showColumnEditor(
int column);
332 void showPreferenceEditor();
333 void addStatsPluginsToMenu();
334 void addDynamicMenus();
335 void reloadDynamicMenus();
336 void addPluginIFStructures();
337 QMenu * searchSubMenu(QString objectName);
338 void activatePluginIFToolbar(
bool);
339 void updateTitlebar();
341 void startInterfaceCapture(
bool valid,
const QString capture_filter);
343 void applyGlobalCommandLineOptions();
344 void setFeaturesEnabled(
bool enabled =
true);
346 void on_actionNewDisplayFilterExpression_triggered();
347 void onFilterSelected(QString,
bool);
348 void onFilterPreferences();
349 void onFilterEdit(
int uatIndex);
352 void queuedFilterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
359 void openStatCommandDialog(
const QString &menu_path,
const char *arg,
void *userdata);
366 void openTapParameterDialog(
const QString cfg_str,
const QString arg,
void *userdata);
367 void openTapParameterDialog();
369 #if defined(HAVE_SOFTWARE_UPDATE) && defined(Q_OS_WIN)
370 void softwareUpdateRequested();
386 void connectFileMenuActions();
387 void exportPacketBytes();
391 void connectEditMenuActions();
392 void copySelectedItems(LograyMainWindow::CopySelected selection_type);
394 void editTimeShift();
395 void editConfigurationProfiles();
396 void editTimeShiftFinished(
int);
398 void editPacketCommentFinished(
PacketCommentDialog* pc_dialog,
int result, guint nComment);
399 void deleteAllPacketComments();
400 void deleteAllPacketCommentsFinished(
int result);
401 void showPreferencesDialog(QString module_name);
403 void connectViewMenuActions();
404 void showHideMainWidgets(QAction *action);
405 void setTimestampFormat(QAction *action);
406 void setTimestampPrecision(QAction *action);
407 void setTimeDisplaySecondsWithHoursAndMinutes(
bool checked);
408 void editResolvedName();
409 void setNameResolution();
411 void showColoringRulesDialog();
412 void colorizeConversation(
bool create_rule =
false);
413 void colorizeActionTriggered();
414 void openPacketDialog(
bool from_reference =
false);
415 void reloadCaptureFileAsFormatOrCapture();
416 void reloadCaptureFile();
418 void connectGoMenuActions();
420 void resetPreviousFocus();
422 void connectCaptureMenuActions();
423 void startCaptureTriggered();
425 void connectAnalyzeMenuActions();
427 void matchFieldFilter(FilterAction::Action action, FilterAction::ActionType filter_type);
428 void applyFieldAsColumn();
430 void filterMenuAboutToShow();
432 void applyConversationFilter();
433 void applyExportObject();
435 void statCommandExpertInfo(
const char *,
void *);
437 void connectHelpMenuActions();
439 #ifdef HAVE_SOFTWARE_UPDATE
440 void checkForUpdates();
443 void goToCancelClicked();
444 void goToGoClicked();
445 void goToLineEditReturnPressed();
447 void connectStatisticsMenuActions();
449 void showResolvedAddressesDialog();
450 void showConversationsDialog();
451 void showEndpointsDialog();
453 void openStatisticsTreeDialog(
const gchar *abbr);
454 void statCommandIOGraph(
const char *,
void *);
456 void externalMenuItemTriggered();
458 void on_actionContextWikiProtocolPage_triggered();
459 void on_actionContextFilterFieldReference_triggered();
461 void extcap_options_finished(
int result);
462 void showExtcapOptionsDialog(QString & device_name,
bool startCaptureOnClose);
Definition: accordion_frame.h:18
Definition: byte_view_tab.h:29
Definition: capture_event.h:20
Definition: capture_file.h:23
Definition: file_set_dialog.h:31
Definition: filter_dialog.h:28
Definition: funnel_statistics.h:32
Definition: logray_main_window.h:101
bool openCaptureFile(QString cf_path, QString display_filter, unsigned int type, gboolean is_tempfile=FALSE)
Definition: logray_main_window_slots.cpp:160
Definition: main_application.h:51
Definition: main_window.h:40
Definition: packet_diagram.h:26
Definition: packet_list.h:39
Definition: print_dialog.h:29
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