|
3 | 3 | #include "OpenRGBDevicePage.h" |
4 | 4 | #include "OpenRGBDeviceInfoPage.h" |
5 | 5 | #include "OpenRGBServerInfoPage.h" |
| 6 | +#include "OpenRGBConsolePage.h" |
6 | 7 | #include "OpenRGBPluginContainer.h" |
7 | 8 | #include "OpenRGBProfileSaveDialog.h" |
8 | 9 | #include "ResourceManager.h" |
@@ -474,7 +475,13 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op |
474 | 475 | if(ShowI2CTools) |
475 | 476 | { |
476 | 477 | AddI2CToolsPage(); |
477 | | - } |
| 478 | + } |
| 479 | + |
| 480 | + /*-----------------------------------------------------*\ |
| 481 | + | Add the console page | |
| 482 | + \*-----------------------------------------------------*/ |
| 483 | + AddConsolePage(); |
| 484 | + |
478 | 485 | } |
479 | 486 |
|
480 | 487 | OpenRGBDialog2::~OpenRGBDialog2() |
@@ -1679,3 +1686,28 @@ void Ui::OpenRGBDialog2::TogglePluginsVisibility(int tab_idx, QTabWidget* tabBar |
1679 | 1686 | ((OpenRGBPluginContainer*) tab)->Show(); |
1680 | 1687 | } |
1681 | 1688 | } |
| 1689 | + |
| 1690 | +void Ui::OpenRGBDialog2::AddConsolePage() |
| 1691 | +{ |
| 1692 | + OpenRGBConsolePage* page = new OpenRGBConsolePage(); |
| 1693 | + |
| 1694 | + ui->InformationTabBar->addTab(page, ""); |
| 1695 | + |
| 1696 | + QString SoftwareLabelString; |
| 1697 | + |
| 1698 | + if(IsDarkTheme()) |
| 1699 | + { |
| 1700 | + SoftwareLabelString = "console_dark.png"; |
| 1701 | + } |
| 1702 | + else |
| 1703 | + { |
| 1704 | + SoftwareLabelString = "console.png"; |
| 1705 | + } |
| 1706 | + |
| 1707 | + /*-----------------------------------------------------*\ |
| 1708 | + | Create the tab label | |
| 1709 | + \*-----------------------------------------------------*/ |
| 1710 | + TabLabel* SoftwareTabLabel = new TabLabel(SoftwareLabelString, "Console"); |
| 1711 | + |
| 1712 | + ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SoftwareTabLabel); |
| 1713 | +} |
0 commit comments