revert a bit of stuff that wasn't supposed to be committed in the first

place

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=848389
This commit is contained in:
Marco Martin 2008-08-17 15:34:46 +00:00
parent c0c3d98b67
commit 3a008feb23
2 changed files with 0 additions and 40 deletions

View File

@ -29,8 +29,6 @@
#include <KDebug>
#include <plasma/animator.h>
#include <plasma/panelsvg.h>
#include <plasma/theme.h>
#include "private/nativetabbar_p.h"
@ -55,13 +53,11 @@ public:
{
}
void syncBorders();
void slidingCompleted(QGraphicsItem *item);
void shapeChanged(const QTabBar::Shape shape);
TabBar *q;
NativeTabBar *tabBar;
PanelSvg *background;
QList<QGraphicsWidget *> pages;
QGraphicsLinearLayout *mainLayout;
QGraphicsLinearLayout *tabBarLayout;
@ -73,15 +69,6 @@ public:
int newPageAnimId;
};
void TabBarPrivate::syncBorders()
{
//set margins from the normal element
qreal left, top, right, bottom;
background->getMargins(left, top, right, bottom);
q->setContentsMargins(left, top, right, bottom);
}
void TabBarPrivate::slidingCompleted(QGraphicsItem *item)
{
@ -145,13 +132,6 @@ TabBar::TabBar(QGraphicsWidget *parent)
d->tabBarLayout->addItem(tabProxy);
d->tabBarLayout->addStretch();
//background painting stuff
d->background = new Plasma::PanelSvg(this);
d->background->setImagePath("widgets/frame");
d->background->setElementPrefix("sunken");
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(syncBorders()));
connect(d->tabBar, SIGNAL(currentChanged(int)), this, SLOT(setCurrentIndex(int)));
connect(d->tabBar, SIGNAL(shapeChanged(QTabBar::Shape)), this, SLOT(shapeChanged(QTabBar::Shape)));
connect(Plasma::Animator::self(), SIGNAL(movementFinished(QGraphicsItem*)), this, SLOT(slidingCompleted(QGraphicsItem*)));
@ -336,21 +316,6 @@ QTabBar *TabBar::nativeWidget() const
return d->tabBar;
}
void TabBar::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_UNUSED(option)
Q_UNUSED(widget)
d->background->paintPanel(painter, QPoint(contentsRect().left(), contentsRect().top() + nativeWidget()->height()/1.5));
}
void TabBar::resizeEvent(QGraphicsSceneResizeEvent *event)
{
d->background->resizePanel(event->newSize() - QSize(0, nativeWidget()->height()/2));
}
void TabBar::wheelEvent(QGraphicsSceneWheelEvent * event)
{
//FIXME: probably this would make more sense in NativeTabBar, but it works only here

View File

@ -187,16 +187,11 @@ Q_SIGNALS:
void currentChanged(int index);
protected:
void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget);
void resizeEvent(QGraphicsSceneResizeEvent *event);
void wheelEvent(QGraphicsSceneWheelEvent *event);
private:
TabBarPrivate * const d;
Q_PRIVATE_SLOT(d, void syncBorders())
Q_PRIVATE_SLOT(d, void slidingCompleted(QGraphicsItem *item))
Q_PRIVATE_SLOT(d, void shapeChanged(const QTabBar::Shape shape))
};