Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / src / konqframestatusbar.h
blob69086afc39c1e876fd68d7d27fdd47e0fadc0f7a
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
23 #include <KStatusBar>
24 class QLabel;
25 class QProgressBar;
26 class QCheckBox;
27 class KonqView;
28 class KSqueezedTextLabel;
29 class KonqFrame;
30 namespace KParts { class ReadOnlyPart; }
33 /**
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
39 Q_OBJECT
41 public:
42 explicit KonqFrameStatusBar( KonqFrame *_parent = 0 );
43 virtual ~KonqFrameStatusBar();
45 /**
46 * Checks/unchecks the linked-view checkbox
48 void setLinkedView( bool b );
49 /**
50 * Shows/hides the active-view indicator
52 void showActiveViewIndicator( bool b );
53 /**
54 * Shows/hides the linked-view indicator
56 void showLinkedViewIndicator( bool b );
57 /**
58 * Updates the active-view indicator and the statusbar color.
60 void updateActiveStatus();
62 public Q_SLOTS:
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);
68 void slotClear();
69 void message ( const QString & message );
71 Q_SIGNALS:
72 /**
73 * This signal is emitted when the user clicked the bar.
75 void clicked();
77 /**
78 * The "linked view" checkbox was clicked
80 void linkedViewClicked( bool mode );
82 protected:
83 virtual bool eventFilter(QObject*,QEvent *);
84 virtual void mousePressEvent( QMouseEvent* );
85 /**
86 * Brings up the context menu for this frame
88 virtual void splitFrameMenu();
90 /**
91 * Takes care of the statusbars size
92 **/
93 virtual void fontChange(const QFont &oldFont);
95 private:
96 KonqFrame* m_pParentKonqFrame;
97 QCheckBox *m_pLinkedViewCheckBox;
98 QProgressBar *m_progressBar;
99 KSqueezedTextLabel *m_pStatusLabel;
100 QLabel* m_led;
101 QString m_savedMessage;
104 #endif /* KONQ_FRAMESTATUSBAR_H */