kexi

kexistatusbar.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This program is free software; you can redistribute it and,or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 
00019    Loosely based on kdevelop/src/statusbar.h
00020    Copyright (C) 2001 by Bernd Gehrmann <bernd@kdevelop.org>
00021 */
00022 
00023 #ifndef KEXISTATUSBAR_H
00024 #define KEXISTATUSBAR_H
00025 
00026 //temporary
00027 #define KexiStatusBar_KTEXTEDITOR_USED 0
00028 
00029 #include <kdeversion.h>
00030 #include <kstatusbar.h>
00031 #include <qmap.h>
00032 
00033 class QLabel;
00034 
00035 #if KexiStatusBar_KTEXTEDITOR_USED
00036 namespace KTextEditor { class ViewStatusMsgInterface; }
00037 namespace KTextEditor { class ViewCursorInterface; }
00038 #endif
00039 namespace KParts { class Part; }
00040 
00041 class KexiStatusBar : public KStatusBar
00042 {
00043     Q_OBJECT
00044     public:
00045         KexiStatusBar( QWidget *parent=0, const char *name=0 );
00046         virtual ~KexiStatusBar();
00047 //      virtual void addWidget( QWidget *widget, int stretch = 0, bool permanent = false);
00048 
00049     public slots:
00050         virtual void setStatus(const QString &str);
00051         virtual void setReadOnlyFlag(bool readOnly);
00052 
00053     protected slots:
00054         virtual void cursorPositionChanged();
00055         virtual void activePartChanged(KParts::Part *part);
00056         virtual void setCursorPosition(int line, int col);
00057 
00058     protected:
00059         int m_msgID, m_readOnlyID;
00060 //      QLabel *m_status, *m_readOnlyStatus;
00061 
00062 #if KexiStatusBar_KTEXTEDITOR_USED
00063     KTextEditor::ViewCursorInterface * m_cursorIface;
00064     KTextEditor::ViewStatusMsgInterface * m_viewmsgIface;
00065 #endif
00066     KParts::Part *m_activePart;
00067 
00068 // still hoping for a fix for KDE-3.1
00069 #if defined(KDE_MAKE_VERSION)
00070 # if KDE_VERSION < KDE_MAKE_VERSION(3,1,90)
00071     QMap<KParts::Part*, QString> m_map;
00072 # endif
00073 #endif
00074 };
00075 
00076 #endif
00077 
KDE Home | KDE Accessibility Home | Description of Access Keys