| 274 | } |
| 275 | |
| 276 | void QuickRefactorDialog::createActionButtons() |
| 277 | { |
| 278 | Utils::Icon REPEAT_ICON( |
| 279 | {{":/resources/images/repeat-last-instruct-icon.png", Utils::Theme::IconsBaseColor}}); |
| 280 | Utils::Icon IMPROVE_ICON( |
| 281 | {{":/resources/images/improve-current-code-icon.png", Utils::Theme::IconsBaseColor}}); |
| 282 | Utils::Icon ALTER_ICON( |
| 283 | {{":/resources/images/suggest-new-icon.png", Utils::Theme::IconsBaseColor}}); |
| 284 | m_repeatButton = new QToolButton(this); |
| 285 | m_repeatButton->setIcon(REPEAT_ICON.icon()); |
| 286 | m_repeatButton->setToolTip(Tr::tr("Repeat Last Instructions")); |
| 287 | m_repeatButton->setEnabled(!m_lastInstructions.isEmpty()); |
| 288 | connect(m_repeatButton, &QToolButton::clicked, this, &QuickRefactorDialog::useLastInstructions); |
| 289 | |
| 290 | m_improveButton = new QToolButton(this); |
| 291 | m_improveButton->setIcon(IMPROVE_ICON.icon()); |
| 292 | m_improveButton->setToolTip(Tr::tr("Improve Current Code")); |
| 293 | connect( |
| 294 | m_improveButton, &QToolButton::clicked, this, &QuickRefactorDialog::useImproveCodeTemplate); |
| 295 | |
| 296 | m_alternativeButton = new QToolButton(this); |
| 297 | m_alternativeButton->setIcon(ALTER_ICON.icon()); |
| 298 | m_alternativeButton->setToolTip(Tr::tr("Suggest Alternative Solution")); |
| 299 | connect( |
| 300 | m_alternativeButton, |
| 301 | &QToolButton::clicked, |
| 302 | this, |
| 303 | &QuickRefactorDialog::useAlternativeSolutionTemplate); |
| 304 | } |
| 305 | |
| 306 | QString QuickRefactorDialog::instructions() const |
| 307 | { |