Messy commit. Testing suff and some improvements to how data is shown.
This commit is contained in:
parent
bebb3391c3
commit
3a13b7ffb4
59 changed files with 2045 additions and 716 deletions
23
pglab/ResultTableModelUtil.h
Normal file
23
pglab/ResultTableModelUtil.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#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);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue