MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / createUI

Method createUI

AdaptixClient/Source/UI/Dialogs/DialogAgent.cpp:13–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <QWidgetAction>
12
13void DialogAgent::createUI()
14{
15 this->setWindowTitle("Generate Agent");
16 this->setProperty("Main", "base");
17
18 listenerLabel = new QLabel("Listener:", this);
19 listenerInput = new QLineEdit(this);
20 listenerInput->setReadOnly(true);
21
22 listenerDisplayEdit = new QLineEdit(this);
23 listenerDisplayEdit->setReadOnly(true);
24 listenerDisplayEdit->setPlaceholderText("Click to select listeners...");
25
26 listenerSelectBtn = new QPushButton("...", this);
27 listenerSelectBtn->setToolTip("Select listeners");
28
29 listenerListWidget = new QListWidget();
30 listenerListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
31 listenerListWidget->setDragDropMode(QAbstractItemView::InternalMove);
32 listenerListWidget->setDefaultDropAction(Qt::MoveAction);
33 listenerListWidget->setMinimumWidth(250);
34 listenerListWidget->setMinimumHeight(150);
35
36 btnMoveUp = new QPushButton("↑");
37 btnMoveUp->setToolTip("Move selected listener up");
38 btnMoveDown = new QPushButton("↓");
39 btnMoveDown->setToolTip("Move selected listener down");
40
41 auto btnLayout = new QVBoxLayout();
42 btnLayout->setContentsMargins(0, 0, 0, 0);
43 btnLayout->setSpacing(4);
44 btnLayout->addWidget(btnMoveUp);
45 btnLayout->addWidget(btnMoveDown);
46 btnLayout->addStretch();
47
48 auto popupLayout = new QHBoxLayout();
49 popupLayout->setContentsMargins(8, 8, 8, 8);
50 popupLayout->setSpacing(4);
51 popupLayout->addWidget(listenerListWidget);
52 popupLayout->addLayout(btnLayout);
53
54 listenerPopupDialog = new QDialog(this, Qt::Popup | Qt::FramelessWindowHint);
55 listenerPopupDialog->setLayout(popupLayout);
56 listenerPopupDialog->setProperty("Main", "base");
57
58 listenerSelectionWidget = new QWidget(this);
59 auto listenerSelectionLayout = new QHBoxLayout(listenerSelectionWidget);
60 listenerSelectionLayout->setContentsMargins(0, 0, 0, 0);
61 listenerSelectionLayout->setSpacing(4);
62 listenerSelectionLayout->addWidget(listenerDisplayEdit);
63 listenerSelectionLayout->addWidget(listenerSelectBtn);
64 listenerSelectionWidget->setVisible(false);
65
66 agentLabel = new QLabel("Agent:", this);
67 agentCombobox = new QComboBox(this);
68
69 profileLabel = new QLabel("Profile:", this);
70

Callers 1

DialogAgentMethod · 0.95

Calls 15

setWindowTitleMethod · 0.80
setReadOnlyMethod · 0.80
setToolTipMethod · 0.80
setCheckableMethod · 0.80
setHorizontalSpacingMethod · 0.80
setFixedWidthMethod · 0.80
setFocusMethod · 0.80
setFocusPolicyMethod · 0.80
setFixedSizeMethod · 0.80
setVerticalSpacingMethod · 0.80
setFixedHeightMethod · 0.80
setCursorMethod · 0.80

Tested by

no test coverage detected