1 /* packet_comment_dialog.cpp
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #include "packet_comment_dialog.h"
11 #include <ui_packet_comment_dialog.h>
13 #include "main_application.h"
15 PacketCommentDialog::PacketCommentDialog(bool isEdit
, QWidget
*parent
, QString comment
) :
16 GeometryStateDialog(parent
),
17 pc_ui_(new Ui::PacketCommentDialog
)
20 QString title
= isEdit
21 ? tr("Edit Packet Comment")
22 : tr("Add Packet Comment");
24 pc_ui_
->setupUi(this);
26 setWindowTitle(mainApp
->windowTitleString(title
));
28 pc_ui_
->commentTextEdit
->setPlainText(comment
);
31 PacketCommentDialog::~PacketCommentDialog()
36 QString
PacketCommentDialog::text()
38 return pc_ui_
->commentTextEdit
->toPlainText();
41 void PacketCommentDialog::on_buttonBox_helpRequested()
43 // mainApp->helpTopicAction(HELP_PACKET_COMMENT_DIALOG);