update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / packet_comment_dialog.cpp
blobd9dfc7dd45197e546fb36b97adc5559cef23f7c5
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
8 */
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);
25 loadGeometry();
26 setWindowTitle(mainApp->windowTitleString(title));
28 pc_ui_->commentTextEdit->setPlainText(comment);
31 PacketCommentDialog::~PacketCommentDialog()
33 delete pc_ui_;
36 QString PacketCommentDialog::text()
38 return pc_ui_->commentTextEdit->toPlainText();
41 void PacketCommentDialog::on_buttonBox_helpRequested()
43 // mainApp->helpTopicAction(HELP_PACKET_COMMENT_DIALOG);