From f4e3d8cbf3b8815f8affb3cb625ff5e8813bd0a8 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Fri, 1 Jun 2018 22:54:49 +0200 Subject: Qt: Rename MainWelcome Currently exist two main pages within Wireshark. The first being the main welcome page and the second the packet capture page. The first is called "main_welcome.?" and the second is actually the master_split_ object defined in main_window.h. The first being a QFrame, the second not. In preparation for future developments (dockable windows, multiple capture files), this is being corrected, with the main welcome being renamed as welcome_page as a first step Change-Id: I40703e6ed15ff6f6b62b2a3cf31f5636ac6da9ec Reviewed-on: https://code.wireshark.org/review/27949 Petri-Dish: Roland Knall Reviewed-by: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall --- ui/qt/welcome_page.h | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 ui/qt/welcome_page.h (limited to 'ui/qt/welcome_page.h') diff --git a/ui/qt/welcome_page.h b/ui/qt/welcome_page.h new file mode 100644 index 0000000000..dce4a64e7e --- /dev/null +++ b/ui/qt/welcome_page.h @@ -0,0 +1,101 @@ +/* welcome_page.h + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef WELCOME_PAGE_H +#define WELCOME_PAGE_H + +#include + +class QListWidget; +class QListWidgetItem; +class QMenu; + +#include "splash_overlay.h" +#include "interface_frame.h" + +namespace Ui { + class WelcomePage; +} + +class WelcomePage : public QFrame +{ + Q_OBJECT +public: + explicit WelcomePage(QWidget *parent = 0); + virtual ~WelcomePage(); + InterfaceFrame *getInterfaceFrame(); + const QString captureFilter(); + void setCaptureFilter(const QString capture_filter); + +public slots: + void interfaceSelected(); + +protected: + virtual void resizeEvent(QResizeEvent *event); + virtual void changeEvent(QEvent* event); + +protected slots: + void on_recentLabel_clicked(); + void on_captureLabel_clicked(); + void on_helpLabel_clicked(); + +private: + Ui::WelcomePage *welcome_ui_; + QString flavor_; + QString show_in_str_; + + SplashOverlay *splash_overlay_; + // QListWidget doesn't activate items when the return or enter keys are pressed on macOS. + // We may want to subclass it at some point. + QListWidget *recent_files_; +// MWOverlay *overlay; + QMenu *recent_ctx_menu_; + + +signals: + void startCapture(); + void recentFileActivated(QString cfile); + void pushFilterSyntaxStatus(const QString&); + void popFilterSyntaxStatus(); + void captureFilterSyntaxChanged(bool valid); + void showExtcapOptions(QString &device_name); + void interfacesChanged(); + +public slots: + void setCaptureFilterText(const QString capture_filter); + +private slots: + void appInitialized(); + void interfaceListChanged(); + void captureFilterTextEdited(const QString capture_filter); + void updateRecentCaptures(); + void openRecentItem(QListWidgetItem *item); + void showRecentContextMenu(QPoint pos); + void showRecentFolder(); + void copyRecentPath(); + void removeRecentPath(); + + void on_interfaceFrame_showExtcapOptions(QString device_name); + void on_interfaceFrame_startCapture(); +}; + +#endif // WELCOME_PAGE_H + +/* + * Editor modelines + * + * Local Variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ -- cgit v1.2.3