qwwnavigationbar.h

00001 //
00002 // C++ Interface: qwwnavigationbar
00003 //
00004 // Description:
00005 //
00006 //
00007 // Author: Witold Wysota <wysota@wysota.eu.org>, (C) 2007
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
00010 //
00011 //
00012 #ifndef QWWNAVIGATIONBAR_H
00013 #define QWWNAVIGATIONBAR_H
00014 
00015 #include <QWidget>
00016 #include <QList>
00017 #include <QIcon>
00018 #include <wwglobal.h>
00019 
00020 class QPushButton;
00021 class QStackedWidget;
00022 class QFrame;
00023 class QSplitter;
00024 class QVBoxLayout;
00025 class QToolButton;
00026 
00027 class QwwNavigationBarPrivate;
00028 class Q_WW_EXPORT QwwNavigationBar : public QWidget, QwwPrivatable
00029 {
00030 Q_OBJECT
00031 Q_PROPERTY(QIcon currentWidgetIcon READ currentWidgetIcon WRITE setCurrentWidgetIcon STORED false)
00032 Q_PROPERTY(QString currentWidgetLabel READ currentWidgetLabel WRITE setCurrentWidgetLabel STORED false)
00033 Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex)
00034 public:
00035     QwwNavigationBar(QWidget *parent = 0);
00036     ~QwwNavigationBar();
00037 
00038     void addWidget(QWidget *child, const QString &label=QString::null);
00039     void addWidget(QWidget *child, const QIcon &, const QString &label=QString::null);
00040     void insertWidget(int index, QWidget *child, const QString &label=QString::null);
00041     void insertWidget(int index, QWidget *child, const QIcon &, const QString &label=QString::null);
00042     void removeWidget(int index);
00043 
00044     int widgetCount() const;
00045     QWidget *widget(int index) const;
00046     int indexOf(QWidget *) const;
00047     const QPushButton *button(int index) const;
00048 
00049     int currentIndex() const;
00050 
00051 
00052     void setCurrentWidget(QWidget *);
00053 
00054     void setWidgetLabel(int index, const QString &);
00055     QString widgetLabel(int index) const;
00056     void setWidgetIcon(int index, const QIcon &);
00057     QIcon widgetIcon(int index) const;
00058     void setCurrentWidgetIcon(const QIcon &);
00059     void setCurrentWidgetLabel(const QString &);
00060     QIcon currentWidgetIcon() const;
00061     QString currentWidgetLabel() const;
00062 
00063 public slots:
00064     void setCurrentIndex(int);
00065 protected:
00066     void actionEvent(QActionEvent *ev);
00067 private:
00068     WW_DECLARE_PRIVATE(QwwNavigationBar);
00069     Q_DISABLE_COPY(QwwNavigationBar);
00070 signals:
00071     void currentIndexChanged(int);
00072     void widgetLabelChanged(const QString &);
00073     void widgetIconChanged(const QIcon &);
00074 private slots:
00075     void _q_buttonClicked();
00076 };
00077 
00078 #endif

Generated on Sat Apr 21 21:54:36 2007 for wwWidgets by  doxygen 1.5.1