[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2010-01-04 23:38:02
Message-ID: 1262648282.245410.3073.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1070138 by staniek:

Table View
*fix coordinate for painting focus frame, this also makes more elegant fix compared \
to the yesterdays patch



 M  +4 -0      doc/dev/CHANGELOG-Kexi-js  
 M  +8 -5      widget/tableview/kexitableview.cpp  
 M  +2 -2      widget/tableview/kexitableview.h  


--- trunk/koffice/kexi/doc/dev/CHANGELOG-Kexi-js #1070137:1070138
@@ -58,6 +58,10 @@
 
 ~~~~~~~~~~~~~~~~ 2.2 alpha 1 ~~~~~~~~~~~~~~~~
 
+2010-01-04
+Table View
+*fix coordinate for painting, this also makes more elegant fix compared to the \
yesterdays patch +
 2010-01-02..03
 Tests
 *make kexidbtest create kexi-compliant databases (i.e. using KexiProject class)
--- trunk/koffice/kexi/widget/tableview/kexitableview.cpp #1070137:1070138
@@ -282,7 +282,7 @@
     m_verticalHeader->setCurrentRow(-1);
     connect(m_verticalHeader, SIGNAL(rowPressed(uint)), this, \
                SLOT(moveToRecordRequested(uint)));
     connect(m_verticalHeader, SIGNAL(rowHighlighted(int)), this, \
                SLOT(setHighlightedRow(int)));
-    connect(this, SIGNAL(contentsMoving(int,int)), this, \
SLOT(slotContentsMoving(int,int))); +/* not needed after #2010-01-05 fix    \
connect(this, SIGNAL(contentsMoving(int,int)), this, \
SLOT(slotContentsMoving(int,int)));*/  
     setMargins(
         qMin(m_horizontalHeader->sizeHint().height(), d->rowHeight),
@@ -621,7 +621,9 @@
         if (colp == -1)
             continue; //invisible column?
         int colw = columnWidth(c);
-        int translx = colp - cx + contentsX();
+//        kDebug() << "c:" << c << "colp:" << colp << "cx:" << cx << "contentsX():" \
<< contentsX() << "colw:" << colw; +//(js #2010-01-05) breaks rendering:       int \
translx = colp - cx + contentsX(); +        int translx = colp;
 
         // Translate painter and draw the cell
         const QTransform oldTr( pb->worldTransform() );
@@ -781,7 +783,7 @@
 
 void KexiTableView::paintCell(QPainter* p, KexiDB::RecordData *record, int col, int \
row, const QRect &cr, bool print)  {
-//kDebug() << "col/row:" << col << row << "rect:" << cr;
+kDebug() << "col/row:" << col << row << "rect:" << cr << p->worldMatrix();
     p->save();
     Q_UNUSED(print);
     int w = cr.width();
@@ -821,7 +823,7 @@
     QString txt; //text to draw
 
     if (record == m_insertItem) {
-        kDebug() << "we're at INSERT row...";
+        //kDebug() << "we're at INSERT row...";
     }
 
     KexiTableViewColumn *tvcol = m_data->column(col);
@@ -2636,11 +2638,12 @@
     return rowAt(contentsY());
 }
 
+/* not needed after #2010-01-05 fix
 void KexiTableView::slotContentsMoving(int x, int y)
 {
     Q_UNUSED(x);
     Q_UNUSED(y);
     updateContents(); // (js) needed in Qt 4, no idea why, this fix consumed me \
                hours
-}
+}*/
 
 #include "kexitableview.moc"
--- trunk/koffice/kexi/widget/tableview/kexitableview.h #1070137:1070138
@@ -3,7 +3,7 @@
    Copyright (C) 2003 Lucijan Busch <lucijan@gmx.at>
    Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
    Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
-   Copyright (C) 2003-2007 Jarosław Staniek <staniek@kde.org>
+   Copyright (C) 2003-2010 Jarosław Staniek <staniek@kde.org>
 
    This program is free software; you can redistribute it and,or
    modify it under the terms of the GNU Library General Public
@@ -507,7 +507,7 @@
     virtual void addNewRecordRequested() {
         KexiDataAwareObjectInterface::addNewRecordRequested();
     }
-    void slotContentsMoving(int x, int y);
+/* not needed after #2010-01-05 fix    void slotContentsMoving(int x, int y);*/
 protected:
     /*! Reimplementation for KexiDataAwareObjectInterface
      Initializes data contents (resizes it, sets cursor at 1st row).


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic