KDevelop API Documentation

ktabzoomwidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001-2003                                               *
00003  *   The KDevelop Team                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
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& /*pix*/, 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; //indicates whether widget has tabs
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   // emitted when a tab gets added / deleted
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
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:53 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003