Ran am2cmake.
[basket4.git] / src / basketstatusbar.h
blob080b926b891801c1d94301163b2286945a37340d
1 /***************************************************************************
2 * Copyright (C) 2003 by S�astien Laot *
3 * slaout@linux62.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #ifndef BASKETSTATUSBAR_H
21 #define BASKETSTATUSBAR_H
23 #include <qobject.h>
24 #include <qpixmap.h>
25 //Added by qt3to4:
26 #include <QLabel>
28 class KStatusBar;
29 namespace KParts { class StatusBarExtension; }
30 class QWidget;
31 class QLabel;
32 class ClickableLabel;
34 /**
35 @author Sébastien Laoût <slaout@linux62.org>
37 class BasketStatusBar : public QObject
39 Q_OBJECT
40 public:
41 BasketStatusBar(KStatusBar *bar);
42 BasketStatusBar(KParts::StatusBarExtension *extension);
43 ~BasketStatusBar();
45 public slots:
46 /** GUI Main Window actions **/
47 void setStatusBarHint(const QString &hint); /// << Set a specific message or update if hint is empty
48 void updateStatusBarHint(); /// << Display the current state message (dragging, editing) or reset the startsbar message
49 void postStatusbarMessage(const QString &text);
50 void setSelectionStatus(const QString &s);
51 void setLockStatus(bool isLocked);
52 void setupStatusBar();
53 void setUnsavedStatus(bool isUnsaved);
55 protected:
56 KStatusBar *statusBar () const;
57 void addWidget(QWidget * widget, int stretch = 0, bool permanent = false);
58 void setStatusText(const QString &txt);
60 private:
61 KStatusBar *m_bar;
62 KParts::StatusBarExtension *m_extension;
63 QLabel *m_selectionStatus;
64 ClickableLabel *m_lockStatus;
65 QLabel *m_basketStatus;
66 QLabel *m_savedStatus;
67 QPixmap m_savedStatusPixmap;
70 #endif