kchart
kchartColorConfigPage.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __KCHARTCOLORCONFIGPAGE_H__
00021 #define __KCHARTCOLORCONFIGPAGE_H__
00022
00023
00024 #include <qwidget.h>
00025 #include <kcolorbutton.h>
00026
00027 #include "koChart.h"
00028 #include "kchartcolorarray.h"
00029
00030 class KListBox;
00031
00032
00033 namespace KChart
00034 {
00035
00036 class KChartParams;
00037
00038
00039 #define NUMDATACOLORS 6
00040
00041 class KChartColorConfigPage : public QWidget
00042 {
00043 Q_OBJECT
00044
00045 public:
00046 KChartColorConfigPage( KChartParams* params, QWidget* parent, KDChartTableData *dat );
00047 void apply();
00048
00049 void setBackgroundColor( QColor color );
00050 QColor backgroundColor() const;
00051 void setGridColor( QColor color );
00052 QColor gridColor() const;
00053 void setLineColor( QColor color );
00054 QColor lineColor() const;
00055 void setTitleColor( QColor color );
00056 QColor titleColor() const;
00057 void setXTitleColor( QColor color );
00058 QColor xTitleColor() const;
00059 void setYTitleColor( QColor color );
00060 QColor yTitleColor() const;
00061 #if 0
00062 void setYTitle2Color( QColor color );
00063 QColor yTitle2Color() const;
00064 #endif
00065 void setXLabelColor( QColor color );
00066 QColor xLabelColor() const;
00067 void setYLabelColor( QColor color );
00068 QColor yLabelColor() const;
00069 #if 0
00070 void setYLabel2Color( QColor color );
00071 QColor yLabel2Color() const;
00072 #endif
00073
00074
00075
00076
00077
00078 private slots:
00079 void activeColorButton();
00080 void changeIndex( int );
00081
00082 private:
00083 void initDataColorList();
00084
00085 KChartParams *m_params;
00086 KDChartTableData *m_data;
00087
00088 KColorButton* _lineCB;
00089 KColorButton* _gridCB;
00090 KColorButton* _xtitleCB;
00091 KColorButton* _ytitleCB;
00092 #if 0
00093 KColorButton* _ytitle2CB;
00094 #endif
00095 KColorButton* _xlabelCB;
00096 KColorButton* _ylabelCB;
00097 #if 0
00098 KColorButton* _ylabel2CB;
00099 #endif
00100
00101
00102 KListBox* _dataColorLB;
00103 KColorButton* _dataColorCB;
00104 KChartColorArray extColor;
00105 uint index;
00106 };
00107
00108
00109 inline void KChartColorConfigPage::setGridColor( QColor color )
00110 {
00111 _gridCB->setColor( color );
00112 }
00113
00114
00115 inline QColor KChartColorConfigPage::gridColor() const
00116 {
00117 return _gridCB->color();
00118 }
00119
00120
00121 inline void KChartColorConfigPage::setLineColor( QColor color )
00122 {
00123 _lineCB->setColor( color );
00124 }
00125
00126
00127 inline QColor KChartColorConfigPage::lineColor() const
00128 {
00129 return _lineCB->color();
00130 }
00131
00132
00133 inline void KChartColorConfigPage::setXTitleColor( QColor color )
00134 {
00135 _xtitleCB->setColor( color );
00136 }
00137
00138
00139 inline QColor KChartColorConfigPage::xTitleColor() const
00140 {
00141 return _xtitleCB->color();
00142 }
00143
00144
00145 inline void KChartColorConfigPage::setYTitleColor( QColor color )
00146 {
00147 _ytitleCB->setColor( color );
00148 }
00149
00150
00151 inline QColor KChartColorConfigPage::yTitleColor() const
00152 {
00153 return _ytitleCB->color();
00154 }
00155
00156
00157 #if 0
00158 inline void KChartColorConfigPage::setYTitle2Color( QColor color )
00159 {
00160 _ytitle2CB->setColor( color );
00161 }
00162
00163
00164 inline QColor KChartColorConfigPage::yTitle2Color() const
00165 {
00166 return _ytitle2CB->color();
00167 }
00168 #endif
00169
00170 inline void KChartColorConfigPage::setXLabelColor( QColor color )
00171 {
00172 _xlabelCB->setColor( color );
00173 }
00174
00175
00176 inline QColor KChartColorConfigPage::xLabelColor() const
00177 {
00178 return _xlabelCB->color();
00179 }
00180
00181
00182 inline void KChartColorConfigPage::setYLabelColor( QColor color )
00183 {
00184 _ylabelCB->setColor( color );
00185 }
00186
00187
00188 inline QColor KChartColorConfigPage::yLabelColor() const
00189 {
00190 return _ylabelCB->color();
00191 }
00192
00193
00194 #if 0
00195 inline void KChartColorConfigPage::setYLabel2Color( QColor color )
00196 {
00197 _ylabel2CB->setColor( color );
00198 }
00199
00200
00201 inline QColor KChartColorConfigPage::yLabel2Color() const
00202 {
00203 return _ylabel2CB->color();
00204 }
00205 #endif
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218 }
00219
00220 #endif
|