diff options
Diffstat (limited to 'kchart/kchartFontConfigPage.cc')
-rw-r--r-- | kchart/kchartFontConfigPage.cc | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/kchart/kchartFontConfigPage.cc b/kchart/kchartFontConfigPage.cc index 8bce024e..92b8450b 100644 --- a/kchart/kchartFontConfigPage.cc +++ b/kchart/kchartFontConfigPage.cc @@ -27,13 +27,13 @@ #include <kcolorbutton.h> #include <kdebug.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qpainter.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqpainter.h> +#include <tqwhatsthis.h> #include <kfontdialog.h> @@ -45,33 +45,33 @@ using namespace std; #include "kchart_params.h" -class KChartFontListBoxItem : public QListBoxText +class KChartFontListBoxItem : public TQListBoxText { public: - KChartFontListBoxItem( QListBox* lb, const QString& text = QString::null ) : - QListBoxText( lb, text ) {} - KChartFontListBoxItem( const QString& text = QString::null ) : - QListBoxText( text ) {} + KChartFontListBoxItem( TQListBox* lb, const TQString& text = TQString() ) : + TQListBoxText( lb, text ) {} + KChartFontListBoxItem( const TQString& text = TQString() ) : + TQListBoxText( text ) {} - void setFont( const QFont& font ) { + void setFont( const TQFont& font ) { _font = font; - listBox()->repaint(); + listBox()->tqrepaint(); } - QFont font() const { + TQFont font() const { return _font; } protected: - void paint( QPainter* painter ) + void paint( TQPainter* painter ) { painter->save(); painter->setFont( _font ); - QListBoxText::paint( painter ); + TQListBoxText::paint( painter ); painter->restore(); } private: - QFont _font; + TQFont _font; }; @@ -82,22 +82,22 @@ namespace KChart { KChartFontConfigPage::KChartFontConfigPage( KChartParams* params, - QWidget* parent, + TQWidget* tqparent, KDChartTableData *dat) : - QWidget( parent ), m_params( params ), data(dat) + TQWidget( tqparent ), m_params( params ), data(dat) { - QGridLayout *grid = new QGridLayout(this,4,3,KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *grid = new TQGridLayout(this,4,3,KDialog::marginHint(), KDialog::spacingHint()); // The listbox - m_list = new QListBox(this); - m_list->resize( m_list->sizeHint() ); + m_list = new TQListBox(this); + m_list->resize( m_list->tqsizeHint() ); grid->addWidget(m_list, 0, 0); // Row 0-0, col 0-1 // The font button. - m_fontButton = new QPushButton( this); + m_fontButton = new TQPushButton( this); m_fontButton->setText(i18n("Font...")); - QWhatsThis::add(m_fontButton, i18n("Select an item in the list above and click on this button to display the KDE font dialog in order to choose a new font for this item.")); - m_fontButton->resize( m_fontButton->sizeHint() ); + TQWhatsThis::add(m_fontButton, i18n("Select an item in the list above and click on this button to display the KDE font dialog in order to choose a new font for this item.")); + m_fontButton->resize( m_fontButton->tqsizeHint() ); grid->addWidget( m_fontButton, 1, 0); #if 0 @@ -109,10 +109,10 @@ KChartFontConfigPage::KChartFontConfigPage( KChartParams* params, grid->setColStretch(2, 1); grid->setRowStretch(3, 1); - connect( m_fontButton, SIGNAL(clicked()), - this, SLOT(changeLabelFont())); - connect( m_list, SIGNAL(doubleClicked ( QListBoxItem * )), - this, SLOT(changeLabelFont())); + connect( m_fontButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(changeLabelFont())); + connect( m_list, TQT_SIGNAL(doubleClicked ( TQListBoxItem * )), + this, TQT_SLOT(changeLabelFont())); // Enter the items into the list. initList(); @@ -138,8 +138,8 @@ void KChartFontConfigPage::initList() void KChartFontConfigPage::changeLabelFont() { - QFont *font = 0; - QButton::ToggleState *state = 0; + TQFont *font = 0; + TQButton::ToggleState *state = 0; bool diffAxes = false; if (m_list->currentText()==i18n("X-Title")) { @@ -164,18 +164,18 @@ void KChartFontConfigPage::changeLabelFont() kdDebug( 35001 ) << "Pb in listBox" << endl; if ( diffAxes ) { - QFont newFont; + TQFont newFont; int flags = 0; - QButton::ToggleState newState + TQButton::ToggleState newState = (xAxisIsRelative == yAxisIsRelative) - ? (xAxisIsRelative ? QButton::On : QButton::Off) - : QButton::NoChange; + ? (xAxisIsRelative ? TQButton::On : TQButton::Off) + : TQButton::NoChange; if (KFontDialog::getFontDiff( newFont, flags, false, this, true, - &newState ) != QDialog::Rejected) { + &newState ) != TQDialog::Rejected) { if ( KFontChooser::FamilyList & flags ) { xAxis.setFamily( newFont.family() ); yAxis.setFamily( newFont.family() ); @@ -198,26 +198,26 @@ void KChartFontConfigPage::changeLabelFont() yAxis.setPointSize( newFont.pointSize() ); } - // CharSet settings are ignored since we are not Qt 2.x compatible + // CharSet settings are ignored since we are not TQt 2.x compatible // if( KFontChooser::CharsetList & flags ) { // } - if ( QButton::NoChange != newState ) { + if ( TQButton::NoChange != newState ) { xAxisIsRelative = newState; yAxisIsRelative = newState; } } } else if ( font && state ) { - QFont newFont( *font ); - QButton::ToggleState newState = *state; + TQFont newFont( *font ); + TQButton::ToggleState newState = *state; if (KFontDialog::getFont( newFont, false, this, true, - &newState ) != QDialog::Rejected) { + &newState ) != TQDialog::Rejected) { *font = newFont; - if ( QButton::NoChange != newState ) + if ( TQButton::NoChange != newState ) *state = newState; } } @@ -235,16 +235,16 @@ void KChartFontConfigPage::init() xAxis = bottomparms.axisLabelsFont(); xAxisIsRelative = bottomparms.axisLabelsFontUseRelSize() - ? QButton::On : QButton::Off; + ? TQButton::On : TQButton::Off; - if ( QButton::On == xAxisIsRelative ) + if ( TQButton::On == xAxisIsRelative ) xAxis.setPointSize( bottomparms.axisLabelsFontRelSize() ); yAxis = leftparms.axisLabelsFont(); yAxisIsRelative = leftparms.axisLabelsFontUseRelSize() - ? QButton::On : QButton::Off; + ? TQButton::On : TQButton::Off; - if ( QButton::On == yAxisIsRelative ) + if ( TQButton::On == yAxisIsRelative ) yAxis.setPointSize( leftparms.axisLabelsFontRelSize() ); // PENDING(khz) Add support for the other 6 possible axes @@ -275,19 +275,19 @@ void KChartFontConfigPage::apply() KDChartAxisParams bottomparms; bottomparms = m_params->axisParams( KDChartAxisParams::AxisPosBottom ); - leftparms.setAxisLabelsFont( yAxis, QButton::Off == yAxisIsRelative ); - if ( QButton::On == yAxisIsRelative ) + leftparms.setAxisLabelsFont( yAxis, TQButton::Off == yAxisIsRelative ); + if ( TQButton::On == yAxisIsRelative ) leftparms.setAxisLabelsFontRelSize( yAxis.pointSize() ); // PENDING(khz) change right axis handling // use left axis settings for the right axis as well // (this must be changed, khz 14.12.2001) - rightparms.setAxisLabelsFont( yAxis, QButton::Off == yAxisIsRelative ); - if ( QButton::On == yAxisIsRelative ) + rightparms.setAxisLabelsFont( yAxis, TQButton::Off == yAxisIsRelative ); + if ( TQButton::On == yAxisIsRelative ) rightparms.setAxisLabelsFontRelSize( yAxis.pointSize() ); - bottomparms.setAxisLabelsFont( xAxis, QButton::Off == xAxisIsRelative ); - if ( QButton::On == xAxisIsRelative ) + bottomparms.setAxisLabelsFont( xAxis, TQButton::Off == xAxisIsRelative ); + if ( TQButton::On == xAxisIsRelative ) bottomparms.setAxisLabelsFontRelSize( xAxis.pointSize() ); // PENDING(khz) Add support for the other 6 possible axes |