2012-10-18 21:14:43 +00:00
|
|
|
/* export_object_dialog.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2012-10-18 21:14:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EXPORT_OBJECT_DIALOG_H
|
|
|
|
#define EXPORT_OBJECT_DIALOG_H
|
|
|
|
|
2015-04-26 17:21:09 +00:00
|
|
|
#include <config.h>
|
2012-10-18 21:14:43 +00:00
|
|
|
|
|
|
|
#include <file.h>
|
|
|
|
|
2017-12-26 16:46:48 +00:00
|
|
|
#include <ui/qt/models/export_objects_model.h>
|
|
|
|
#include <ui/qt/widgets/export_objects_view.h>
|
2012-10-18 21:14:43 +00:00
|
|
|
|
2014-12-29 22:12:43 +00:00
|
|
|
#include "wireshark_dialog.h"
|
|
|
|
|
2019-11-21 14:57:32 +00:00
|
|
|
#include <QKeyEvent>
|
|
|
|
|
2015-02-08 20:24:19 +00:00
|
|
|
class QTreeWidgetItem;
|
|
|
|
class QAbstractButton;
|
2012-10-18 21:14:43 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ExportObjectDialog;
|
|
|
|
}
|
|
|
|
|
2014-12-29 22:12:43 +00:00
|
|
|
class ExportObjectDialog : public WiresharkDialog
|
2012-10-18 21:14:43 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2012-10-18 21:14:43 +00:00
|
|
|
public:
|
2016-11-24 14:37:01 +00:00
|
|
|
explicit ExportObjectDialog(QWidget &parent, CaptureFile &cf, register_eo_t* eo);
|
2012-10-18 21:14:43 +00:00
|
|
|
~ExportObjectDialog();
|
|
|
|
|
2012-10-18 21:51:38 +00:00
|
|
|
public slots:
|
|
|
|
void show();
|
|
|
|
|
2019-11-21 14:57:32 +00:00
|
|
|
protected:
|
|
|
|
virtual void keyPressEvent(QKeyEvent *evt);
|
|
|
|
|
2012-10-18 21:14:43 +00:00
|
|
|
private slots:
|
|
|
|
void accept();
|
2018-03-28 08:04:50 +00:00
|
|
|
void captureEvent(CaptureEvent e);
|
2012-10-18 21:14:43 +00:00
|
|
|
void on_buttonBox_helpRequested();
|
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2019-11-21 14:57:32 +00:00
|
|
|
void on_cmbContentType_currentIndexChanged(int index);
|
2012-10-18 21:14:43 +00:00
|
|
|
|
2019-11-21 14:57:32 +00:00
|
|
|
void modelDataChanged(const QModelIndex &topLeft, int from, int to);
|
2017-12-26 16:46:48 +00:00
|
|
|
void modelRowsReset();
|
|
|
|
|
2019-11-21 14:57:32 +00:00
|
|
|
void currentHasChanged(QModelIndex current);
|
|
|
|
|
2012-10-18 21:14:43 +00:00
|
|
|
private:
|
2021-02-12 19:54:54 +00:00
|
|
|
bool mimeTypeIsPreviewable(QString mime_type);
|
2019-11-21 14:57:32 +00:00
|
|
|
void saveCurrentEntry(QString *tempFile = Q_NULLPTR);
|
2012-10-18 21:14:43 +00:00
|
|
|
void saveAllEntries();
|
|
|
|
|
|
|
|
Ui::ExportObjectDialog *eo_ui_;
|
|
|
|
|
|
|
|
QPushButton *save_bt_;
|
|
|
|
QPushButton *save_all_bt_;
|
2017-12-26 16:46:48 +00:00
|
|
|
ExportObjectModel model_;
|
|
|
|
ExportObjectProxyModel proxyModel_;
|
2019-11-21 14:57:32 +00:00
|
|
|
|
|
|
|
QStringList contentTypes;
|
|
|
|
|
|
|
|
void updateContentTypes();
|
2012-10-18 21:14:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EXPORT_OBJECT_DIALOG_H
|