From 2ea8296a80cea67f07d15d6994579dfcc0022885 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 14 Jan 2024 16:30:02 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro (cherry picked from commit 1a2c703f4d5f22e9f8a0e74a2976895d85318e51) --- tde-i18n-ca/docs/tdebase/ksplashml/index.docbook | 2 +- tde-i18n-da/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-da/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-de/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdebase/ksplashml/index.docbook | 2 +- tde-i18n-es/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-es/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-et/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-et/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-fr/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdenetwork/kwifimanager/index.docbook | 2 +- tde-i18n-fr/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-it/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-it/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-nl/docs/tdebase/ksplashml/index.docbook | 2 +- tde-i18n-pl/docs/tdebase/ksplashml/index.docbook | 2 +- tde-i18n-pt/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-pt/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- .../docs/tdebase/ksplashml/index.docbook | 2 +- tde-i18n-ru/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-ru/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- tde-i18n-sv/docs/tdebase/ksplashml/index.docbook | 2 +- .../docs/tdevelop/kde_app_devel/index.docbook | 14 +++++------ tde-i18n-sv/docs/tdevelop/kdearch/index.docbook | 28 +++++++++++----------- 30 files changed, 176 insertions(+), 176 deletions(-) diff --git a/tde-i18n-ca/docs/tdebase/ksplashml/index.docbook b/tde-i18n-ca/docs/tdebase/ksplashml/index.docbook index 82f8d52f5f1..ce51e7f0b65 100644 --- a/tde-i18n-ca/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-ca/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-da/docs/tdebase/ksplashml/index.docbook b/tde-i18n-da/docs/tdebase/ksplashml/index.docbook index 6b5bd5f3b4a..12f1637a36f 100644 --- a/tde-i18n-da/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-da/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-da/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-da/docs/tdevelop/kde_app_devel/index.docbook index 47ae77a6a71..5db3b727f6b 100644 --- a/tde-i18n-da/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-da/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Du mærker at alt du skal tilføje for at give knappen mere kommunikation er metoden connect(): connect (&hello, SIGNAL( clicked() ), &a, SLOT( quit() ));. Hvad er betydningen nu? Klassedeklarationen af TQObject siger følgende om metoden connect(): +Du mærker at alt du skal tilføje for at give knappen mere kommunikation er metoden connect(): connect (&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() ));. Hvad er betydningen nu? Klassedeklarationen af TQObject siger følgende om metoden connect(): bool connect ( const TQObject * afsender, const char * signal, const TQObject * modtager, const char * medlem ) Dette betyder at du skal angive en TQObject-instanspeger som er signalets afsender, hvilket betyder at den kan sende signalet, som første parameter. Derefter skal du angive signalet som du vil forbinde til. De to sidste parametre er modtagerobjektet som sørger for en slot, fulgt af medlemsfunktionen som er en virkelig slot som vil køres når signalet sendes. Ved at bruge signaler og slots, kan programmets objekter nemt kommunikere med hinanden uden udtrykkeligt at afhænge af typen af modtagarobjektet. Du vil lære mere om hvordan denne mekanisme bruges produktivt senere i håndbogen. Mere information om signal/slot-mekanismen findes også i KDE's biblioteksreferenceguide og QT's reference på nettet. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // tillad visningen at ændre statuslinjen og overskriften -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-da/docs/tdevelop/kdearch/index.docbook b/tde-i18n-da/docs/tdevelop/kdearch/index.docbook index 973d66fddb1..6b84fa2f39d 100644 --- a/tde-i18n-da/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-da/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc Den tilsvarende del til at oprette dette i C++ er: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-de/docs/tdebase/ksplashml/index.docbook b/tde-i18n-de/docs/tdebase/ksplashml/index.docbook index 51692417bbe..b92090174d9 100644 --- a/tde-i18n-de/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-de/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook b/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook index 673097c140d..844614924d2 100644 --- a/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-en_GB/docs/tdebase/ksplashml/index.docbook @@ -942,7 +942,7 @@ RotWidget::RotWidget( TQWidget *parent, const TQColor& c1, const TQColor& preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-es/docs/tdebase/ksplashml/index.docbook b/tde-i18n-es/docs/tdebase/ksplashml/index.docbook index 2c8c045505a..14b2067a6c5 100644 --- a/tde-i18n-es/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-es/docs/tdebase/ksplashml/index.docbook @@ -983,7 +983,7 @@ RotWidget::RotWidget( TQWidget *parent, const TQColor& c1, const TQColor& preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-es/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-es/docs/tdevelop/kde_app_devel/index.docbook index 6c881b6997b..91b367ef68f 100644 --- a/tde-i18n-es/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-es/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Como puede comprobar, la única adición para dar más interacción al botón consiste en usar un método connect(): connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); es todo cuanto tiene que añadir. ¿Cuál es su significado? La declaración de la clase TQObject dice lo siguiente sobre el método connect(): +Como puede comprobar, la única adición para dar más interacción al botón consiste en usar un método connect(): connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); es todo cuanto tiene que añadir. ¿Cuál es su significado? La declaración de la clase TQObject dice lo siguiente sobre el método connect(): bool connect ( const TQObject * emisor, const char * señal, const TQObject * receptor, const char * miembro ) Esto significa que debe especificar como primer parámetro un puntero de una instancia de la clase TQObject, que es el emisor de la señal (lo que significa que puede emitir esta señal); a continuación debe especificar la señal que desea conectar. Los dos últimos parámetros son, en primer lugar, el objeto receptor que proporciona un «slot», y, finalmente, la función miembro de dicho objeto que va a actuar como «slot» (y que será ejecutada tras la emisión de la señal). Mediante el uso de señales y «slots», los objetos de su programa pueden interactuar con otros fácilmente sin depender explícitamente del tipo de objeto receptor. Aprenderá más sobre el uso de este mecanismo para usos productivos en sucesivas secciones de este manual. También puede encontrar más información sobre el mecanismo de señales y «slots» en la Guía de referencia de la biblioteca KDE y la referencia en línea de Qt. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // permitir que la vista pueda cambiar la barra de estado y el título -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-es/docs/tdevelop/kdearch/index.docbook b/tde-i18n-es/docs/tdevelop/kdearch/index.docbook index c6273f08d38..8e2470ce6cd 100644 --- a/tde-i18n-es/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-es/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc La parte de código correspondiente en C++ es: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-et/docs/tdebase/ksplashml/index.docbook b/tde-i18n-et/docs/tdebase/ksplashml/index.docbook index dcf168c63bf..d5b9717c8c7 100644 --- a/tde-i18n-et/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-et/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-et/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-et/docs/tdevelop/kde_app_devel/index.docbook index 420c5da0b0f..f6e80ff318c 100644 --- a/tde-i18n-et/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-et/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Nagu näed, saab üheainsa lisandusega anda nupule suurema interaktiivsuse. Selleks on vaja ainult lisada meetod connect(): connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )). Mida see tähendab? Klassi TQObject deklaratsioon ütleb meetodi connect() kohta järgmist: +Nagu näed, saab üheainsa lisandusega anda nupule suurema interaktiivsuse. Selleks on vaja ainult lisada meetod connect(): connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )). Mida see tähendab? Klassi TQObject deklaratsioon ütleb meetodi connect() kohta järgmist: bool connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) See tähendab, et sul tuleb määrata TQObject eksemplari viit, mis on signaali saatja, mis tähendab, et sa emiteerid selle signaali esimese parameetrina. Seejärel tuleb määrata signaal, millega soovid ühenduse luua. Viimased kaks parameetrit on vastuvõttev objekt, mis pakub pesa, ning sellele järgneb liikmesfunktsioon, mis ongi tegelik pesa, mis käivitatakse signaali emiteerimisel. Signaalide ja pesade abil saavad sinu programmi objektid üksteisega suhelda ilma vajaduseta otseselt sõltuda vastuvõtva objekti tüübist. Selle mehhanismi kasutamisest tuleb käsiraamatus veel pikemalt juttu. Rohkem infot signaalide ja pesade mehhanismi kohta leiab ka KDE teegi ja Qt dokumentatsioonist. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-et/docs/tdevelop/kdearch/index.docbook b/tde-i18n-et/docs/tdevelop/kdearch/index.docbook index 224f4d02212..dc65a02b852 100644 --- a/tde-i18n-et/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-et/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc Vastav osa C++ keeles kõlab: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-fr/docs/tdebase/ksplashml/index.docbook b/tde-i18n-fr/docs/tdebase/ksplashml/index.docbook index a93f3ecc0ab..8b20010c185 100644 --- a/tde-i18n-fr/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-fr/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-fr/docs/tdenetwork/kwifimanager/index.docbook b/tde-i18n-fr/docs/tdenetwork/kwifimanager/index.docbook index 56a2e12e6f6..8513f281c56 100644 --- a/tde-i18n-fr/docs/tdenetwork/kwifimanager/index.docbook +++ b/tde-i18n-fr/docs/tdenetwork/kwifimanager/index.docbook @@ -116,7 +116,7 @@ Afficheur de statistiques - Optionnellement, en sélectionnant Statistiques de connexion dans le menu Fichier, une fenêtre séparée peut être représentée, qui affiche les graphes du niveau du signal et du niveau du bruit des 240 dernières secondes. Le niveau du signal est affiché en bleu et le niveau du bruit en rouge. La différence (SIGNAL moins BRUIT) est la qualité de connexion affichée dans la fenêtre principale. + Optionnellement, en sélectionnant Statistiques de connexion dans le menu Fichier, une fenêtre séparée peut être représentée, qui affiche les graphes du niveau du signal et du niveau du bruit des 240 dernières secondes. Le niveau du signal est affiché en bleu et le niveau du bruit en rouge. La différence (TQ_SIGNAL moins BRUIT) est la qualité de connexion affichée dans la fenêtre principale. Certaines cartes ne rapportent pas d'information sensée sur le bruit. Si c'est le cas de votre carte et que cette fichu ligne rouge vous ennuie, vous pouvez désactiver l'affichage du niveau de bruit dans la fenêtre des statistiques en dé-sélectionnant ConfugationMontrer les statistiques du niveau de bruit dans la fenêtre parincipale de &kwifimanager;. diff --git a/tde-i18n-fr/docs/tdevelop/kdearch/index.docbook b/tde-i18n-fr/docs/tdevelop/kdearch/index.docbook index 021d41deac9..064954b11d6 100644 --- a/tde-i18n-fr/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-fr/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc La partie correspondante de la configuration en C++ est : -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-it/docs/tdebase/ksplashml/index.docbook b/tde-i18n-it/docs/tdebase/ksplashml/index.docbook index 7d404108566..317b00ca7d0 100644 --- a/tde-i18n-it/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-it/docs/tdebase/ksplashml/index.docbook @@ -978,7 +978,7 @@ RotWidget::RotWidget( TQWidget *parent, const TQColor& c1, const TQColor& preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-it/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-it/docs/tdevelop/kde_app_devel/index.docbook index 5559a514de1..cedb30d5e3b 100644 --- a/tde-i18n-it/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-it/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Come si può vedere, l'unica modifica richiesta per dare maggiore interazione al pulsante consiste nell'utilizzare il metodo connect(): tutto quello che si deve aggiungere è connect(&hello,SIGNAL( clicked() ), &a,SLOT( quit() )). Cosa significa? La dichiarazione del metodo connect() nella classe TQObject è: +Come si può vedere, l'unica modifica richiesta per dare maggiore interazione al pulsante consiste nell'utilizzare il metodo connect(): tutto quello che si deve aggiungere è connect(&hello,TQ_SIGNAL( clicked() ), &a,TQ_SLOT( quit() )). Cosa significa? La dichiarazione del metodo connect() nella classe TQObject è: bool connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) Si deve specificare come primo parametro un puntatore ad una istanza di TQObject che trasmette il segnale, ovvero che può emettere questo segnale; poi si specifica il segnale che si vuole connettere. Gli ultimi due parametri sono l'oggetto ricevitore che fornisce uno slot, seguito dalla funzione membro che in effetti è lo slot che sarà eseguito dopo l'emissione del segnale. Utilizzando i segnali e gli slot gli oggetti dei proprio programma potranno interagire tra loro facilmente senza dipendere esplicitamente dal tipo dell'oggetto ricevente. Nei capitoli seguenti verrà spiegato come utilizzare in maniera produttiva questo meccanismo. Ulteriori informazioni sui segnali e gli slot possono essere trovati nella Guida di riferimento della libreria KDE e nella documentazione Qt di riferimento. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-it/docs/tdevelop/kdearch/index.docbook b/tde-i18n-it/docs/tdevelop/kdearch/index.docbook index e31dd2246d2..c22c7407a50 100644 --- a/tde-i18n-it/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-it/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc Il codice C++ corrispondente è: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-nl/docs/tdebase/ksplashml/index.docbook b/tde-i18n-nl/docs/tdebase/ksplashml/index.docbook index 9a2091f9dca..2186a46347b 100644 --- a/tde-i18n-nl/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-nl/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-pl/docs/tdebase/ksplashml/index.docbook b/tde-i18n-pl/docs/tdebase/ksplashml/index.docbook index cedf116b366..91b96604720 100644 --- a/tde-i18n-pl/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-pl/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-pt/docs/tdebase/ksplashml/index.docbook b/tde-i18n-pt/docs/tdebase/ksplashml/index.docbook index f2a22d9c862..27143990eaf 100644 --- a/tde-i18n-pt/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-pt/docs/tdebase/ksplashml/index.docbook @@ -983,7 +983,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-pt/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-pt/docs/tdevelop/kde_app_devel/index.docbook index 647f8662dba..976c60a11fc 100644 --- a/tde-i18n-pt/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-pt/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ ola.resize( 100, 30 ); a.setMainWidget( &ola ); -connect(&ola, SIGNAL( clicked() ), &a, SLOT( quit() )); +connect(&ola, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); ola.show(); return a.exec(); } -Como vê, a única adição para dar ao botão mais interacção é usar um método connect() : o connect(&ola, SIGNAL( clicked() ), &a, SLOT( quit() )); é tudo o que você tem para adicionar. Qual é o significado? A declaração da classe do TQObject fala sobre o método connect(): +Como vê, a única adição para dar ao botão mais interacção é usar um método connect() : o connect(&ola, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); é tudo o que você tem para adicionar. Qual é o significado? A declaração da classe do TQObject fala sobre o método connect(): bool connect ( const TQObject * emissor, const char * signal, const TQObject * receptor, const char * membro ) Isto significa que você terá de indicar um ponteiro para uma instância de um TQObject que é o emissor do 'signal', o que significa que ele poderá emitir este 'signal' como primeiro parâmetro; depois, terá de indicar o 'signal' a que se deseja ligar. Os últimos dois parâmetros são o objecto receptor que contém um 'slot' seguido da função-membro que é, de facto, o 'slot' que será executado devido à emissão do 'signal'. Usando os 'signals' e 'slots', os objectos do seu programa podem interagir uns com os outros facilmente sem terem de explicitamente depender do tipo do objecto receptor. Você irá aprender mais sobre a utilização deste mecanismo para uma utilização produtiva posteriormente neste manual. Se quiser saber mais informações sobre o mecanismo de 'signals'/'slots' poderá ir ao Guia de Referência da Biblioteca do KDE e à referência 'online' do Qt. @@ -304,7 +304,7 @@ ola.resize( 100, 30 ); a.setTopWidget( &ola ); -connect(&ola, SIGNAL( clicked() ), &a, SLOT( quit() )); +connect(&ola, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); ola.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // permitir à vista mudar a barra de estado e o título -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-pt/docs/tdevelop/kdearch/index.docbook b/tde-i18n-pt/docs/tdevelop/kdearch/index.docbook index 61b55bd11bd..20e666ebcd4 100644 --- a/tde-i18n-pt/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-pt/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc A componente correspondente da configuração em C++ é: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1401,8 +1401,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *tarefa = TDEIO::mimetype(url); - connect( tarefa, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( tarefa, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void ClasseXpto::resultadoMime(TDEIO::Job *tarefa) @@ -1508,8 +1508,8 @@ new KRun(url); void ClasseXpto::criarDirectoria() { SimpleJob *tarefa = TDEIO::mkdir(KURL("file:/home/ze/dir_tdeio")); - connect( tarefa, SIGNAL(result(TDEIO::Job*)), - this, SLOT(resultadoMkdir(TDEIO::Job*)) ); + connect( tarefa, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(resultadoMkdir(TDEIO::Job*)) ); } void ClasseXpto::resultadoMkdir(TDEIO::Job *tarefa) @@ -1693,8 +1693,8 @@ if (TDEIO::NetAccess::download(url, ficheiroTemporario) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *tarefa = TDEIO::get(url, true, false); - connect( tarefa, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferirResultado(TDEIO::Job*)) ); + connect( tarefa, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferirResultado(TDEIO::Job*)) ); } void ClasseXpto::transferirResultado(TDEIO::Job *tarefa) diff --git a/tde-i18n-pt_BR/docs/tdebase/ksplashml/index.docbook b/tde-i18n-pt_BR/docs/tdebase/ksplashml/index.docbook index 1ba7777c34b..187cc396517 100644 --- a/tde-i18n-pt_BR/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-pt_BR/docs/tdebase/ksplashml/index.docbook @@ -983,7 +983,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-ru/docs/tdebase/ksplashml/index.docbook b/tde-i18n-ru/docs/tdebase/ksplashml/index.docbook index 1c5e9be3d81..f5f213aada1 100644 --- a/tde-i18n-ru/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-ru/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-ru/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-ru/docs/tdevelop/kde_app_devel/index.docbook index 9a4f4528483..6b3ad2c5741 100644 --- a/tde-i18n-ru/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-ru/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Как видите, мы лишь расширили возможности кнопки с использованием метода connect(): connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )) — всё, что мы добавили. Что же это означает? Объявление метода connect() в классе TQObject: +Как видите, мы лишь расширили возможности кнопки с использованием метода connect(): connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )) — всё, что мы добавили. Что же это означает? Объявление метода connect() в классе TQObject: bool connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) Это значит, что указатель на экземпляр TQObject является инициатором сигнала, указанного во втором аргументе. Оставшиеся два аргумента есть объект-приёмник, который имеет слот, а затем и имя функции-слота, которая будет выполнена при получении сигнала. С помощью сигналов и слотов, объекты ваших программ могут взаимодействовать друг с другом без явной зависимости от типа объекта-приёмника. Далее в этом руководстве приводится более подробное описание работы механзима сигналов/слотов. Коме этого, о нём можно почитать в The KDE Library Reference Guide и Qt online reference. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-ru/docs/tdevelop/kdearch/index.docbook b/tde-i18n-ru/docs/tdevelop/kdearch/index.docbook index e210ddbaf85..ac8c935df92 100644 --- a/tde-i18n-ru/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-ru/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc Соответствующий код C++: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1693,8 +1693,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) diff --git a/tde-i18n-sv/docs/tdebase/ksplashml/index.docbook b/tde-i18n-sv/docs/tdebase/ksplashml/index.docbook index 3fbcef05eaf..1197aa0db03 100644 --- a/tde-i18n-sv/docs/tdebase/ksplashml/index.docbook +++ b/tde-i18n-sv/docs/tdebase/ksplashml/index.docbook @@ -990,7 +990,7 @@ c2, int sp ) preparePixmap( i ); m_stepTimer = new QTimer( this ); - connect(m_stepTimer, SIGNAL(timeout()), this, SLOT(stepEvent())); + connect(m_stepTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(stepEvent())); m_stepTimer->start( 50 ); } diff --git a/tde-i18n-sv/docs/tdevelop/kde_app_devel/index.docbook b/tde-i18n-sv/docs/tdevelop/kde_app_devel/index.docbook index 23d41f5376e..ca11e751e23 100644 --- a/tde-i18n-sv/docs/tdevelop/kde_app_devel/index.docbook +++ b/tde-i18n-sv/docs/tdevelop/kde_app_devel/index.docbook @@ -255,14 +255,14 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); } -Du märker att allt du måste lägga till för att ge knappen mer kommunikation är metoden connect(): connect (&hello, SIGNAL( clicked() ), &a, SLOT( quit() ));. Vad är betydelsen nu? Klassdeklarationen av TQObject säger följande om metoden connect(): +Du märker att allt du måste lägga till för att ge knappen mer kommunikation är metoden connect(): connect (&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() ));. Vad är betydelsen nu? Klassdeklarationen av TQObject säger följande om metoden connect(): bool connect ( const TQObject * avsändare, const char * signal, const TQObject * mottagare, const char * medlem ) Detta betyder att du måste ange en TQObject-instanspekare som är signalens avsändare, vilket betyder att den kan skicka signalen, som första parameter. Därefter måste du ange signalen som du vill ansluta till. De två sista parametrarna är mottagarobjektet som tillhandahåller en slot, följt av medlemsfunktionen som är en verklig slot som kommer att köras när signalen skickas. Genom att använda signaler och slots, kan programmets objekt enkelt kommunicera med varandra utan att uttryckligen bero på typen hos mottagarobjektet. Du får lära dig mer om hur den här mekanismen används produktivt senare i handboken. Mer information om signal/slot-mekanismen finns också i KDE:s biblioteksreferensguide och QT:s direktreferens. @@ -304,7 +304,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, TQ_SIGNAL( clicked() ), &a, TQ_SLOT( quit() )); hello.show(); return a.exec(); @@ -549,10 +549,10 @@ return a.exec(); 16 statusBar()->show(); 17 18 // tillåt vyn att ändra statusraden och rubriken -19 connect(m_view, SIGNAL(signalChangeStatusbar(const TQString&)), -20 this, SLOT(changeStatusbar(const TQString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const TQString&)), -22 this, SLOT(changeCaption(const TQString&))); +19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&)), +20 this, TQ_SLOT(changeStatusbar(const TQString&))); +21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&)), +22 this, TQ_SLOT(changeCaption(const TQString&))); 23 24 } diff --git a/tde-i18n-sv/docs/tdevelop/kdearch/index.docbook b/tde-i18n-sv/docs/tdevelop/kdearch/index.docbook index 77f72f7ac92..ab89916bd99 100644 --- a/tde-i18n-sv/docs/tdevelop/kdearch/index.docbook +++ b/tde-i18n-sv/docs/tdevelop/kdearch/index.docbook @@ -881,23 +881,23 @@ rc_DATA = kviewui.rc Motsvarande del av att skapa detta i C++ är: -KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); +KStdAction::zoomIn ( this, TQ_SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, TQ_SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, TQ_SLOT(slotZoom()), actionCollection() ); new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), + this, TQ_SLOT(slotHalfSize()), actionCollection(), "zoom50" ); new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom100" ); new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), + this, TQ_SLOT(slotDoubleSize()), actionCollection(), "zoom200" ); new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), + this, TQ_SLOT(slotFillScreen()), actionCollection(), "zoomMaxpect" ); new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), + this, TQ_SLOT(slotFullScreen()), actionCollection(), "fullscreen" ); @@ -1400,8 +1400,8 @@ else { KURL url("http://developer.kde.org/favicon.ico"); TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mimeResult(TDEIO::Job*)) ); } void FooClass::mimeResult(TDEIO::Job *job) @@ -1507,8 +1507,8 @@ new KRun(url); void FooClass::makeDirectory() { SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/kiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(mkdirResult(TDEIO::Job*)) ); } void FooClass::mkdirResult(TDEIO::Job *job) @@ -1692,8 +1692,8 @@ if (TDEIO::NetAccess::download(url, tempFile) { { KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); + connect( job, TQ_SIGNAL(result(TDEIO::Job*)), + this, TQ_SLOT(transferResult(TDEIO::Job*)) ); } void FooClass::transferResult(TDEIO::Job *job) -- cgit v1.2.1