2017-12-09 10:45:13 +01:00
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "Pgsql_declare.h"
|
|
|
|
|
|
#include <QAbstractTableModel>
|
|
|
|
|
|
#include <QColor>
|
|
|
|
|
|
|
2018-01-15 13:32:18 +01:00
|
|
|
|
Qt::Alignment GetDefaultAlignmentForType(Oid oid);
|
2017-12-09 10:45:13 +01:00
|
|
|
|
QColor GetDefaultColorForType(Oid oid);
|
|
|
|
|
|
|
2019-01-06 21:37:57 +01:00
|
|
|
|
inline Qt::Alignment GetDefaultAlignment() { return Qt::AlignLeft | Qt::AlignVCenter; }
|
|
|
|
|
|
inline Qt::Alignment GetDefaultBoolAlignment() { return Qt::AlignCenter | Qt::AlignVCenter; }
|
|
|
|
|
|
inline Qt::Alignment GetDefaultNumberAlignment() { return Qt::AlignRight | Qt::AlignVCenter; }
|
2017-12-09 10:45:13 +01:00
|
|
|
|
|
|
|
|
|
|
inline QColor GetDefaultBoolColor(bool v)
|
|
|
|
|
|
{
|
|
|
|
|
|
return v ? Qt::darkGreen : Qt::darkRed;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline QColor GetDefaultIntegerColor() { return Qt::darkBlue; }
|
|
|
|
|
|
inline QColor GetDefaultFloatColor() { return Qt::darkCyan; }
|
|
|
|
|
|
inline QColor GetDefaultNumericColor() { return Qt::darkGreen; }
|
2018-01-15 13:32:18 +01:00
|
|
|
|
inline QColor GetDefaultNullColor() { return Qt::gray; }
|
2017-12-09 10:45:13 +01:00
|
|
|
|
|
|
|
|
|
|
QString FormatBoolForDisplay(bool v);
|
|
|
|
|
|
|
2017-12-12 20:13:53 +01:00
|
|
|
|
class QTableView;
|
|
|
|
|
|
void SetTableViewDefault(QTableView *tv);
|