2012-01-04 22:13:01 +00:00
|
|
|
/* main_welcome.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2012-01-04 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MAIN_WELCOME_H
|
|
|
|
#define MAIN_WELCOME_H
|
|
|
|
|
|
|
|
#include <QFrame>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
|
|
|
class QListWidget;
|
|
|
|
class QListWidgetItem;
|
|
|
|
class QTreeWidgetItem;
|
2016-10-01 06:54:57 +00:00
|
|
|
class QMenu;
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-11-05 03:54:21 +00:00
|
|
|
#include "splash_overlay.h"
|
2016-10-01 06:54:57 +00:00
|
|
|
#include "interface_frame.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-08-17 00:58:50 +00:00
|
|
|
namespace Ui {
|
|
|
|
class MainWelcome;
|
|
|
|
}
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
class MainWelcome : public QFrame
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit MainWelcome(QWidget *parent = 0);
|
2015-10-04 09:31:19 +00:00
|
|
|
virtual ~MainWelcome();
|
2016-10-01 06:54:57 +00:00
|
|
|
InterfaceFrame *getInterfaceFrame();
|
2016-01-07 17:27:13 +00:00
|
|
|
const QString captureFilter();
|
2016-01-19 00:02:48 +00:00
|
|
|
void setCaptureFilter(const QString capture_filter);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2016-02-23 18:04:16 +00:00
|
|
|
public slots:
|
|
|
|
void interfaceSelected();
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
protected:
|
2012-11-05 03:54:21 +00:00
|
|
|
void resizeEvent(QResizeEvent *event);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
private:
|
2012-11-05 03:54:21 +00:00
|
|
|
Ui::MainWelcome *welcome_ui_;
|
|
|
|
|
|
|
|
SplashOverlay *splash_overlay_;
|
2012-01-04 22:13:01 +00:00
|
|
|
// QListWidget doesn't activate items when the return or enter keys are pressed on OS X.
|
|
|
|
// We may want to subclass it at some point.
|
2012-08-17 00:58:50 +00:00
|
|
|
QListWidget *recent_files_;
|
2012-01-04 22:13:01 +00:00
|
|
|
// MWOverlay *overlay;
|
2015-10-09 20:56:27 +00:00
|
|
|
QMenu *recent_ctx_menu_;
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
signals:
|
2012-12-03 19:58:55 +00:00
|
|
|
void startCapture();
|
2015-09-11 18:13:23 +00:00
|
|
|
void recentFileActivated(QString cfile);
|
2015-03-04 23:43:33 +00:00
|
|
|
void pushFilterSyntaxStatus(const QString&);
|
2013-08-08 00:26:57 +00:00
|
|
|
void popFilterSyntaxStatus();
|
|
|
|
void captureFilterSyntaxChanged(bool valid);
|
2016-03-18 17:31:09 +00:00
|
|
|
#ifdef HAVE_EXTCAP
|
2015-04-28 08:26:46 +00:00
|
|
|
void showExtcapOptions(QString &device_name);
|
|
|
|
#endif
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2016-02-23 18:04:16 +00:00
|
|
|
public slots:
|
|
|
|
void setCaptureFilterText(const QString capture_filter);
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
private slots:
|
2015-02-19 23:18:44 +00:00
|
|
|
void appInitialized();
|
2016-01-19 00:02:48 +00:00
|
|
|
void captureFilterTextEdited(const QString capture_filter);
|
2012-01-04 22:13:01 +00:00
|
|
|
void updateRecentFiles();
|
|
|
|
void openRecentItem(QListWidgetItem *item);
|
2013-12-21 16:55:43 +00:00
|
|
|
void changeEvent(QEvent* event);
|
2015-10-09 20:56:27 +00:00
|
|
|
void showRecentContextMenu(QPoint pos);
|
|
|
|
void showRecentFolder();
|
|
|
|
void copyRecentPath();
|
2016-09-19 19:12:34 +00:00
|
|
|
void removeRecentPath();
|
2016-10-01 06:54:57 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_EXTCAP
|
|
|
|
void on_interfaceFrame_showExtcapOptions(QString device_name);
|
|
|
|
#endif
|
|
|
|
void on_interfaceFrame_startCapture();
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAIN_WELCOME_H
|
2012-09-04 08:18:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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:
|
|
|
|
*/
|