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

List:       kde-commits
Subject:    koffice/kspread
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2003-12-31 14:40:36
Message-ID: 20031231144036.7503693EA () office ! kde ! org
[Download RAW message or body]

CVS commit by ariya: 

now the tabbar class is clean, documented, bug-free (AFAIK), and 
yet faster than before (there's still room for speed improvement though)

it's not tighted to kspread code anymore, making it a good candidate 
for koffice-wide UI widget


  M +4 -9      kspread_tabbar.cc   1.95
  M +1 -4      kspread_tabbar.h   1.42


--- koffice/kspread/kspread_tabbar.cc  #1.94:1.95
@@ -25,6 +25,4 @@
 #include "kspread_tabbar.h"
 
-#include "kspread_view.h"
-
 #include <qdrawutil.h>
 #include <qpainter.h>
@@ -42,6 +40,4 @@ class TabBarPrivate
 {
 public:
-    // the view and the tabbar
-    KSpreadView* view;
     TabBar* tabbar;
 
@@ -221,6 +217,6 @@ void TabBarPrivate::drawTab( QPainter& p
       rect.right()-10, rect.bottom()-1, rect.right(), rect.top() );
 
-    QColor bgcolor = view->colorGroup().background();
-    if( active ) bgcolor = view->colorGroup().base();
+    QColor bgcolor = tabbar->colorGroup().background();
+    if( active ) bgcolor = tabbar->colorGroup().base();
 
     painter.setClipping( true );
@@ -266,9 +262,8 @@ void TabBarPrivate::updateButtons()
 
 // creates a new tabbar
-TabBar::TabBar( KSpreadView *view, const char* name )
-    : QWidget( view, name, Qt::WResizeNoErase | Qt::WRepaintNoErase )
+TabBar::TabBar( QWidget* parent, const char* name )
+    : QWidget( parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase )
 {
     d = new TabBarPrivate;
-    d->view = view;
     d->tabbar = this;
     d->readOnly = false;

--- koffice/kspread/kspread_tabbar.h  #1.41:1.42
@@ -29,7 +29,4 @@
 #include <qstringlist.h>
 
-class KSpreadSheet;
-class KSpreadView;
-
 namespace KSpread
 {
@@ -57,5 +54,5 @@ public:
      * Creates a new tabbar.
      */
-    TabBar( KSpreadView *view, const char *name = 0 );
+    TabBar( QWidget* parent = 0, const char *name = 0 );
 
     /**


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

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