FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
refactor: remove TabHeader and TabFooter, replace with inline header bars
tilakpatel225b4e702139de
diff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txtindex 5e33c98a0..2987212fe 100644--- a/fincept-qt/CMakeLists.txt+++ b/fincept-qt/CMakeLists.txt@@ -119,8 +119,6 @@ set(UI_SOURCESsrc/ui/widgets/StatusBadge.cppsrc/ui/widgets/SearchBar.cppsrc/ui/widgets/GeometricBackground.cpp- src/ui/widgets/TabHeader.cpp- src/ui/widgets/TabFooter.cppsrc/ui/tables/DataTable.cppsrc/ui/charts/ChartFactory.cppsrc/ui/navigation/NavigationBar.cppdiff --git a/fincept-qt/src/screens/about/AboutScreen.cpp b/fincept-qt/src/screens/about/AboutScreen.cppindex e3f0e6c29..bc0b9492b 100644--- a/fincept-qt/src/screens/about/AboutScreen.cpp+++ b/fincept-qt/src/screens/about/AboutScreen.cpp@@ -1,7 +1,5 @@#include "screens/about/AboutScreen.h"#include "ui/theme/Theme.h"-#include "ui/widgets/TabHeader.h"-#include "ui/widgets/TabFooter.h"#include <QVBoxLayout>#include <QHBoxLayout>#include <QGridLayout>@@ -89,11 +87,24 @@ AboutScreen::AboutScreen(QWidget* parent) : QWidget(parent) {root->setContentsMargins(0, 0, 0, 0);root->setSpacing(0);- // ── TabHeader ─────────────────────────────────────────────────────────────- auto* header = new ui::TabHeader(- "About & Legal Information",- "Version details, license terms, and contact information");- root->addWidget(header);+ // ── Header bar ───────────────────────────────────────────────────────────+ {+ auto* hdr = new QWidget;+ hdr->setFixedHeight(56);+ hdr->setStyleSheet("background: #1a1a1a; border-bottom: 2px solid #ea580c;");+ auto* hl = new QVBoxLayout(hdr);+ hl->setContentsMargins(16, 8, 16, 8);+ hl->setSpacing(4);+ auto* title = new QLabel("About & Legal Information");+ title->setStyleSheet("color: #ffffff; font-size: 16px; font-weight: bold;"+ " background: transparent; font-family: 'Consolas','Courier New',monospace;");+ auto* sub = new QLabel("Version details, license terms, and contact information");+ sub->setStyleSheet("color: #6b7280; font-size: 11px; background: transparent;"+ " font-family: 'Consolas','Courier New',monospace;");+ hl->addWidget(title);+ hl->addWidget(sub);+ root->addWidget(hdr);+ }// ── Scrollable content ────────────────────────────────────────────────────auto* scroll = new QScrollArea;@@ -351,10 +362,6 @@ AboutScreen::AboutScreen(QWidget* parent) : QWidget(parent) {scroll->setWidget(page);root->addWidget(scroll, 1);- // ── TabFooter ─────────────────────────────────────────────────────────────- auto* footer = new ui::TabFooter("About");- footer->set_status("AGPL-3.0-or-later | © 2024-2026 Fincept Corporation");- root->addWidget(footer);}} // namespace fincept::screensdiff --git a/fincept-qt/src/screens/support/SupportScreen.cpp b/fincept-qt/src/screens/support/SupportScreen.cppindex 7eca27cfa..ddfe903a7 100644--- a/fincept-qt/src/screens/support/SupportScreen.cpp+++ b/fincept-qt/src/screens/support/SupportScreen.cpp@@ -1,8 +1,6 @@#include "screens/support/SupportScreen.h"#include "auth/UserApi.h"#include "ui/theme/Theme.h"-#include "ui/widgets/TabHeader.h"-#include "ui/widgets/TabFooter.h"#include <QVBoxLayout>#include <QHBoxLayout>#include <QGridLayout>@@ -109,26 +107,37 @@ SupportScreen::SupportScreen(QWidget* parent) : QWidget(parent) {root->setContentsMargins(0, 0, 0, 0);root->setSpacing(0);- // ── TabHeader ─────────────────────────────────────────────────────────────- tab_header_ = new ui::TabHeader("Support Center");+ // ── Header bar ───────────────────────────────────────────────────────────{- // Stats in the header actions area- auto* al = tab_header_->actions_layout();- al->addWidget(mono_label("TICKETS:", ui::colors::TEXT_TERTIARY, 11));+ auto* hdr = new QWidget;+ hdr->setFixedHeight(44);+ hdr->setStyleSheet("background: #1a1a1a; border-bottom: 2px solid #ea580c;");+ auto* hl = new QHBoxLayout(hdr);+ hl->setContentsMargins(16, 8, 16, 8);+ hl->setSpacing(12);++ auto* title = new QLabel("Support Center");+ title->setStyleSheet("color: #ffffff; font-size: 16px; font-weight: bold;"+ " background: transparent; font-family: 'Consolas','Courier New',monospace;");+ hl->addWidget(title);+ hl->addStretch();++ hl->addWidget(mono_label("TICKETS:", ui::colors::TEXT_TERTIARY, 11));stat_total_ = mono_label("0", ui::colors::CYAN, 11, true);- al->addWidget(stat_total_);+ hl->addWidget(stat_total_);- al->addWidget(mono_label("|", ui::colors::TEXT_TERTIARY, 11));- al->addWidget(mono_label("OPEN:", ui::colors::TEXT_TERTIARY, 11));+ hl->addWidget(mono_label("|", ui::colors::TEXT_TERTIARY, 11));+ hl->addWidget(mono_label("OPEN:", ui::colors::TEXT_TERTIARY, 11));stat_open_ = mono_label("0", "#ca8a04", 11, true);- al->addWidget(stat_open_);+ hl->addWidget(stat_open_);- al->addWidget(mono_label("|", ui::colors::TEXT_TERTIARY, 11));- al->addWidget(mono_label("RESOLVED:", ui::colors::TEXT_TERTIARY, 11));+ hl->addWidget(mono_label("|", ui::colors::TEXT_TERTIARY, 11));+ hl->addWidget(mono_label("RESOLVED:", ui::colors::TEXT_TERTIARY, 11));stat_resolved_ = mono_label("0", ui::colors::POSITIVE, 11, true);- al->addWidget(stat_resolved_);+ hl->addWidget(stat_resolved_);++ root->addWidget(hdr);}- root->addWidget(tab_header_);// ── Toolbar ──────────────────────────────────────────────────────────────{@@ -180,15 +189,6 @@ SupportScreen::SupportScreen(QWidget* parent) : QWidget(parent) {pages_->addWidget(build_detail_page()); // 2root->addWidget(pages_, 1);- // ── TabFooter ─────────────────────────────────────────────────────────────- tab_footer_ = new ui::TabFooter("SUPPORT CENTER");- tab_footer_->set_left_info({- {"View", "LIST", "#6b7280"},- {"Tickets", "0", "#6b7280"},- });- tab_footer_->set_status(- "Response Time: < 24 hours | 24/7 Customer Service | READY");- root->addWidget(tab_footer_);load_tickets();}@@ -461,10 +461,6 @@ void SupportScreen::switch_to(int idx) {// Update footer view labelconst char* view_name = on_list ? "LIST" : on_create ? "CREATE" : "DETAILS";- tab_footer_->set_left_info({- {"View", view_name, "#6b7280"},- {"Tickets", stat_total_->text(), "#6b7280"},- });}// ── set_busy ──────────────────────────────────────────────────────────────────@@ -482,9 +478,6 @@ void SupportScreen::set_busy(bool busy) {send_btn_->setEnabled(!busy);// Update footer status- tab_footer_->set_status(- QString("Response Time: < 24 hours | 24/7 Customer Service | %1")- .arg(busy ? "UPDATING" : "READY"));}// ── load_tickets ──────────────────────────────────────────────────────────────diff --git a/fincept-qt/src/screens/support/SupportScreen.h b/fincept-qt/src/screens/support/SupportScreen.hindex b102eff03..a0eecbd2f 100644--- a/fincept-qt/src/screens/support/SupportScreen.h+++ b/fincept-qt/src/screens/support/SupportScreen.h@@ -8,8 +8,6 @@#include <QLabel>#include <QScrollArea>-namespace fincept::ui { class TabHeader; class TabFooter; }-namespace fincept::screens {/// Support ticket system — list / create / detail views matching Tauri UX.@@ -22,10 +20,6 @@ private:// ── Views ─────────────────────────────────────────────────────────────────QStackedWidget* pages_ = nullptr;- // Header / Footer- ui::TabHeader* tab_header_ = nullptr;- ui::TabFooter* tab_footer_ = nullptr;-// Header statsQLabel* stat_total_ = nullptr;QLabel* stat_open_ = nullptr;diff --git a/fincept-qt/src/ui/widgets/TabFooter.cpp b/fincept-qt/src/ui/widgets/TabFooter.cppdeleted file mode 100644index 907913521..000000000--- a/fincept-qt/src/ui/widgets/TabFooter.cpp+++ /dev/null@@ -1,107 +0,0 @@-#include "ui/widgets/TabFooter.h"-#include "ui/theme/Theme.h"--namespace fincept::ui {--static constexpr const char* APP_NAME = "Fincept Terminal";-static constexpr const char* APP_VERSION = "4.0.0";--static QLabel* separator() {- auto* s = new QLabel("|");- s->setStyleSheet(- "color: #6b7280; font-size: 11px; background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- return s;-}--TabFooter::TabFooter(const QString& tab_name, QWidget* parent)- : QWidget(parent)-{- setStyleSheet("background: #1a1a1a; border-top: 2px solid #ea580c;");- setFixedHeight(30);-- auto* root = new QHBoxLayout(this);- root->setContentsMargins(16, 4, 16, 4);- root->setSpacing(12);-- // Left: brand | tab name | info items- auto* left = new QHBoxLayout;- left->setSpacing(10);- left->setContentsMargins(0, 0, 0, 0);-- brand_label_ = new QLabel(QString("%1 v%2").arg(APP_NAME, APP_VERSION).toUpper());- brand_label_->setStyleSheet(- "color: #ea580c; font-size: 12px; font-weight: bold;"- " background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- left->addWidget(brand_label_);- left->addWidget(separator());-- tab_label_ = new QLabel(tab_name);- tab_label_->setStyleSheet(- "color: #06b6d4; font-size: 11px; font-weight: bold;"- " background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- left->addWidget(tab_label_);-- // Info items area (dynamically populated)- info_layout_ = new QHBoxLayout;- info_layout_->setSpacing(10);- info_layout_->setContentsMargins(0, 0, 0, 0);- left->addLayout(info_layout_);-- root->addLayout(left);- root->addStretch();-- // Right: status- status_label_ = new QLabel;- status_label_->setStyleSheet(- "color: #6b7280; font-size: 10px; background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- root->addWidget(status_label_);-}--void TabFooter::set_tab_name(const QString& name) {- tab_label_->setText(name);-}--void TabFooter::set_status(const QString& status_text) {- status_label_->setText(status_text);-}--void TabFooter::set_left_info(const QVector<FooterInfo>& items) {- rebuild_info(items);-}--void TabFooter::rebuild_info(const QVector<FooterInfo>& items) {- // Clear existing info items- while (info_layout_->count() > 0) {- auto* item = info_layout_->takeAt(0);- if (item->widget()) delete item->widget();- delete item;- }-- if (items.isEmpty()) return;-- info_layout_->addWidget(separator());-- for (int i = 0; i < items.size(); ++i) {- const auto& info = items[i];- QString color = info.color.isEmpty() ? "#ffffff" : info.color;- QString text = info.value.isEmpty()- ? info.label- : QString("%1: %2").arg(info.label, info.value);-- auto* lbl = new QLabel(text);- lbl->setStyleSheet(QString(- "color: %1; font-size: 11px; background: transparent;"- " font-family: 'Consolas','Courier New',monospace;")- .arg(color));- info_layout_->addWidget(lbl);-- if (i < items.size() - 1)- info_layout_->addWidget(separator());- }-}--} // namespace fincept::uidiff --git a/fincept-qt/src/ui/widgets/TabFooter.h b/fincept-qt/src/ui/widgets/TabFooter.hdeleted file mode 100644index 76d346bd0..000000000--- a/fincept-qt/src/ui/widgets/TabFooter.h+++ /dev/null@@ -1,37 +0,0 @@-#pragma once-#include <QWidget>-#include <QLabel>-#include <QHBoxLayout>-#include <QString>-#include <QVector>--namespace fincept::ui {--/// Info item displayed in the footer's left section.-struct FooterInfo {- QString label;- QString value; // optional — if empty, only label is shown- QString color; // optional — defaults to white-};--/// Reusable tab footer matching Tauri TabFooter.-/// Orange accent top border: "FINCEPT TERMINAL v4.0.0 | TAB_NAME | info…" left, status right.-class TabFooter : public QWidget {- Q_OBJECT-public:- explicit TabFooter(const QString& tab_name, QWidget* parent = nullptr);-- void set_tab_name(const QString& name);- void set_left_info(const QVector<FooterInfo>& items);- void set_status(const QString& status_text);--private:- QLabel* brand_label_ = nullptr;- QLabel* tab_label_ = nullptr;- QHBoxLayout* info_layout_ = nullptr;- QLabel* status_label_ = nullptr;-- void rebuild_info(const QVector<FooterInfo>& items);-};--} // namespace fincept::uidiff --git a/fincept-qt/src/ui/widgets/TabHeader.cpp b/fincept-qt/src/ui/widgets/TabHeader.cppdeleted file mode 100644index a619dd8a4..000000000--- a/fincept-qt/src/ui/widgets/TabHeader.cpp+++ /dev/null@@ -1,81 +0,0 @@-#include "ui/widgets/TabHeader.h"-#include "ui/theme/Theme.h"--namespace fincept::ui {--static constexpr const char* APP_NAME = "Fincept Terminal";-static constexpr const char* APP_VERSION = "4.0.0";--TabHeader::TabHeader(const QString& title, const QString& subtitle, QWidget* parent)- : QWidget(parent)-{- // Orange accent bottom border, dark raised background- setStyleSheet(QString(- "background: #1a1a1a;"- "border-bottom: 2px solid #ea580c;"));- setFixedHeight(subtitle.isEmpty() ? 44 : 56);-- auto* root = new QHBoxLayout(this);- root->setContentsMargins(16, 8, 16, 8);- root->setSpacing(16);-- // Left: title column- auto* left = new QVBoxLayout;- left->setSpacing(4);- left->setContentsMargins(0, 0, 0, 0);-- // Title row: "Title | Fincept Terminal v4.0.0"- auto* title_row = new QHBoxLayout;- title_row->setSpacing(8);- title_row->setContentsMargins(0, 0, 0, 0);-- title_label_ = new QLabel(title);- title_label_->setStyleSheet(- "color: #ffffff; font-size: 16px; font-weight: bold;"- " background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- title_row->addWidget(title_label_);-- auto* sep = new QLabel("|");- sep->setStyleSheet(- "color: #6b7280; font-size: 12px; background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- title_row->addWidget(sep);-- version_label_ = new QLabel(QString("%1 v%2").arg(APP_NAME, APP_VERSION));- version_label_->setStyleSheet(- "color: #ea580c; font-size: 11px; font-weight: bold;"- " background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- title_row->addWidget(version_label_);-- title_row->addStretch();- left->addLayout(title_row);-- // Subtitle (optional)- subtitle_label_ = new QLabel(subtitle);- subtitle_label_->setStyleSheet(- "color: #6b7280; font-size: 11px; background: transparent;"- " font-family: 'Consolas','Courier New',monospace;");- subtitle_label_->setVisible(!subtitle.isEmpty());- left->addWidget(subtitle_label_);-- root->addLayout(left, 1);-- // Right: actions area- actions_layout_ = new QHBoxLayout;- actions_layout_->setSpacing(8);- actions_layout_->setContentsMargins(0, 0, 0, 0);- root->addLayout(actions_layout_);-}--void TabHeader::set_title(const QString& title) {- title_label_->setText(title);-}--void TabHeader::set_subtitle(const QString& subtitle) {- subtitle_label_->setText(subtitle);- subtitle_label_->setVisible(!subtitle.isEmpty());-}--} // namespace fincept::uidiff --git a/fincept-qt/src/ui/widgets/TabHeader.h b/fincept-qt/src/ui/widgets/TabHeader.hdeleted file mode 100644index e985641c9..000000000--- a/fincept-qt/src/ui/widgets/TabHeader.h+++ /dev/null@@ -1,31 +0,0 @@-#pragma once-#include <QWidget>-#include <QLabel>-#include <QHBoxLayout>-#include <QVBoxLayout>--namespace fincept::ui {--/// Reusable tab header matching Tauri TabHeader.-/// Orange accent bottom border, title | version, subtitle, optional right-side actions.-class TabHeader : public QWidget {- Q_OBJECT-public:- explicit TabHeader(const QString& title,- const QString& subtitle = {},- QWidget* parent = nullptr);-- void set_title(const QString& title);- void set_subtitle(const QString& subtitle);-- /// Layout on the right side — add buttons/labels to it.- QHBoxLayout* actions_layout() const { return actions_layout_; }--private:- QLabel* title_label_ = nullptr;- QLabel* version_label_ = nullptr;- QLabel* subtitle_label_ = nullptr;- QHBoxLayout* actions_layout_ = nullptr;-};--} // namespace fincept::ui