statusbar.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2001 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef _STATUSBAR_H_ 00013 #define _STATUSBAR_H_ 00014 00015 #include <kstatusbar.h> 00016 #include <qmap.h> 00017 00018 class QLabel; 00019 00020 namespace KTextEditor { class ViewStatusMsgInterface; } 00021 namespace KTextEditor { class ViewCursorInterface; } 00022 namespace KParts { class Part; } 00023 00024 class KDevStatusBar : public KStatusBar 00025 { 00026 Q_OBJECT 00027 00028 public: 00029 KDevStatusBar( QWidget *parent=0, const char *name=0 ); 00030 ~KDevStatusBar(); 00031 void addWidget ( QWidget *widget, int stretch = 0, bool permanent = FALSE ); 00032 00033 private slots: 00034 void cursorPositionChanged(); 00035 void activePartChanged(KParts::Part *part); 00036 void setStatus(const QString &str); 00037 void setCursorPosition(int line, int col); 00038 00039 private: 00040 QLabel *_status; 00041 00042 KTextEditor::ViewCursorInterface * _cursorIface; 00043 KTextEditor::ViewStatusMsgInterface * _viewmsgIface; 00044 KParts::Part *_activePart; 00045 00046 }; 00047 00048 #endif