2 * This file is part of the KDE Help Center
4 * Copyright (C) 2002 Frerich Raabe <raabe@kde.org>
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, MA 02110-1301, USA.
26 #include <Qt3Support/Q3PtrList>
29 class KActionCollection
;
31 class KToolBarPopupAction
;
38 class History
: public QObject
42 friend class foo
; // to make gcc shut up
45 Entry() : view( 0 ), search( false ) {}
54 static History
&self();
56 void setupActions( KActionCollection
*coll
);
59 void installMenuBarHook( KXmlGuiWindow
*mainWindow
);
62 void updateCurrentEntry( KHC::View
*view
);
65 void goInternalUrl( const KUrl
& );
66 void goUrl( const KUrl
& );
69 void backActivated( int id
);
71 void forwardActivated( int id
);
72 void fillForwardMenu();
73 void goMenuActivated( int id
);
77 void goHistoryActivated( int steps
);
78 void goHistory( int steps
);
79 void goHistoryDelayed();
83 History( const History
&rhs
);
84 History
&operator=( const History
&rhs
);
87 bool canGoBack() const;
88 bool canGoForward() const;
89 void fillHistoryPopup( QMenu
*, bool, bool, bool, uint
= 0 );
91 static History
*m_instance
;
93 Q3PtrList
<Entry
> m_entries
;
98 int m_goMenuHistoryStartPos
;
99 int m_goMenuHistoryCurrentPos
;
101 KToolBarPopupAction
*m_backAction
;
102 KToolBarPopupAction
*m_forwardAction
;