1 /* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Michael Reiher <michael.reiher@gmx.de>
3 Copyright 2007 David Faure <faure@kde.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef KONQ_FRAMESTATUSBAR_H
21 #define KONQ_FRAMESTATUSBAR_H
28 class KSqueezedTextLabel
;
30 namespace KParts
{ class ReadOnlyPart
; }
34 * The KonqFrameStatusBar is the statusbar under each konqueror view.
35 * It indicates in particular whether a view is active or not.
37 class KonqFrameStatusBar
: public KStatusBar
42 explicit KonqFrameStatusBar( KonqFrame
*_parent
= 0 );
43 virtual ~KonqFrameStatusBar();
46 * Checks/unchecks the linked-view checkbox
48 void setLinkedView( bool b
);
50 * Shows/hides the active-view indicator
52 void showActiveViewIndicator( bool b
);
54 * Shows/hides the linked-view indicator
56 void showLinkedViewIndicator( bool b
);
58 * Updates the active-view indicator and the statusbar color.
60 void updateActiveStatus();
63 void slotConnectToNewView(KonqView
*, KParts::ReadOnlyPart
*oldOne
,KParts::ReadOnlyPart
*newOne
);
64 void slotLoadingProgress( int percent
);
65 void slotSpeedProgress( int bytesPerSecond
);
66 void slotDisplayStatusText(const QString
& text
);
69 void message ( const QString
& message
);
73 * This signal is emitted when the user clicked the bar.
78 * The "linked view" checkbox was clicked
80 void linkedViewClicked( bool mode
);
83 virtual bool eventFilter(QObject
*,QEvent
*);
84 virtual void mousePressEvent( QMouseEvent
* );
86 * Brings up the context menu for this frame
88 virtual void splitFrameMenu();
91 * Takes care of the statusbars size
93 virtual void fontChange(const QFont
&oldFont
);
96 KonqFrame
* m_pParentKonqFrame
;
97 QCheckBox
*m_pLinkedViewCheckBox
;
98 QProgressBar
*m_progressBar
;
99 KSqueezedTextLabel
*m_pStatusLabel
;
101 QString m_savedMessage
;
104 #endif /* KONQ_FRAMESTATUSBAR_H */