Couple of minor changes.
This commit is contained in:
parent
e1405d5370
commit
3fb32f1200
5 changed files with 28 additions and 28 deletions
|
|
@ -1,24 +1,25 @@
|
|||
#include "ResultTableModelUtil.h"
|
||||
#include "Pgsql_oids.h"
|
||||
#include <QTableView>
|
||||
#include <QHeaderView>
|
||||
|
||||
using namespace Pgsql;
|
||||
|
||||
int GetDefaultAlignmentForType(Oid o)
|
||||
Qt::Alignment GetDefaultAlignmentForType(Oid o)
|
||||
{
|
||||
|
||||
int r;
|
||||
switch (o) {
|
||||
case INT2OID:
|
||||
case INT4OID:
|
||||
case INT8OID:
|
||||
case FLOAT4OID:
|
||||
case FLOAT8OID:
|
||||
case NUMERICOID:
|
||||
case OIDOID:
|
||||
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 BOOLOID:
|
||||
case bool_oid:
|
||||
r = GetDefaultBoolAlignment(); // Qt::AlignCenter;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -31,21 +32,20 @@ QColor GetDefaultColorForType(Oid o)
|
|||
{
|
||||
QColor c;
|
||||
switch (o) {
|
||||
case INT2OID:
|
||||
case INT4OID:
|
||||
case INT8OID:
|
||||
case int2_oid:
|
||||
case int4_oid:
|
||||
case int8_oid:
|
||||
c = GetDefaultIntegerColor();
|
||||
break;
|
||||
case FLOAT4OID:
|
||||
case FLOAT8OID:
|
||||
case float4_oid:
|
||||
case float8_oid:
|
||||
c = GetDefaultFloatColor();
|
||||
break;
|
||||
case NUMERICOID:
|
||||
case numeric_oid:
|
||||
c = GetDefaultNumericColor();
|
||||
break;
|
||||
|
||||
case OIDOID:
|
||||
case BOOLOID:
|
||||
case oid_oid:
|
||||
case bool_oid:
|
||||
default:
|
||||
c = Qt::black;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue