Skip to content

Commit

Permalink
iioexplorer: Modify layout to match new design
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei-Fabian-Pop <[email protected]>
  • Loading branch information
Andrei-Fabian-Pop committed Sep 4, 2024
1 parent a4aff37 commit e81e678
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
10 changes: 7 additions & 3 deletions plugins/debugger/src/iioexplorer/detailsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@ void DetailsView::setupUi()

m_tabWidget->addTab(m_guiView, "GUI View");
m_tabWidget->addTab(m_iioView, "IIO View");
m_tabWidget->tabBar()->setDocumentMode(true);
m_tabWidget->tabBar()->setExpanding(true);
QTabBar *tabBar = m_tabWidget->tabBar();
tabBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);

StyleHelper::TabWidgetBarUnderline(m_tabWidget, "DetailsTabWidget");
StyleHelper::RefreshButton(m_readBtn, "RefreshCurrentSelectionButton");
m_readBtn->setProperty("blue_button", true);
m_readBtn->setIcon(QIcon(":/gui/icons/refresh.svg"));
m_readBtn->setIconSize(QSize(25, 25));
m_readBtn->setText("Refresh");
m_readBtn->setMinimumHeight(35);
m_addToWatchlistBtn->setStyleSheet("QPushButton { background-color: transparent; border: 0px; }");

m_titleContainer->layout()->addWidget(m_titleLabel);
Expand Down
17 changes: 6 additions & 11 deletions plugins/debugger/src/iioexplorer/iioexplorerinstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ void IIOExplorerInstrument::setupUi()
m_tabWidget->setCurrentIndex(0);
m_tabWidget->setTabPosition(QTabWidget::South);

auto *search_bar_container = new QWidget(this);
auto *bottom_container = new QWidget(this);
auto *tree_view_container = new QWidget(bottom_container);
auto *right_container = new QWidget(bottom_container);
auto *details_container = new QWidget(right_container);
auto *watch_list = new QWidget(right_container);
QWidget *bottom_container = new QWidget(this);
QWidget *tree_view_container = new QWidget(bottom_container);
QWidget *right_container = new QWidget(bottom_container);
QWidget *details_container = new QWidget(right_container);
QWidget *watch_list = new QWidget(right_container);
m_VSplitter = new QSplitter(Qt::Vertical, this);
m_HSplitter = new QSplitter(Qt::Horizontal, this);

Expand All @@ -74,8 +73,6 @@ void IIOExplorerInstrument::setupUi()
details_container->setLayout(new QVBoxLayout(details_container));
watch_list->setLayout(new QVBoxLayout(watch_list));
tree_view_container->setLayout(new QVBoxLayout(tree_view_container));
search_bar_container->setLayout(new QHBoxLayout(search_bar_container));
search_bar_container->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);

m_proxyModel = new IIOSortFilterProxyModel(this);
m_treeView = new QTreeView(bottom_container);
Expand All @@ -98,7 +95,6 @@ void IIOExplorerInstrument::setupUi()
StyleHelper::BackgroundPage(details_container, "DetailsContainer");
StyleHelper::BackgroundPage(watch_list, "WatchListContainer");
StyleHelper::BackgroundPage(tree_view_container, "TreeViewContainer");
StyleHelper::BackgroundPage(search_bar_container, "SearchBarContainer");
StyleHelper::SplitterStyle(m_HSplitter, "HorizontalSplitter");
StyleHelper::SplitterStyle(m_VSplitter, "VerticalSplitter");
StyleHelper::TreeViewDebugger(m_treeView, "TreeView");
Expand All @@ -113,10 +109,9 @@ void IIOExplorerInstrument::setupUi()
m_detailsView->setIIOStandardItem(m_currentlySelectedItem);

details_container->layout()->addWidget(m_detailsView);
tree_view_container->layout()->addWidget(m_searchBar);
tree_view_container->layout()->addWidget(m_treeView);
search_bar_container->layout()->addWidget(m_searchBar);

m_mainWidget->layout()->addWidget(search_bar_container);
m_mainWidget->layout()->addWidget(bottom_container);
m_HSplitter->addWidget(tree_view_container);
m_HSplitter->addWidget(right_container);
Expand Down

0 comments on commit e81e678

Please sign in to comment.