Files
ssp/pages/uihelpers.h
T

26 lines
765 B
C++
Raw Normal View History

2026-08-18 09:40:43 +08:00
#ifndef UIHELPERS_H
#define UIHELPERS_H
2026-11-05 14:14:29 +08:00
#include <QList>
2026-08-18 09:40:43 +08:00
#include <QStringList>
class QFrame;
class QLabel;
class QTableWidget;
namespace UiHelpers {
QFrame *makeCard(const QString &title);
QLabel *makeBadge(const QString &text, const QString &color);
QLabel *makeStatusCell(const QString &text, const QString &color);
QLabel *makeSquareStatusCell(const QString &text, const QString &color);
QTableWidget *makeTable(const QStringList &headers);
2026-11-05 14:14:29 +08:00
int textColumnWidth(const QTableWidget *table, const QString &text);
void configureTableColumns(QTableWidget *table, const QList<int> &baseWidths,
int cappedColumn = -1, int maximumSharePercent = 100);
2026-08-18 09:40:43 +08:00
void addRow(QTableWidget *table, const QStringList &values);
}
#endif // UIHELPERS_H