diff options
Diffstat (limited to 'quanta/components/csseditor/colorrequester.cpp')
-rw-r--r-- | quanta/components/csseditor/colorrequester.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp index 1333a48e..d2164b06 100644 --- a/quanta/components/csseditor/colorrequester.cpp +++ b/quanta/components/csseditor/colorrequester.cpp @@ -18,8 +18,8 @@ #include <klineedit.h> #include <kcombobox.h> #include <kcolordialog.h> -#include <qtooltip.h> -#include <qiconset.h> +#include <tqtooltip.h> +#include <tqiconset.h> #include <kiconloader.h> #include <klocale.h> #include <kaccel.h> @@ -30,11 +30,11 @@ class colorRequester::colorRequesterPrivate{ public: KLineEdit *edit; colorRequesterPrivate() { edit = 0L; } - void setText( const QString& text ) { edit->setText( text ); } - void connectSignals( QObject *receiver ) { connect( edit, SIGNAL( textChanged( const QString& )),receiver, SIGNAL( textChanged( const QString& ))); } + void setText( const TQString& text ) { edit->setText( text ); } + void connectSignals( TQObject *receiver ) { connect( edit, TQT_SIGNAL( textChanged( const TQString& )),receiver, TQT_SIGNAL( textChanged( const TQString& ))); } }; -colorRequester::colorRequester(QWidget *parent, const char* name) : miniEditor(parent,name){ +colorRequester::colorRequester(TQWidget *parent, const char* name) : miniEditor(parent,name){ d = new colorRequesterPrivate; init(); } @@ -45,7 +45,7 @@ colorRequester::~colorRequester(){ } void colorRequester::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(textChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(textChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void colorRequester::init() @@ -56,31 +56,31 @@ void colorRequester::init() d->edit = new KLineEdit( this, "line edit" ); myButton = new KPushButton( this, "kfile button"); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("colorize")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("colorize")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - QToolTip::add(myButton, i18n("Open color dialog")); + TQToolTip::add(myButton, i18n("Open color dialog")); setSpacing( KDialog::spacingHint() ); - QWidget *widget = (QWidget*) d->edit; + TQWidget *widget = (TQWidget*) d->edit; setFocusProxy( widget ); d->connectSignals( this ); - connect( myButton, SIGNAL( clicked() ), this, SLOT( openColorDialog() )); - connect( d->edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( setInitialValue(/*const QString&*/ ) )); + connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( openColorDialog() )); + connect( d->edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( setInitialValue(/*const TQString&*/ ) )); KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, this, SLOT( openColorDialog() )); + accel->insert( KStdAccel::Open, this, TQT_SLOT( openColorDialog() )); accel->readSettings(); } void colorRequester::openColorDialog(){ KColorDialog dlg(this,"dlg",true); - dlg.setColor(QColor(m_initialValue)); + dlg.setColor(TQColor(m_initialValue)); if(dlg.exec()){ - QColor myColor(dlg.color()); + TQColor myColor(dlg.color()); d->edit->setText(myColor.name()); emit textChanged(myColor.name()); } @@ -90,13 +90,13 @@ KLineEdit * colorRequester::lineEdit() const{ return d->edit; } #include <kdebug.h> -void colorRequester::setInitialValue(/*const QString& s*/){ - QString temp = d->edit->text(); +void colorRequester::setInitialValue(/*const TQString& s*/){ + TQString temp = d->edit->text(); temp.remove(" "); if( temp.contains("#") != 0){ temp.remove("#"); if(temp.length() == 3) { - QString temp2; + TQString temp2; temp2.append(temp[0]); temp2.append(temp[0]); temp2.append(temp[1]); @@ -115,7 +115,7 @@ void colorRequester::setInitialValue(/*const QString& s*/){ if( temp.contains("rgb(") != 0){ temp.remove("rgb(").remove(")"); - QStringList rgbValues = QStringList::split(",",temp); + TQStringList rgbValues = TQStringList::split(",",temp); // bool ok; int r = rgbValues[0].toInt(); int g = rgbValues[1].toInt(); |