[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/tableview
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2004-08-23 21:39:44
Message-ID: 20040823213944.8CC7A2322 () office ! kde ! org
[Download RAW message or body]
CVS commit by staniek:
Table View
- fixed methods for 'visible' flag in KexiTableViewColumn
M +2 -0 kexicomboboxpopup.cpp 1.9
M +13 -1 kexitableview.cpp 1.162
M +3 -2 kexitableviewdata.h 1.25
--- koffice/kexi/tableview/kexicomboboxpopup.cpp #1.8:1.9
@@ -148,8 +148,10 @@ void KexiComboBoxPopup::setDataInternal(
void KexiComboBoxPopup::updateSize()
{
+ d->tv->setColumnStretchEnabled( true, -1 );
// d->tv->adjustColumnWidthToContents( -1 ); //TODO: not only for column 0, if \
there are more columns! // //TODO: \
check if the width is not too big d->tv->adjustHorizontalHeaderSize();
// d->tv->adjustColumnWidthToContents( 0 ); //TODO: not only for column 0, if \
there are more columns! +// d->tv->adjustColumnWidthToContents( 0 ); //TODO: not \
only for column 0, if there are more columns! // \
//TODO: check if the width is not too big const int rows = QMIN( d->max_rows, \
d->tv->rows() );
--- koffice/kexi/tableview/kexitableview.cpp #1.161:1.162
@@ -494,5 +494,6 @@ void KexiTableView::setData( KexiTableVi
{
KexiDB::Field *f = it.current()->field();
- if (!it.current()->fieldinfo || \
it.current()->fieldinfo->visible) { +// if \
(!it.current()->fieldinfo || it.current()->fieldinfo->visible) { + \
if (it.current()->visible()) { int wid = f->width();
if (wid==0)
@@ -1267,4 +1268,15 @@ void KexiTableView::drawContents( QPaint
collast = columns() - 1;
+ if (colfirst>collast) {
+ int tmp = colfirst;
+ colfirst = collast;
+ collast = tmp;
+ }
+ if (rowfirst>rowlast) {
+ int tmp = rowfirst;
+ rowfirst = rowlast;
+ rowlast = tmp;
+ }
+
// qDebug("cx:%3d cy:%3d w:%3d h:%3d col:%2d..%2d row:%2d..%2d tsize:%4d,%4d",
// cx, cy, cw, ch, colfirst, collast, rowfirst, rowlast, tableSize().width(), \
tableSize().height());
--- koffice/kexi/tableview/kexitableviewdata.h #1.24:1.25
@@ -87,8 +87,9 @@ class KEXIDATATABLE_EXPORT KexiTableView
//! Column visibility. By default column is visible.
- bool visible() const { return m_visible; }
+ bool visible() const { return fieldinfo ? fieldinfo->visible : \
m_visible; }
//! Changes column visibility.
- void setVisible(bool v) { m_visible=v; }
+ void setVisible(bool v) { if (fieldinfo) fieldinfo->visible=v;
+ m_visible=v; }
//! returns whatever is available: field's caption or field's alias \
(from query)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic