Skip to content

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.

style: run clang-format to fix indentation and trailing whitespace

Jayrajed089772c87a
diff --git a/fincept-qt/src/screens/dashboard/DashboardToolBar.cpp b/fincept-qt/src/screens/dashboard/DashboardToolBar.cpp
index 255d86cdd..81d3e29d0 100644
--- a/fincept-qt/src/screens/dashboard/DashboardToolBar.cpp
+++ b/fincept-qt/src/screens/dashboard/DashboardToolBar.cpp
@@ -64,7 +64,7 @@ DashboardToolBar::DashboardToolBar(QWidget* parent) : QWidget(parent) {
make_sep(ll);
- clock_btn_ = new QPushButton;
+ clock_btn_ = new QPushButton;
clock_btn_->setObjectName("dtBtn");
clock_btn_->setFlat(true);
clock_btn_->setCursor(Qt::PointingHandCursor);
@@ -189,7 +189,8 @@ void DashboardToolBar::refresh_theme() {
// Force child containers to re-evaluate their background after stylesheet change.
// Without this, Qt may repaint them with the default palette grey on show events.
auto repolish = [](QWidget* w) {
- if (!w) return;
+ if (!w)
+ return;
w->style()->unpolish(w);
w->style()->polish(w);
w->update();
@@ -209,13 +210,9 @@ void DashboardToolBar::showEvent(QShowEvent* event) {
void DashboardToolBar::update_clock() {
const QString suffix = clock_is_utc_ ? " UTC" : " LOC";
- const QDateTime now = clock_is_utc_ ? QDateTime::currentDateTimeUtc()
- : QDateTime::currentDateTime();
+ const QDateTime now = clock_is_utc_ ? QDateTime::currentDateTimeUtc() : QDateTime::currentDateTime();
clock_btn_->setText(now.toString("yyyy-MM-dd HH:mm:ss") + suffix);
}
-
-
-
void DashboardToolBar::set_widget_count(int count) {
widget_count_->setText(QString("%1 WIDGETS").arg(count));
diff --git a/fincept-qt/src/screens/excel/ExcelScreen.cpp b/fincept-qt/src/screens/excel/ExcelScreen.cpp
index 52f2a04f5..6d27bb271 100644
--- a/fincept-qt/src/screens/excel/ExcelScreen.cpp
+++ b/fincept-qt/src/screens/excel/ExcelScreen.cpp
@@ -17,7 +17,7 @@
#include <QVBoxLayout>
#ifdef FINCEPT_HAS_QXLSX
-#include <xlsxdocument.h>
+# include <xlsxdocument.h>
#endif
namespace fincept::screens {
@@ -111,7 +111,8 @@ void ExcelScreen::build_ui() {
QWidget* ExcelScreen::build_toolbar() {
auto* bar = new QWidget(this);
bar->setFixedHeight(40);
- bar->setStyleSheet(QString("background:%1; border-bottom:1px solid %2;").arg(colors::BORDER_MED(), colors::TEXT_DIM()));
+ bar->setStyleSheet(
+ QString("background:%1; border-bottom:1px solid %2;").arg(colors::BORDER_MED(), colors::TEXT_DIM()));
auto* hl = new QHBoxLayout(bar);
hl->setContentsMargins(12, 0, 12, 0);
@@ -127,12 +128,12 @@ QWidget* ExcelScreen::build_toolbar() {
auto make_btn = [&](const QString& text, const QString& tooltip = {}) -> QPushButton* {
auto* btn = new QPushButton(text, bar);
btn->setToolTip(tooltip);
- btn->setStyleSheet(
- QString("QPushButton { background:%3; color:%4; border:none;"
- " font-family:%1; font-size:10px; font-weight:600; padding:6px 12px; }"
- "QPushButton:hover { background:%5; }"
- "QPushButton:pressed { background:%2; }")
- .arg(fonts::DATA_FAMILY, kAccent(), colors::TEXT_DIM(), colors::TEXT_PRIMARY(), colors::TEXT_TERTIARY()));
+ btn->setStyleSheet(QString("QPushButton { background:%3; color:%4; border:none;"
+ " font-family:%1; font-size:10px; font-weight:600; padding:6px 12px; }"
+ "QPushButton:hover { background:%5; }"
+ "QPushButton:pressed { background:%2; }")
+ .arg(fonts::DATA_FAMILY, kAccent(), colors::TEXT_DIM(), colors::TEXT_PRIMARY(),
+ colors::TEXT_TERTIARY()));
return btn;
};
@@ -163,10 +164,11 @@ QWidget* ExcelScreen::build_toolbar() {
hl->addWidget(rename_btn);
auto* del_btn = make_btn("DELETE", "Delete current sheet");
- del_btn->setStyleSheet(QString("QPushButton { background:%2; color:%3; border:none;"
- " font-family:%1; font-size:10px; font-weight:600; padding:6px 12px; }"
- "QPushButton:hover { background:%4; }")
- .arg(fonts::DATA_FAMILY, colors::TEXT_DIM(), colors::TEXT_PRIMARY(), colors::NEGATIVE()));
+ del_btn->setStyleSheet(
+ QString("QPushButton { background:%2; color:%3; border:none;"
+ " font-family:%1; font-size:10px; font-weight:600; padding:6px 12px; }"
+ "QPushButton:hover { background:%4; }")
+ .arg(fonts::DATA_FAMILY, colors::TEXT_DIM(), colors::TEXT_PRIMARY(), colors::NEGATIVE()));
connect(del_btn, &QPushButton::clicked, this, &ExcelScreen::on_delete_sheet);
hl->addWidget(del_btn);
@@ -245,9 +247,9 @@ void ExcelScreen::on_import() {
services::FileManagerService::instance().import_file(path, "excel");
#else
QMessageBox::information(this, "Excel Import",
- "Excel (.xlsx) import requires Qt6 private headers.\n"
- "This build was compiled without QXlsx support.\n\n"
- "CSV files can still be imported via the toolbar.");
+ "Excel (.xlsx) import requires Qt6 private headers.\n"
+ "This build was compiled without QXlsx support.\n\n"
+ "CSV files can still be imported via the toolbar.");
#endif
}
@@ -312,9 +314,9 @@ void ExcelScreen::on_export() {
}
#else
QMessageBox::information(this, "Excel Export",
- "Excel (.xlsx) export requires Qt6 private headers.\n"
- "This build was compiled without QXlsx support.\n\n"
- "CSV export is still available via the toolbar.");
+ "Excel (.xlsx) export requires Qt6 private headers.\n"
+ "This build was compiled without QXlsx support.\n\n"
+ "CSV export is still available via the toolbar.");
#endif
}
@@ -335,9 +337,7 @@ void ExcelScreen::on_export_csv() {
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
QMessageBox::warning(this, "Export failed", "Could not open file for writing:\n" + path);
return;
-
}
-
QTextStream out(&file);
out.setEncoding(QStringConverter::Utf8);