kexi

kexistatusbar.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and,or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18
19 Loosely based on tdevelop/src/statusbar.h
20 Copyright (C) 2001 by Bernd Gehrmann <bernd@kdevelop.org>
21*/
22
23#ifndef KEXISTATUSBAR_H
24#define KEXISTATUSBAR_H
25
26//temporary
27#define KexitStatusBar_KTEXTEDITOR_USED 0
28
29#include <tdeversion.h>
30#include <kstatusbar.h>
31#include <tqmap.h>
32
33class TQLabel;
34
35#if KexitStatusBar_KTEXTEDITOR_USED
36namespace KTextEditor { class ViewStatusMsgInterface; }
37namespace KTextEditor { class ViewCursorInterface; }
38#endif
39namespace KParts { class Part; }
40
41class KexitStatusBar : public KStatusBar
42{
43 TQ_OBJECT
44
45 public:
46 KexitStatusBar( TQWidget *parent=0, const char *name=0 );
47 virtual ~KexitStatusBar();
48// virtual void addWidget( TQWidget *widget, int stretch = 0, bool permanent = false);
49
50 public slots:
51 virtual void setStatus(const TQString &str);
52 virtual void setReadOnlyFlag(bool readOnly);
53
54 protected slots:
55 virtual void cursorPositionChanged();
56 virtual void activePartChanged(KParts::Part *part);
57 virtual void setCursorPosition(int line, int col);
58
59 protected:
60 int m_msgID, m_readOnlyID;
61// TQLabel *m_status, *m_readOnlyStatus;
62
63#if KexitStatusBar_KTEXTEDITOR_USED
64 KTextEditor::ViewCursorInterface * m_cursorIface;
65 KTextEditor::ViewStatusMsgInterface * m_viewmsgIface;
66#endif
67 KParts::Part *m_activePart;
68
69// still hoping for a fix for KDE-3.1
70#if defined(TDE_MAKE_VERSION)
71# if TDE_VERSION < TDE_MAKE_VERSION(3,1,90)
72 TQMap<KParts::Part*, TQString> m_map;
73# endif
74#endif
75};
76
77#endif
78