| 61 | } |
| 62 | |
| 63 | void AxConsoleWidget::createUI() |
| 64 | { |
| 65 | searchWidget = new QWidget(this); |
| 66 | |
| 67 | prevButton = new ClickableLabel("<"); |
| 68 | prevButton->setCursor( Qt::PointingHandCursor ); |
| 69 | |
| 70 | nextButton = new ClickableLabel(">"); |
| 71 | nextButton->setCursor( Qt::PointingHandCursor ); |
| 72 | |
| 73 | searchLabel = new QLabel("0 of 0"); |
| 74 | searchLineEdit = new QLineEdit(); |
| 75 | searchLineEdit->setPlaceholderText("Find"); |
| 76 | searchLineEdit->setMaximumWidth(300); |
| 77 | |
| 78 | hideButton = new ClickableLabel("X"); |
| 79 | hideButton->setCursor( Qt::PointingHandCursor ); |
| 80 | |
| 81 | spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); |
| 82 | |
| 83 | searchLayout = new QHBoxLayout(searchWidget); |
| 84 | searchLayout->setContentsMargins(0, 3, 0, 0); |
| 85 | searchLayout->setSpacing(4); |
| 86 | searchLayout->addWidget(prevButton); |
| 87 | searchLayout->addWidget(nextButton); |
| 88 | searchLayout->addWidget(searchLabel); |
| 89 | searchLayout->addWidget(searchLineEdit); |
| 90 | searchLayout->addWidget(hideButton); |
| 91 | searchLayout->addSpacerItem(spacer); |
| 92 | |
| 93 | OutputTextEdit = new TextEditConsole(this, 50000, true, true); |
| 94 | OutputTextEdit->setReadOnly(true); |
| 95 | OutputTextEdit->setStyleSheet("background-color: #151515; color: #BEBEBE; border: 1px solid #2A2A2A; border-radius: 4px;"); |
| 96 | OutputTextEdit->setFont( FontManager::instance().getFont("Hack") ); |
| 97 | |
| 98 | CmdLabel = new QLabel( "ax >", this ); |
| 99 | CmdLabel->setStyleSheet("padding: 4px; color: #BEBEBE; background-color: transparent;"); |
| 100 | |
| 101 | InputLineEdit = new QLineEdit(this); |
| 102 | InputLineEdit->setStyleSheet("background-color: #151515; color: #BEBEBE; border: 1px solid #2A2A2A; padding: 4px; border-radius: 4px;"); |
| 103 | InputLineEdit->setFont( FontManager::instance().getFont("Hack") ); |
| 104 | |
| 105 | ResetButton = new QPushButton("Reset AxScript"); |
| 106 | |
| 107 | MainGridLayout = new QGridLayout(this ); |
| 108 | MainGridLayout->setVerticalSpacing(4 ); |
| 109 | MainGridLayout->setContentsMargins(0, 1, 0, 4 ); |
| 110 | MainGridLayout->addWidget( searchWidget, 0, 0, 1, 3 ); |
| 111 | MainGridLayout->addWidget( OutputTextEdit, 1, 0, 1, 3 ); |
| 112 | MainGridLayout->addWidget( CmdLabel, 2, 0, 1, 1 ); |
| 113 | MainGridLayout->addWidget( InputLineEdit, 2, 1, 1, 1 ); |
| 114 | MainGridLayout->addWidget( ResetButton, 2, 2, 1, 1 ); |
| 115 | |
| 116 | searchWidget->setVisible(false); |
| 117 | } |
| 118 | |
| 119 | void AxConsoleWidget::findAndHighlightAll(const QString &pattern) |
| 120 | { |
no test coverage detected