#include "ResultTableModelUtil.h" #include #include using namespace Pgsql; Qt::Alignment GetDefaultAlignmentForType(Oid o) { Qt::Alignment r; switch (o) { case int2_oid: case int4_oid: case int8_oid: case float4_oid: case float8_oid: case numeric_oid: case oid_oid: r = GetDefaultNumberAlignment(); break; case bool_oid: r = GetDefaultBoolAlignment(); // Qt::AlignCenter; break; default: r = GetDefaultAlignment(); } return r; } QString FormatBoolForDisplay(bool v) { static QString t(QChar(0x2713)); static QString f(QChar(0x2717)); return v ? t : f; } // // // // Source Sans Pro // 10 // // // // QAbstractItemView::NoEditTriggers // // // QAbstractItemView::ScrollPerPixel // // // QAbstractItemView::ScrollPerPixel // // // false // // // 20 // // // 16 // // void SetTableViewDefault(QTableView *tv) { tv->setAlternatingRowColors(true); tv->verticalHeader()->setMinimumSectionSize(16); tv->verticalHeader()->setDefaultSectionSize(20); }