From 392b47409ac925384208e3abfdd039f6be47ce56 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 25 Sep 2023 13:57:48 +0900 Subject: Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version Signed-off-by: Michele Calgaro (cherry picked from commit d2728dd8dbad48f045a5eca1899924df15633a89) --- doc/tde_app_devel/index.docbook | 54 ++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'doc/tde_app_devel/index.docbook') diff --git a/doc/tde_app_devel/index.docbook b/doc/tde_app_devel/index.docbook index 24b3b005..4ab2cd22 100644 --- a/doc/tde_app_devel/index.docbook +++ b/doc/tde_app_devel/index.docbook @@ -305,14 +305,14 @@ But what about the show() method? Now, you see that lik This shows you a lot of other widgets that are inherited by QPushButton, which we'll use later to explain the signal/slot mechanism. Anyway, the show() method is not listed, therefore, it must be a method that is provided by inheritance as well. The class -that QButton inherits is QWidget. Just follow the link -again, and you will see a whole bunch of methods that the QWidget class provides; including +that QButton inherits is TQWidget. Just follow the link +again, and you will see a whole bunch of methods that the TQWidget class provides; including the show() method. Now we understand what was done in the sample with the button: Create an instance of QPushButton, use the second constructor to set the button text Resize the widget to its contents Set the widget as the main widget of the QApplication instance a -Tell the widget to display itself on the screen by calling show(), an inherited method from QWidget +Tell the widget to display itself on the screen by calling show(), an inherited method from TQWidget @@ -327,7 +327,7 @@ user events. For already advanced users: The button has no parent declared in the constructor, therefore it is a top-level widget alone and runs in a local event loop which doesn't need to wait for the main -event loop. See the QWidget class documentation and The TDE Library Reference Guide +event loop. See the TQWidget class documentation and The TDE Library Reference Guide @@ -352,7 +352,7 @@ provide methods that detect actions and methods that do something as a reaction The Window system therefore sends all interaction events to the according application. The QApplication then sends them to the active window as a QEvent and the widgets themselves have to decide what to do with them. A widget receives the event and processes -QWidget::event(QEvent*), which then decides which event has been executed +TQWidget::event(QEvent*), which then decides which event has been executed and how to react; event() is therefore the main event handler. Then, the event() method passes the event to so-called event filters that determine what happened and what to do with the event. If no filter signs responsible for the @@ -405,9 +405,9 @@ Window events containing the widget Note that all event functions are virtual and protected; therefore you can re-implement the events -that you need in your own widgets and specify how your widget has to react. QWidget +that you need in your own widgets and specify how your widget has to react. TQWidget also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient -to know about QWidget very well. +to know about TQWidget very well. @@ -423,7 +423,7 @@ some things about this mechanism: the class declaration of a class using signals/slots has to contain the TQ_OBJECT macro at the beginning -(without a semicolon); and have to be derved from the QObject class +(without a semicolon); and have to be derved from the TQObject class a signal can be emitted by the keyword emit, e.g. emit signal(parameters); from within any member function @@ -445,9 +445,9 @@ implementation (which is not necessary to know). The output files of moc are co -Another way to use signals without deriving from QObject is to use the +Another way to use signals without deriving from TQObject is to use the QSignal class- see the reference documentation for more information and example -usage. In the following, we assume you're deriving from QObject. +usage. In the following, we assume you're deriving from TQObject. This way, your class is able to send signals anywhere and to provide slots that signals can connect @@ -457,7 +457,7 @@ as normal methods during implementation. Now, to connect a signal to a slot, you have to use the connect() methods that -are provided by QObject or, where available, special methods that objects provide +are provided by TQObject or, where available, special methods that objects provide to set the connection for a certain signal. @@ -479,7 +479,7 @@ hello.resize( 100, 30 ); a.setMainWidget( &hello ); -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); hello.show(); return a.exec(); @@ -489,14 +489,14 @@ return a.exec(); You see, the only addition to give the button more interaction is to use a connect() method: connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); -is all you have to add. What is the meaning now? The class declaration of QObject says about the +is all you have to add. What is the meaning now? The class declaration of TQObject says about the connect() method: -bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member ) +bool connect ( const TQObject * sender, const char * signal, const TQObject * receiver, const char * member ) -This means you have to specify a QObject instance pointer that is the sender +This means you have to specify a TQObject instance pointer that is the sender of the signal, meaning that it can emit this signal as first parameter; then you have to specify the signal that you want to connect to. The last two parameters are the receiver object that provides a slot, followed by the member function which actually is the slot that will be executed on signal emission. @@ -573,7 +573,7 @@ hello.resize( 100, 30 ); a.setTopWidget( &hello ); -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +TQObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); hello.show(); return a.exec(); @@ -595,7 +595,7 @@ mentioned before and see the effects. What you should have looked into additionally until now is the reference documentation for Qt, -especially the QApplication, QWidget and QObject +especially the QApplication, TQWidget and TQObject class and the tdecore library documentation for the TDEApplication class. The TDE Library Reference handbook also covers a complete description about the invocation of the QApplication and @@ -924,10 +924,10 @@ Let's have a look at the constructor and see how this instance is called 16 statusBar()->show(); 17 18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), -20 this, SLOT(changeStatusbar(const QString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const QString&)), -22 this, SLOT(changeCaption(const QString&))); +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&))); 23 24 } @@ -1011,10 +1011,10 @@ a joy if you know how to exploit it's capabilities- inheritance, information hid already existing code. -When creating a TDE or Qt project, you always have to have a view that inherits QWidget, either by -direct inheritance or because the library widget you want to use inherits QWidget. Therefore, the +When creating a TDE or Qt project, you always have to have a view that inherits TQWidget, either by +direct inheritance or because the library widget you want to use inherits TQWidget. Therefore, the Application Wizard already constructed a view that is an instance of a class yourappView, which -inherits QWidget already. +inherits TQWidget already. This chapter therefore describes how to use library widgets for creating views of TDE or @@ -1080,7 +1080,7 @@ inherit your own widget from QScrollView or use an instan document's view widget. -to create a ScrollView yourself, inherit the View widget from QWidget +to create a ScrollView yourself, inherit the View widget from TQWidget and add vertical and horizontal QScrollBars . (This is done by TDE`s TDEHTMLView widget.) @@ -1206,7 +1206,7 @@ such as F1 for accessing online-help, Ctrl+N for New File etc. If your application contains a lot of accelerators, you should make them configurable -by an Options-menu; either it could be combined with other application configuration in a QWidget +by an Options-menu; either it could be combined with other application configuration in a TQWidget or stand alone. The TDE library already provides a KKeyChooser for use in tab dialogs, whereas KKeyDialog provides a ready-to use key-configuration dialog. @@ -1305,7 +1305,7 @@ a visible widget item and gets a help window. As an exercise, you could try this To add the What's This...? help to one of your widgets, use the static method -QWhatsThis::add(QWidget *widget, const QString &text) +QWhatsThis::add(TQWidget *widget, const TQString &text) -- cgit v1.2.1