summaryrefslogtreecommitdiffstats
path: root/kchart/kchartWizardSelectChartTypePage.h
blob: a897b6fbf1ab86bcc18b8fb2ea892d3eeefd7738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef _kchartWIZARDSELECTCHARTTYPEPAGE_H
#define _kchartWIZARDSELECTCHARTTYPEPAGE_H

#include <tqlayout.h>
#include <tqvbox.h>
#include <tqwidget.h>

#include "kchart_params.h"

class TQFrame;
class TQPushButton;
class TQButtonGroup;

namespace KChart
{

class KChartPart;

// Contains a button with a text label below it
//
// FIXME: Move to kchartWizardSelectChartTypePage.cpp
class KChartButton : public TQVBox
{
  TQ_OBJECT
  
  public:
    KChartButton(TQWidget* parent, const TQString &, const TQPixmap &);
    ~KChartButton();

    TQPushButton *button() const { return m_button;}
  private:
    TQPushButton *m_button;
};

class KChartWizardSelectChartTypePage : public TQWidget
{
  TQ_OBJECT
  

public:
  KChartWizardSelectChartTypePage( TQWidget* parent, KChartPart* chart );

public slots:
  void  apply();

private slots:
  void  chartTypeSelected( int type );

signals:
  void  chartChange(int);

private:
  void  addButton(const TQString &name, const TQString &icon_name, int type);
  void  incPos();

private:
  KChartPart    *m_chart;

  TQButtonGroup  *m_typeBG;
  TQGridLayout   *m_layout;

  // column and row position (used by addButton() to know where to put
  // the new button)
  int            m_colPos;
  int            m_rowPos;

  KChartParams::ChartType  m_type;

};

}  //namespace KChart

#endif