| 49 | } |
| 50 | |
| 51 | void GitTabWidgetPrivate::initUI() |
| 52 | { |
| 53 | QHBoxLayout *tabLayout = new QHBoxLayout; |
| 54 | tabLayout->setContentsMargins(0, 0, 0, 0); |
| 55 | |
| 56 | tabBar = new DTabBar(q); |
| 57 | tabBar->setVisibleAddButton(false); |
| 58 | tabBar->setTabsClosable(true); |
| 59 | tabBar->setEnabledEmbedStyle(true); |
| 60 | |
| 61 | closeBtn = new DToolButton(q); |
| 62 | closeBtn->setIcon(QIcon::fromTheme("edit-closeBtn")); |
| 63 | |
| 64 | stackedWidget = new QStackedWidget(q); |
| 65 | stackedWidget->setContentsMargins(0, 0, 0, 0); |
| 66 | |
| 67 | tabLayout->addWidget(tabBar, 1); |
| 68 | tabLayout->addWidget(closeBtn); |
| 69 | |
| 70 | QVBoxLayout *mainLayout = new QVBoxLayout(q); |
| 71 | mainLayout->setContentsMargins(0, 0, 0, 0); |
| 72 | |
| 73 | mainLayout->addLayout(tabLayout); |
| 74 | mainLayout->addWidget(stackedWidget); |
| 75 | } |
| 76 | |
| 77 | void GitTabWidgetPrivate::initConnection() |
| 78 | { |
no test coverage detected