| 229 | } |
| 230 | |
| 231 | DialogAgent::DialogAgent(AdaptixWidget* adaptixWidget, const QString &listenerName, const QString &listenerType) |
| 232 | { |
| 233 | this->adaptixWidget = adaptixWidget; |
| 234 | this->createUI(); |
| 235 | |
| 236 | this->listenerName = listenerName; |
| 237 | this->listenerType = listenerType; |
| 238 | |
| 239 | connect(cardWidget, &QListWidget::itemPressed, this, &DialogAgent::onProfileSelected); |
| 240 | connect(cardWidget, &QListWidget::customContextMenuRequested, this, &DialogAgent::handleProfileContextMenu); |
| 241 | connect(agentCombobox, &QComboBox::currentTextChanged, this, &DialogAgent::changeConfig); |
| 242 | connect(buildButton, &QPushButton::clicked, this, &DialogAgent::onButtonBuild); |
| 243 | connect(buttonNewProfile, &QPushButton::clicked, this, &DialogAgent::onButtonNewProfile); |
| 244 | connect(buttonLoad, &QPushButton::clicked, this, &DialogAgent::onButtonLoad); |
| 245 | connect(buttonSave, &QPushButton::clicked, this, &DialogAgent::onButtonSave); |
| 246 | connect(inputProfileName, &QLineEdit::textEdited, this, &DialogAgent::onProfileNameEdited); |
| 247 | connect(actionSaveProfile, &QAction::toggled, this, &DialogAgent::onSaveProfileToggled); |
| 248 | connect(listenerListWidget, &QListWidget::itemChanged, this, &DialogAgent::onListenerSelectionChanged); |
| 249 | connect(btnMoveUp, &QPushButton::clicked, this, &DialogAgent::onMoveListenerUp); |
| 250 | connect(btnMoveDown, &QPushButton::clicked, this, &DialogAgent::onMoveListenerDown); |
| 251 | connect(listenerSelectBtn, &QPushButton::clicked, this, &DialogAgent::showListenerPopup); |
| 252 | |
| 253 | this->listenerInput->setText(listenerName); |
| 254 | } |
| 255 | |
| 256 | DialogAgent::~DialogAgent() |
| 257 | { |