akregator/src

tabwidget.h

00001 /*
00002     This file is part of Akregator.
00003 
00004     Copyright (C) 2004 Sashmit Bhaduri <smt@vfemail.net>
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019 
00020     As a special exception, permission is given to link this program
00021     with any edition of Qt, and distribute the resulting executable,
00022     without including the source code for Qt in the source distribution.
00023 */
00024 
00025 #ifndef TABWIDGET_H
00026 #define TABWIDGET_H
00027 
00028 #include <ktabwidget.h>
00029 
00030 class QString;
00031 
00032 namespace Akregator
00033 {
00034 
00035 class Frame;
00036 
00037 class TabWidget : public KTabWidget
00038 {
00039     Q_OBJECT
00040 
00041     public:
00042         TabWidget(QWidget * parent = 0, const char *name = 0);
00043         virtual ~TabWidget();
00044 
00045         void addFrame(Frame *f);
00046         Frame* currentFrame();
00047         void removeFrame(Frame *f);
00048 
00049     public slots:
00050 
00051         void slotSetTitle(Frame* frame, const QString& title);
00052         void slotSettingsChanged();
00053         void slotNextTab();
00054         void slotPreviousTab();
00055         void slotRemoveCurrentFrame();
00056 
00057     signals:
00058         
00059         void currentFrameChanged(Frame *);
00060         
00061     protected slots:
00062 
00063         virtual void initiateDrag(int tab);
00064         
00065     private: // methods
00066         
00067         uint tabBarWidthForMaxChars( uint maxLength );
00068         void setTitle( const QString &title , QWidget* sender);
00069 
00070 
00071     private slots:
00072         
00073         void slotDetachTab();
00074         void slotCopyLinkAddress();
00075         void slotCloseTab();
00076         void slotCloseRequest(QWidget* widget);
00077         void contextMenu (int item, const QPoint &p);
00078         void slotTabChanged(QWidget *w);
00079         
00080    private:
00081 
00082        class TabWidgetPrivate;
00083        TabWidgetPrivate* d;
00084 };
00085 
00086 }
00087 
00088 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys