Fix comment end after SPDX identifier
[metze/wireshark/wip.git] / ui / qt / time_shift_dialog.h
1 /* time_shift_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9
10 #ifndef TIME_SHIFT_DIALOG_H
11 #define TIME_SHIFT_DIALOG_H
12
13 #include <config.h>
14
15 #include <glib.h>
16
17 #include "cfile.h"
18
19 #include <ui/qt/widgets/syntax_line_edit.h>
20
21 #include <QDialog>
22 #include <QPushButton>
23
24 namespace Ui {
25 class TimeShiftDialog;
26 }
27
28 class TimeShiftDialog : public QDialog
29 {
30     Q_OBJECT
31
32 public:
33     explicit TimeShiftDialog(QWidget *parent = 0, capture_file *cf = NULL);
34     ~TimeShiftDialog();
35
36 public slots:
37     void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
38
39 signals:
40     void timeShifted();
41
42 private:
43     Ui::TimeShiftDialog *ts_ui_;
44     capture_file *cap_file_;
45     QPushButton *apply_button_;
46     QString syntax_err_;
47
48     void enableWidgets();
49     void checkFrameNumber(SyntaxLineEdit &frame_le);
50     void checkDateTime(SyntaxLineEdit &time_le);
51
52 private slots:
53     void on_shiftAllButton_toggled(bool checked);
54     void on_setOneButton_toggled(bool checked);
55     void on_unshiftAllButton_toggled(bool checked);
56     void on_setTwoCheckBox_toggled(bool checked);
57     void on_shiftAllTimeLineEdit_textChanged(const QString &sa_text);
58     void on_setOneTimeLineEdit_textChanged(const QString &so_text);
59     void on_setOneFrameLineEdit_textChanged(const QString &frame_text);
60     void on_setTwoFrameLineEdit_textChanged(const QString &frame_text);
61     void on_setTwoTimeLineEdit_textChanged(const QString &st_text);
62     void applyTimeShift();
63     void on_buttonBox_helpRequested();
64 };
65
66 #endif // TIME_SHIFT_DIALOG_H