00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#ifndef __K_TABZOOM_WIDGET_H__
00013
#define __K_TABZOOM_WIDGET_H__
00014
00015
#include <qwidget.h>
00016
00017
00018
class KConfig;
00019
00020
00021
#include "ktabzoomposition.h"
00022
00023
00024
#include "ktabzoombar.h"
00025
00026
00027
class KTabZoomWidgetPrivate;
00028
00029 class KTabZoomWidget :
public QWidget
00030 {
00031 Q_OBJECT
00032
00033
public:
00034
00035
KTabZoomWidget(
QWidget *parent=0, KTabZoomPosition::Position pos=KTabZoomPosition::Left,
const char *name=0);
00036
~KTabZoomWidget();
00037
00038
void addTab(
QWidget *widget,
const QString &tab,
const QString &toolTip = QString::null);
00039 void addTab(
const QPixmap& ,
QWidget *widget,
const QString& tab,
const QString& toolTip) { addTab(widget, tab, toolTip); }
00040
void removeTab(
QWidget *widget);
00041
00042
void addContent(
QWidget *widget);
00043
00044
void raiseWidget(
QWidget *widget);
00045
void lowerWidget(
QWidget *widget);
00046
00047
void lowerAllWidgets();
00048
00049
void saveSettings(
KConfig *config);
00050
void loadSettings(
KConfig *config);
00051
00052
bool isRaised() const;
00053
bool isDocked() const;
00054
bool hasFocus() const;
00055
bool isEmpty() const;
00056
00057 uint count() const;
00058
int indexOf(
QWidget *widget) const;
00059
00060
QWidget *at(
int i) const;
00061
QWidget *current() const;
00062
00063 signals:
00064
00065
void tabsChanged();
00066
00067 public slots:
00068
00069
void setDockMode(
bool docked);
00070
void setFocus();
00071
00072 private slots:
00073
00074
void selected(
int index);
00075
void unselected();
00076
00077
void widgetDeleted();
00078
00079
void adjustStrut();
00080
00081
00082 protected:
00083
00084 virtual
void resizeEvent(
QResizeEvent *ev);
00085
00086
00087 private:
00088
00089
void calculateGeometry();
00090
00091 KTabZoomWidgetPrivate *d;
00092
00093 };
00094
00095
00096 #endif