kstatusbar.h Source File (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kstatusbar.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 1997 Mark Donohoe (donohoe@kde.org)
    00003    Copyright (C) 1997, 1998 1998 Sven Radej (sven@lisa.exp.univie.ac.at)
    00004
    00005    This library is free software; you can redistribute it and/or
    00006    modify it under the terms of the GNU Library General Public
    00007    License as published by the Free Software Foundation; either
    00008    version 2 of the License, or (at your option) any later version.
    00009
    00010    This library is distributed in the hope that it will be useful,
    00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013    Library General Public License for more details.
    00014
    00015    You should have received a copy of the GNU Library General Public License
    00016    along with this library; see the file COPYING.LIB.  If not, write to
    00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018    Boston, MA 02111-1307, USA.
    00019 */
    00020
    00021 #ifndef __KSTATUSBAR_H__
    00022 #define __KSTATUSBAR_H__
    00023
    00024 #include <qstatusbar.h>
    00025 #include <qintdict.h>
    00026 #include <qlabel.h>
    00027
    00028 class KStatusBar;
    00029
    00034 class KStatusBarLabel : public QLabel
    00035 {
    00036   Q_OBJECT
    00037
    00038 public:
    00039
    00040
    00041   KStatusBarLabel( const QString& text, int _id, KStatusBar* parent = 0L, const char *name=0L );
    00042   ~KStatusBarLabel () {};
    00043
    00044 protected:
    00045
    00046   void mousePressEvent (QMouseEvent* _event);
    00047   void mouseReleaseEvent (QMouseEvent* _event);
    00048
    00049 private:
    00050
    00051   int id;
    00052
    00053 signals:
    00054
    00055   void itemPressed (int id);
    00056   void itemReleased (int id);
    00057 };
    00058
    00081 class KStatusBar : public QStatusBar
    00082 {
    00083   Q_OBJECT
    00084
    00085 public:
    00090   enum BarStatus{ Toggle, Show, Hide };
    00091
    00095   KStatusBar( QWidget* parent = 0L, const char* name = 0L );
    00096
    00102   ~KStatusBar();
    00103
    00119   void insertItem(const QString& text, int id, int stretch=0, bool permanent=false );
    00120
    00128   inline void insertFixedItem(const QString& text, int id, bool permanent=false)
    00129                { insertItem(text, id, 0, permanent); setItemFixed(id); }
    00130
    00136   void removeItem( int id );
    00137
    00146   void changeItem( const QString& text, int id );
    00147
    00153   void setItemAlignment(int id, int align);
    00154
    00162   void setItemFixed(int id, int width=-1);
    00163
    00164 signals:
    00165
    00172   void pressed( int );
    00173
    00179   void released( int );
    00180
    00181 private:
    00182   QIntDict<KStatusBarLabel> items;
    00183   class KStatusBarPrivate* d;
    00184 };
    00185
    00186 #endif // __KSTATUSBAR_H__
    00187

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:57:42 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001