1
/* This file is part of the KDE project
3
Copyright (C) 2002-2003 Konqueror Developers
4
2002-2003 Douglas Hanley <douglash@caltech.edu>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22
#ifndef __konq_tabs_h__
23
#define __konq_tabs_h__
25
#include "konq_frame.h"
27
#include <ktabwidget.h>
34
class KonqViewManager;
37
class KonqFrameContainerBase;
38
class KonqFrameContainer;
44
class KonqFrameTabs : public KTabWidget, public KonqFrameContainerBase
47
friend class KonqFrame; //for emitting ctrlTabPressed() only, aleXXX
50
KonqFrameTabs(QWidget* parent, KonqFrameContainerBase* parentContainer,
51
KonqViewManager* viewManager, const char * name = 0);
52
virtual ~KonqFrameTabs();
54
virtual void listViews( ChildViewList *viewList );
56
virtual void saveConfig( KConfig* config, const QString &prefix, bool saveURLs,
57
KonqFrameBase* docContainer, int id = 0, int depth = 0 );
58
virtual void copyHistory( KonqFrameBase *other );
60
virtual void printFrameInfo( const QString& spaces );
62
QPtrList<KonqFrameBase>* childFrameList() { return m_pChildFrameList; }
64
virtual void setTitle( const QString &title, QWidget* sender );
65
virtual void setTabIcon( const KURL &url, QWidget* sender );
67
virtual QWidget* widget() { return this; }
68
virtual QCString frameType() { return QCString("Tabs"); }
73
* Call this after inserting a new frame into the splitter.
75
void insertChildFrame( KonqFrameBase * frame, int index = -1);
78
* Call this before deleting one of our children.
80
void removeChildFrame( KonqFrameBase * frame );
83
virtual void reparentFrame(QWidget * parent,
84
const QPoint & p, bool showIt=FALSE );
86
void moveTabBackward(int index);
87
void moveTabForward(int index);
91
void slotCurrentChanged( QWidget* newPage );
92
void setAlwaysTabbedMode( bool );
95
void ctrlTabPressed();
96
void removeTabPopup();
99
void refreshSubPopupMenuTab();
102
QPtrList<KonqFrameBase>* m_pChildFrameList;
105
void slotContextMenu( const QPoint& );
106
void slotContextMenu( QWidget*, const QPoint& );
107
void slotCloseRequest( QWidget* );
108
void slotMovedTab( int, int );
109
void slotMouseMiddleClick();
110
void slotMouseMiddleClick( QWidget* );
112
void slotTestCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
113
void slotReceivedDropEvent( QDropEvent* );
114
void slotInitiateDrag( QWidget * );
115
void slotReceivedDropEvent( QWidget *, QDropEvent * );
116
void slotSubPopupMenuTabActivated( int );
119
KonqViewManager* m_pViewManager;
120
QPopupMenu* m_pPopupMenu;
121
QPopupMenu* m_pSubPopupMenuTab;
122
QToolButton* m_rightWidget;
123
QToolButton* m_leftWidget;
124
bool m_permanentCloseButtons;
126
bool m_MouseMiddleClickClosesTab;
127
int m_closeOtherTabsId;