aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/welcome_page.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2018-06-01 22:54:49 +0200
committerRoland Knall <rknall@gmail.com>2018-06-01 22:01:20 +0000
commitf4e3d8cbf3b8815f8affb3cb625ff5e8813bd0a8 (patch)
treea4c3dbbd91c80fdcf8fa8dab19af6875a7352c00 /ui/qt/welcome_page.h
parent5ff8c3895a41b44486fbc17e05e4a188e3c4827e (diff)
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 <rknall@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/welcome_page.h')
-rw-r--r--ui/qt/welcome_page.h101
1 files changed, 101 insertions, 0 deletions
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 <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef WELCOME_PAGE_H
+#define WELCOME_PAGE_H
+
+#include <QFrame>
+
+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:
+ */