kchart

kchartWizardSelectChartTypePage.h

00001 #ifndef _kchartWIZARDSELECTCHARTTYPEPAGE_H
00002 #define _kchartWIZARDSELECTCHARTTYPEPAGE_H
00003 
00004 #include <qlayout.h>
00005 #include <qvbox.h>
00006 #include <qwidget.h>
00007 
00008 #include "kchart_params.h"
00009 
00010 class QFrame;
00011 class QPushButton;
00012 class QButtonGroup;
00013 
00014 namespace KChart
00015 {
00016 
00017 class KChartPart;
00018 
00019 // Contains a button with a text label below it
00020 //
00021 // FIXME: Move to kchartWizardSelectChartTypePage.cc
00022 class KChartButton : public QVBox
00023 {
00024   Q_OBJECT
00025   public:
00026     KChartButton(QWidget* parent, const QString &, const QPixmap &);
00027     ~KChartButton();
00028 
00029     QPushButton *button() const { return m_button;}
00030   private:
00031     QPushButton *m_button;
00032 };
00033 
00034 class KChartWizardSelectChartTypePage : public QWidget
00035 {
00036   Q_OBJECT
00037 
00038 public:
00039   KChartWizardSelectChartTypePage( QWidget* parent, KChartPart* chart );
00040 
00041 public slots:
00042   void  apply();
00043 
00044 private slots:
00045   void  chartTypeSelected( int type );
00046 
00047 signals:
00048   void  chartChange(int);
00049 
00050 private:
00051   void  addButton(const QString &name, const QString &icon_name, int type);
00052   void  incPos();
00053 
00054 private:
00055   KChartPart    *m_chart;
00056 
00057   QButtonGroup  *m_typeBG;
00058   QGridLayout   *m_layout;
00059 
00060   // column and row position (used by addButton() to know where to put
00061   // the new button)
00062   int            m_colPos;
00063   int            m_rowPos;
00064 
00065   KChartParams::ChartType  m_type;
00066 
00067 };
00068 
00069 }  //namespace KChart
00070 
00071 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys