diff options
Diffstat (limited to 'tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook')
-rw-r--r-- | tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook | 62 |
1 files changed, 31 insertions, 31 deletions
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 <para>Before your application starts its computation intensive work, or before it starts loading plugins, &etc;, invoke &ksplash; as follows:</para> <programlisting>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 <para>Whenever you want to display a message with or without an icon, use</para> -<programlisting>arg << QString("iconName") << QString("programName") << QString("Some description"); - if (!(c->send(KSplashName, "KSplashIface", "programStarted(QString,QString,QString)", data)) +<programlisting>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 <listitem><para>Plugin classes should provide a <literal>static</literal> function called <function>names</function> that returns a list of names by which it can be invoked.</para></listitem> <listitem><para>If the plugin can be configured in the control centre module, it should provide a <literal>ThemeEngineConfig</literal>-based class for the configuration.</para></listitem> <listitem><para>Plugin classes must override at least one of the virtual functions <function>slotSetText</function>, <function>slotSetPixmap</function>, <function>slotUpdateProgress</function> and <function>slotUpdateSteps</function> to make it usable.</para></listitem> -<listitem><para>The constructor should take the form <literal>ThemeEngine( QWidget *parent, const char *name, const QStringList &args )</literal> so that it can be used with <classname>KGenericFactory</classname>.</para></listitem> +<listitem><para>The constructor should take the form <literal>ThemeEngine( TQWidget *parent, const char *name, const QStringList &args )</literal> so that it can be used with <classname>KGenericFactory</classname>.</para></listitem> </orderedlist> <para>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.</para> </sect1> @@ -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 </programlisting> </example> -<para>Let us analyse the listing above. The <classname>Theme2k</classname> class satisfies the naming conventions, and is inherited from <classname>ThemeEngine</classname>. It provides a <methodname>Theme2k::names()</methodname>, and has a constructor that takes the required parameters: <function>Theme2k( QWidget *, const char *, const QStringList& );</function> and also provides a simple <methodname>Theme2k::slotSetText()</methodname> method. For the moment, do not worry about the <classname>RotWidget</classname> 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 <function>slotSetPixmap</function> function. Similar functions exist for setting the progressbar range (<function>slotUpdateSteps</function>) and incrementing(<function>slotUpdateProgress</function>) the current step. </para> +<para>Let us analyse the listing above. The <classname>Theme2k</classname> class satisfies the naming conventions, and is inherited from <classname>ThemeEngine</classname>. It provides a <methodname>Theme2k::names()</methodname>, and has a constructor that takes the required parameters: <function>Theme2k( TQWidget *, const char *, const QStringList& );</function> and also provides a simple <methodname>Theme2k::slotSetText()</methodname> method. For the moment, do not worry about the <classname>RotWidget</classname> 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 <function>slotSetPixmap</function> function. Similar functions exist for setting the progressbar range (<function>slotUpdateSteps</function>) and incrementing(<function>slotUpdateProgress</function>) the current step. </para> </sect1> <sect1 id="Implementation"> <title>Implementation of the plugin</title> @@ -646,7 +646,7 @@ private: <para>The macro <constant>K_EXPORT_COMPONENT_FACTORY</constant> is declared in <filename>kgenericfactory.h</filename>. Onwards to the constructor! Since this is a very simple plugin, the constructor is pretty straightforward.</para> <example> <title>Plugin constructor</title> -<programlisting>Theme2k::Theme2k( QWidget *parent, const char *name, const QStringList &args ) +<programlisting>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 ); } </programlisting> </example> @@ -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 ); } </programlisting> </sect1> @@ -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; |