From 241e0082f7b9ccadaeed0ef43a1c9ebb9b4fe840 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 13 Oct 2023 18:02:18 +0900 Subject: Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version Signed-off-by: Michele Calgaro --- .../docs/tdebase/ksplashml/index.docbook | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook') diff --git a/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook b/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook index 95349cff6ef..9614905eb37 100644 --- a/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook @@ -465,7 +465,7 @@ Welcome Text = Loading KDE Before your application starts its computation intensive work, or before it starts loading plugins, &etc;, invoke &ksplash; as follows: DCOPClient *c = kapp->dcopClient(); -QString error; +TQString error; QCString KSplashName; int pid = 0; QStringList args; @@ -494,8 +494,8 @@ if (kapp->startServiceByDesktopName("ksplash", args, &error, &KSplash Whenever you want to display a message with or without an icon, use -arg << QString("iconName") << QString("programName") << QString("Some description"); - if (!(c->send(KSplashName, "KSplashIface", "programStarted(QString,QString,QString)", data)) +arg << TQString("iconName") << TQString("programName") << TQString("Some description"); + if (!(c->send(KSplashName, "KSplashIface", "programStarted(TQString,TQString,TQString)", data)) { // Some error processing here. } @@ -560,7 +560,7 @@ X-KSplash-ObjectName=Theme2k Plugin classes should provide a static function called names that returns a list of names by which it can be invoked. If the plugin can be configured in the control centre module, it should provide a ThemeEngineConfig-based class for the configuration. Plugin classes must override at least one of the virtual functions slotSetText, slotSetPixmap, slotUpdateProgress and slotUpdateSteps to make it usable. -The constructor should take the form ThemeEngine( QWidget *parent, const char *name, const QStringList &args ) so that it can be used with KGenericFactory. +The constructor should take the form ThemeEngine( TQWidget *parent, const char *name, const QStringList &args ) so that it can be used with KGenericFactory. The last requirement may seem complicated, but, as we will see later, by adding a single line to your source files, you can usually ignore it. @@ -593,11 +593,11 @@ class Theme2k: public ThemeEngine { TQ_OBJECT public: - Theme2k( QWidget *, const char *, const QStringList& ); + Theme2k( TQWidget *, const char *, const QStringList& ); - inline const QString name() + inline const TQString name() { - return( QString("KSplash2k") ); + return( TQString("KSplash2k") ); } inline const KDialogBase *config( TDEConfig *kc ) { @@ -614,7 +614,7 @@ public: }; public slots: - inline void slotSetText( const QString& s ) + inline void slotSetText( const TQString& s ) { if( mText && mText->text() != s ) mText->setText( s ); }; @@ -625,15 +625,15 @@ private: QLabel *mText; RotWidget *mRotator; - QColor mTBgColor, mTFgColor, mRotColor1, mRotColor2, mStatusColor; + TQColor mTBgColor, mTFgColor, mRotColor1, mRotColor2, mStatusColor; int mRotSpeed; - QString mWndTitle, mLogoFile; + TQString mWndTitle, mLogoFile; }; #endif -Let us analyse the listing above. The Theme2k class satisfies the naming conventions, and is inherited from ThemeEngine. It provides a Theme2k::names(), and has a constructor that takes the required parameters: Theme2k( QWidget *, const char *, const QStringList& ); and also provides a simple Theme2k::slotSetText() method. For the moment, do not worry about the RotWidget class. It is a small widget that provides some eye candy for the user. Our plugin is very simple and does not display any icons or show a progressbar. If you would like to display icons, override the slotSetPixmap function. Similar functions exist for setting the progressbar range (slotUpdateSteps) and incrementing(slotUpdateProgress) the current step. +Let us analyse the listing above. The Theme2k class satisfies the naming conventions, and is inherited from ThemeEngine. It provides a Theme2k::names(), and has a constructor that takes the required parameters: Theme2k( TQWidget *, const char *, const QStringList& ); and also provides a simple Theme2k::slotSetText() method. For the moment, do not worry about the RotWidget class. It is a small widget that provides some eye candy for the user. Our plugin is very simple and does not display any icons or show a progressbar. If you would like to display icons, override the slotSetPixmap function. Similar functions exist for setting the progressbar range (slotUpdateSteps) and incrementing(slotUpdateProgress) the current step. Implementation of the plugin @@ -646,7 +646,7 @@ private: The macro K_EXPORT_COMPONENT_FACTORY is declared in kgenericfactory.h. Onwards to the constructor! Since this is a very simple plugin, the constructor is pretty straightforward. Plugin constructor -Theme2k::Theme2k( QWidget *parent, const char *name, const QStringList &args ) +Theme2k::Theme2k( TQWidget *parent, const char *name, const QStringList &args ) :ThemeEngine( parent, name, args ) { readSettings(); @@ -666,23 +666,23 @@ private: if( !cfg ) return; - cfg->setGroup( QString("KSplash Theme: %1").arg(mTheme->theme()) ); + cfg->setGroup( TQString("KSplash Theme: %1").arg(mTheme->theme()) ); - QColor DefaultTBgColor( Qt::darkBlue ); - QColor DefaultTFgColor( Qt::white ); + TQColor DefaultTBgColor( Qt::darkBlue ); + TQColor DefaultTFgColor( Qt::white ); mTBgColor = cfg->readColorEntry( "Title Background Color", &DefaultTBgColor ); mTFgColor = cfg->readColorEntry( "Title Foreground Color", &DefaultTFgColor ); mStatusColor = cfg->readColorEntry("Status Text Color", &mTBgColor ); - QColor DefaultRot1( Qt::darkBlue ); - QColor DefaultRot2( Qt::cyan ); + TQColor DefaultRot1( Qt::darkBlue ); + TQColor DefaultRot2( Qt::cyan ); mRotColor1 = cfg->readColorEntry( "Rotator Color 1", &DefaultRot1 ); mRotColor2 = cfg->readColorEntry( "Rotator Color 2", &DefaultRot2 ); mRotSpeed = cfg->readNumEntry( "Rotator Speed", 30 ); mWndTitle = cfg->readEntry( "Window Title", i18n("Please wait...") ); - mLogoFile = cfg->readEntry( "Logo File", QString::null ); + mLogoFile = cfg->readEntry( "Logo File", TQString::null ); } @@ -794,7 +794,7 @@ K_EXPORT_COMPONENT_FACTORY( ksplash2k, KGenericFactory<Theme2k> ); Cfg2k::Cfg2k( TDEConfig * ) {} -Theme2k::Theme2k( QWidget *parent, const char *name, const QStringList &args ) +Theme2k::Theme2k( TQWidget *parent, const char *name, const QStringList &args ) :ThemeEngine( parent, name, args ) { readSettings(); @@ -817,7 +817,7 @@ void Theme2k::initUi() QLabel *logo = new QLabel( vbox ); logo->setPalette( Qt::white ); - QString px( locate( "appdata", mTheme->themeDir() + (mLogoFile.isNull()?QString("/Logo.png"):mLogoFile) ) ); + TQString px( locate( "appdata", mTheme->themeDir() + (mLogoFile.isNull()?TQString("/Logo.png"):mLogoFile) ) ); if (px.isNull()) px = locate("appdata","Themes/Default/splash_top.png"); if( !px.isNull() ) @@ -858,23 +858,23 @@ void Theme2k::readSettings() if( !cfg ) return; - cfg->setGroup( QString("KSplash Theme: %1").arg(mTheme->theme()) ); + cfg->setGroup( TQString("KSplash Theme: %1").arg(mTheme->theme()) ); - QColor DefaultTBgColor( Qt::darkBlue ); - QColor DefaultTFgColor( Qt::white ); + TQColor DefaultTBgColor( Qt::darkBlue ); + TQColor DefaultTFgColor( Qt::white ); mTBgColor = cfg->readColorEntry( "Title Background Color", &DefaultTBgColor ); mTFgColor = cfg->readColorEntry( "Title Foreground Color", &DefaultTFgColor ); mStatusColor = cfg->readColorEntry("Status Text Color", &mTBgColor ); - QColor DefaultRot1( Qt::darkBlue ); - QColor DefaultRot2( Qt::cyan ); + TQColor DefaultRot1( Qt::darkBlue ); + TQColor DefaultRot2( Qt::cyan ); mRotColor1 = cfg->readColorEntry( "Rotator Color 1", &DefaultRot1 ); mRotColor2 = cfg->readColorEntry( "Rotator Color 2", &DefaultRot2 ); mRotSpeed = cfg->readNumEntry( "Rotator Speed", 30 ); mWndTitle = cfg->readEntry( "Window Title", i18n("Please wait...") ); - mLogoFile = cfg->readEntry( "Logo File", QString::null ); + mLogoFile = cfg->readEntry( "Logo File", TQString::null ); } @@ -893,11 +893,11 @@ void Theme2k::readSettings() /** * @short Display a rotating-gradient widget. */ -class RotWidget: public QWidget +class RotWidget: public TQWidget { TQ_OBJECT public: - RotWidget( QWidget *, const QColor&, const QColor&, int ); + RotWidget( TQWidget *, const TQColor&, const TQColor&, int ); ~RotWidget(); private slots: @@ -908,7 +908,7 @@ protected: void paintEvent( QPaintEvent * ); void resizeEvent( QResizeEvent * ); - QColor m_color1, m_color2; + TQColor m_color1, m_color2; int m_step, m_speed; QTimer *m_stepTimer; @@ -931,8 +931,8 @@ protected: #include "rotwidget.h" #include "rotwidget.moc" -RotWidget::RotWidget( QWidget *parent, const QColor& c1, const QColor& c2, int sp ) - :QWidget(parent), m_color1(c1), m_color2(c2), m_step(0), m_speed(sp) +RotWidget::RotWidget( TQWidget *parent, const TQColor& c1, const TQColor& c2, int sp ) + :TQWidget(parent), m_color1(c1), m_color2(c2), m_step(0), m_speed(sp) { if( (m_speed <= 0) || (m_speed > 20) ) m_speed = 1; -- cgit v1.2.1