| 41 | LogsWidget::~LogsWidget() = default; |
| 42 | |
| 43 | void LogsWidget::createUI() |
| 44 | { |
| 45 | searchWidget = new QWidget(this); |
| 46 | searchWidget->setVisible(false); |
| 47 | |
| 48 | prevButton = new ClickableLabel("<"); |
| 49 | prevButton->setCursor( Qt::PointingHandCursor ); |
| 50 | |
| 51 | nextButton = new ClickableLabel(">"); |
| 52 | nextButton->setCursor( Qt::PointingHandCursor ); |
| 53 | |
| 54 | searchLabel = new QLabel("0 of 0"); |
| 55 | searchLineEdit = new QLineEdit(); |
| 56 | searchLineEdit->setPlaceholderText("Find"); |
| 57 | searchLineEdit->setMaximumWidth(300); |
| 58 | |
| 59 | hideButton = new ClickableLabel("X"); |
| 60 | hideButton->setCursor( Qt::PointingHandCursor ); |
| 61 | |
| 62 | spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); |
| 63 | |
| 64 | searchLayout = new QHBoxLayout(searchWidget); |
| 65 | searchLayout->setContentsMargins(0, 3, 0, 0); |
| 66 | searchLayout->setSpacing(4); |
| 67 | searchLayout->addWidget(prevButton); |
| 68 | searchLayout->addWidget(nextButton); |
| 69 | searchLayout->addWidget(searchLabel); |
| 70 | searchLayout->addWidget(searchLineEdit); |
| 71 | searchLayout->addWidget(hideButton); |
| 72 | searchLayout->addSpacerItem(spacer); |
| 73 | |
| 74 | logsConsoleTextEdit = new TextEditConsole(this); |
| 75 | logsConsoleTextEdit->setReadOnly(true); |
| 76 | logsConsoleTextEdit->setStyleSheet("background-color: #151515; color: #BEBEBE; border: 1px solid #2A2A2A; border-radius: 4px;"); |
| 77 | logsConsoleTextEdit->setAutoScrollEnabled(true); |
| 78 | |
| 79 | logsGridLayout = new QGridLayout(this); |
| 80 | logsGridLayout->setContentsMargins(1, 1, 1, 1); |
| 81 | logsGridLayout->setVerticalSpacing(1); |
| 82 | logsGridLayout->addWidget( searchWidget, 0, 0, 1, 1); |
| 83 | logsGridLayout->addWidget( logsConsoleTextEdit, 1, 0, 1, 1); |
| 84 | |
| 85 | logsWidget = new QWidget(this); |
| 86 | logsWidget->setLayout(logsGridLayout); |
| 87 | |
| 88 | /// ToDo: todo list + sync chat |
| 89 | // todoLabel = new QLabel(this); |
| 90 | // todoLabel->setText("ToDo notes"); |
| 91 | // todoLabel->setAlignment(Qt::AlignCenter); |
| 92 | // |
| 93 | // todoGridLayout = new QGridLayout(this); |
| 94 | // todoGridLayout->setContentsMargins(1, 1, 1, 1); |
| 95 | // todoGridLayout->setVerticalSpacing(1); |
| 96 | // todoGridLayout->setHorizontalSpacing(2); |
| 97 | // |
| 98 | // todoGridLayout->addWidget(todoLabel, 0, 0, 1, 1); |
| 99 | // |
| 100 | // todoWidget = new QWidget(this); |
no test coverage detected