1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #include "historydisplaywidget.h" |
6 | #include "historylogwidget.h" |
7 | #include "historydiffwidget.h" |
8 | |
9 | #include <QTextBrowser> |
10 | |
11 | HistoryDisplayWidget::HistoryDisplayWidget(QWidget *parent) |
12 | : QSplitter (parent) |
13 | , hisLogWidget (new HistoryLogWidget) |
14 | , hisDiffWidget (new HistoryDiffWidget) |
15 | { |
16 | hisLogWidget->setMinimumWidth(300); |
17 | hisDiffWidget->setMinimumWidth(300); |
18 | setOrientation(Qt::Horizontal); |
19 | setHandleWidth(2); |
20 | addWidget(hisLogWidget); |
21 | setCollapsible(0, false); |
22 | addWidget(hisDiffWidget); |
23 | setCollapsible(1, false); |
24 | } |
25 | |
26 | HistoryLogWidget *HistoryDisplayWidget::logWidget() |
27 | { |
28 | return hisLogWidget; |
29 | } |
30 | |
31 | HistoryDiffWidget *HistoryDisplayWidget::diffWidget() |
32 | { |
33 | return hisDiffWidget; |
34 | } |
35 |