25 lines
802 B
C++
25 lines
802 B
C++
#pragma once
|
|
#include "Pgsql_declare.h"
|
|
#include <QAbstractTableModel>
|
|
#include <QColor>
|
|
|
|
int GetDefaultAlignmentForType(Oid oid);
|
|
QColor GetDefaultColorForType(Oid oid);
|
|
|
|
inline int GetDefaultAlignment() { return Qt::AlignLeft + Qt::AlignVCenter; }
|
|
inline int GetDefaultBoolAlignment() { return Qt::AlignCenter + Qt::AlignVCenter; }
|
|
inline int GetDefaultNumberAlignment() { return Qt::AlignRight + Qt::AlignVCenter; }
|
|
|
|
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; }
|
|
|
|
QString FormatBoolForDisplay(bool v);
|
|
|
|
class QTableView;
|
|
void SetTableViewDefault(QTableView *tv);
|