#ifndef __KTABBAR_H__
#define __KTABBAR_H__
#define private protected
#include <qtabbar.h>
#undef private
struct QTabPrivate;
#include <kapp.h>
#include <qdrawutl.h>
#include <qtabbar.h>
#include <qbutton.h>
#define JUMP 30
/**
* KTabButton is a helper class for KTabBar. It provides the buttons used to scroll
* the tab bar.
* @short KTabButton
* @author Thomas Tanghus <tanghus@earthling.net>
* @version 0.1
*/
class KTabButton : public QButton
{
Q_OBJECT
public:
KTabButton( QWidget * parent = 0, const char * name = 0 );
~KTabButton();
enum Direction { Left, Right };
void setDirection( Direction d) { direct = d; };
Direction direction( ) { return direct; };
protected:
virtual void drawButton(QPainter *);
Direction direct;
};
class KTabBar: public QTabBar
{
Q_OBJECT
public:
KTabBar( QWidget * parent = 0, const char * name = 0 );
~KTabBar();
void setCurrentTab( int );
void setCurrentTab( QTab * );
signals:
void scrolled(KTabButton::Direction);
protected:
virtual void paint( QPainter *, QTab *, bool ) const;
virtual QTab * selectTab( const QPoint & p ) const;
KTabButton *left, *right;
bool leftscroll, rightscroll;
};
#endif // __KTABBAR_H__
Documentation generated by tanghus@tang1 on Sun Feb 15 18:07:12 CET 1998