2012-01-04 22:13:01 +00:00
|
|
|
/* main_window.h
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* 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 MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2012-01-14 00:16:16 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "file.h"
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QSplitter>
|
|
|
|
#include "main_welcome.h"
|
2012-08-13 01:50:14 +00:00
|
|
|
#include "packet_list.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
#include "display_filter_combo.h"
|
2012-07-19 21:49:52 +00:00
|
|
|
#include "progress_bar.h"
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
class QAction;
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
protected:
|
2012-08-23 02:59:31 +00:00
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
2012-01-04 22:13:01 +00:00
|
|
|
void keyPressEvent(QKeyEvent *event);
|
|
|
|
|
|
|
|
private:
|
2012-08-17 00:58:50 +00:00
|
|
|
Ui::MainWindow *main_ui_;
|
|
|
|
QMenu *open_recent_menu_;
|
|
|
|
QSplitter *splitter_v_;
|
|
|
|
MainWelcome *main_welcome_;
|
|
|
|
DisplayFilterCombo *df_combo_box_;
|
|
|
|
capture_file *cap_file_;
|
|
|
|
PacketList *packet_list_;
|
2012-01-04 22:13:01 +00:00
|
|
|
|
2012-08-20 21:22:01 +00:00
|
|
|
QWidget *previous_focus_;
|
|
|
|
|
2012-07-19 21:49:52 +00:00
|
|
|
signals:
|
|
|
|
void showProgress(progdlg_t **dlg_p, bool animate, const QString message, bool terminate_is_stop, bool *stop_flag, float pct);
|
|
|
|
|
2012-01-04 22:13:01 +00:00
|
|
|
public slots:
|
2012-01-14 00:16:16 +00:00
|
|
|
void captureFileReadStarted(const capture_file *cf);
|
|
|
|
void captureFileReadFinished(const capture_file *cf);
|
|
|
|
void captureFileClosing(const capture_file *cf);
|
|
|
|
void captureFileClosed(const capture_file *cf);
|
2012-01-04 22:13:01 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void updateRecentFiles();
|
2012-08-17 19:37:18 +00:00
|
|
|
void openRecentCaptureFile(QString& cfPath = *new QString());
|
2012-08-14 00:25:42 +00:00
|
|
|
void on_actionFileClose_triggered();
|
2012-01-04 22:13:01 +00:00
|
|
|
void recentActionTriggered();
|
2012-08-20 04:34:23 +00:00
|
|
|
void on_actionGoGoToPacket_triggered();
|
2012-08-20 21:22:01 +00:00
|
|
|
void resetPreviousFocus();
|
|
|
|
|
2012-07-25 11:53:44 +00:00
|
|
|
void on_actionHelpWebsite_triggered();
|
|
|
|
void on_actionHelpFAQ_triggered();
|
|
|
|
void on_actionHelpAsk_triggered();
|
|
|
|
void on_actionHelpDownloads_triggered();
|
|
|
|
void on_actionHelpWiki_triggered();
|
|
|
|
void on_actionHelpSampleCaptures_triggered();
|
2012-08-20 04:34:23 +00:00
|
|
|
void on_goToCancel_clicked();
|
|
|
|
void on_goToGo_clicked();
|
|
|
|
void on_goToLineEdit_returnPressed();
|
2012-01-04 22:13:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|