From: <nn...@us...> - 2008-01-19 19:42:04
|
Revision: 2455 http://tora.svn.sourceforge.net/tora/?rev=2455&view=rev Author: nneul Date: 2008-01-19 11:41:42 -0800 (Sat, 19 Jan 2008) Log Message: ----------- vertical text alignment in table cells, if the cast is unwanted, find some other way to make this work Modified Paths: -------------- branches/tora-1.4/tora/src/toresultmodel.cpp branches/tora-1.4/tora/src/toresultmodel.h Modified: branches/tora-1.4/tora/src/toresultmodel.cpp =================================================================== --- branches/tora-1.4/tora/src/toresultmodel.cpp 2008-01-19 18:45:10 UTC (rev 2454) +++ branches/tora-1.4/tora/src/toresultmodel.cpp 2008-01-19 19:41:42 UTC (rev 2455) @@ -268,7 +268,7 @@ return QVariant(); } if(role == Qt::TextAlignmentRole) - return Headers.at(index.column()).align; + return (int) Headers.at(index.column()).align; return QVariant(); } @@ -377,9 +377,9 @@ d.nullAllowed = (*i).Null; if((*i).AlignRight) - d.align = Qt::AlignRight; + d.align = Qt::AlignRight | Qt::AlignVCenter; else - d.align = Qt::AlignLeft; + d.align = Qt::AlignLeft | Qt::AlignVCenter; Headers.append(d); } Modified: branches/tora-1.4/tora/src/toresultmodel.h =================================================================== --- branches/tora-1.4/tora/src/toresultmodel.h 2008-01-19 18:45:10 UTC (rev 2454) +++ branches/tora-1.4/tora/src/toresultmodel.h 2008-01-19 19:41:42 UTC (rev 2455) @@ -62,7 +62,7 @@ QString name; /* column name */ QString datatype; /* data type from queryDescribe */ bool nullAllowed; /* data can be null */ - Qt::AlignmentFlag align; /* alignment */ + Qt::Alignment align; /* alignment */ }; typedef QList<toQValue> Row; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |