kivio
kivio_stackbar.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIVIO_STACK_BAR_H
00020 #define KIVIO_STACK_BAR_H
00021
00022 #include <qdockwindow.h>
00023 #include <qptrdict.h>
00024
00025 namespace Kivio {
00026 class DragBarButton;
00027 }
00028
00029 class KivioView;
00030
00031 using namespace Kivio;
00032
00033 class KivioStackBar : public QDockWindow
00034 {
00035 Q_OBJECT
00036 public:
00037 KivioStackBar(KivioView* view, QWidget* parent=0, const char* name=0);
00038 ~KivioStackBar();
00039
00040 QWidget* findPage(const QString& name);
00041 QWidget* findPage(DragBarButton*);
00042 void insertPage(QWidget*, const QString&);
00043 void removePage(QWidget*);
00044 void deletePageAndButton(DragBarButton*);
00045 void showPage(QWidget*);
00046
00047 QWidget* visiblePage() const { return m_visiblePage; }
00048
00049 KivioView* view() const { return m_view; }
00050
00051 signals:
00052 void aboutToShow(QWidget*);
00053 void beginDragPage(DragBarButton*);
00054 void finishDragPage(DragBarButton*);
00055 void deleteButton(DragBarButton*, QWidget*, KivioStackBar*);
00056
00057 protected:
00058 virtual void closeEvent(QCloseEvent*);
00059
00060 protected slots:
00061 void showButtonPage();
00062 void buttonBeginDrag();
00063 void buttonFinishDrag();
00064 void slotDeleteButton(DragBarButton*);
00065 void newPlace(QDockWindow::Place place);
00066
00067 private:
00068 QPtrDict<QWidget> m_data;
00069 QWidget* m_visiblePage;
00070 KivioView* m_view;
00071 };
00072
00073 #endif
|