KDELibs4Support

kstatusbar.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1997 Mark Donohoe ([email protected])
3  Copyright (C) 1997, 1998 1998 Sven Radej ([email protected])
4  Copyright (C) 2007 Aron Boström ([email protected])
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KSTATUSBAR_H
23 #define KSTATUSBAR_H
24 
25 #include <kdelibs4support_export.h>
26 #include <QStatusBar>
27 
28 class QObject;
29 class QEvent;
30 class KStatusBarPrivate;
31 
59 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KStatusBar : public QStatusBar
60 {
61  Q_OBJECT
62 
63 public:
67  KDELIBS4SUPPORT_DEPRECATED explicit KStatusBar(QWidget *parent = nullptr);
68 
74  ~KStatusBar();
75 
87  void insertItem(const QString &text, int id, int stretch = 0);
88 
100  void insertPermanentItem(const QString &text, int id, int stretch = 0);
101 
110  void insertFixedItem(const QString &text, int id);
111 
120  void insertPermanentFixedItem(const QString &text, int id);
121 
127  void removeItem(int id);
128 
135  bool hasItem(int id) const;
136 
140  QString itemText(int id) const;
141 
151  void changeItem(const QString &text, int id);
152 
158  void setItemAlignment(int id, Qt::Alignment alignment);
159 
167  void setItemFixed(int id, int width = -1);
168 
169 Q_SIGNALS:
170 
177  void pressed(int);
178 
184  void released(int);
185 
186 protected:
187  bool eventFilter(QObject *object, QEvent *event) override;
188 
189 private:
190  KStatusBarPrivate *const d;
191 };
192 
193 #endif // KSTATUSBAR_H
194 
KDE statusbar widget
Definition: kstatusbar.h:59
typedef Alignment
virtual bool eventFilter(QObject *watched, QEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:58:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.