summaryrefslogtreecommitdiffstats
path: root/doc/tde_app_devel/index.docbook
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tde_app_devel/index.docbook')
-rw-r--r--doc/tde_app_devel/index.docbook60
1 files changed, 30 insertions, 30 deletions
diff --git a/doc/tde_app_devel/index.docbook b/doc/tde_app_devel/index.docbook
index 0149af56..f24131a9 100644
--- a/doc/tde_app_devel/index.docbook
+++ b/doc/tde_app_devel/index.docbook
@@ -305,14 +305,14 @@ But what about the <methodname>show()</methodname> method? Now, you see that lik
This shows you a lot of other widgets that are inherited by <classname>QPushButton</classname>,
which we'll use later to explain the signal/slot mechanism. Anyway, the <methodname>show()</methodname>
method is not listed, therefore, it must be a method that is provided by inheritance as well. The class
-that <classname>QButton</classname> inherits is <classname>QWidget</classname>. Just follow the link
-again, and you will see a whole bunch of methods that the QWidget class provides; including
+that <classname>QButton</classname> inherits is <classname>TQWidget</classname>. Just follow the link
+again, and you will see a whole bunch of methods that the TQWidget class provides; including
the <methodname>show()</methodname> method. Now we understand what was done in the sample with the button:
<orderedlist>
<listitem><para>Create an instance of <classname>QPushButton</classname>, use the second constructor to set the button text</para></listitem>
<listitem><para>Resize the widget to its contents</para></listitem>
<listitem><para>Set the widget as the main widget of the <classname>QApplication</classname> instance a</para></listitem>
-<listitem><para>Tell the widget to display itself on the screen by calling <methodname>show()</methodname>, an inherited method from <classname>QWidget</classname></para></listitem>
+<listitem><para>Tell the widget to display itself on the screen by calling <methodname>show()</methodname>, an inherited method from <classname>TQWidget</classname></para></listitem>
</orderedlist>
</para>
<para>
@@ -327,7 +327,7 @@ user events.
<note><para>
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</para>
+event loop. See the TQWidget class documentation and The TDE Library Reference Guide</para>
</note>
</sect3>
@@ -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
<classname>QApplication</classname> then sends them to the active window as a <classname>QEvent</classname>
and the widgets themselves have to decide what to do with them. A widget receives the event and processes
-<methodname>QWidget::event(QEvent*)</methodname>, which then decides which event has been executed
+<methodname>TQWidget::event(QEvent*)</methodname>, which then decides which event has been executed
and how to react; <methodname>event()</methodname> is therefore the main event handler. Then,
the <methodname>event()</methodname> 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</para>
</para>
<para>
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. <classname>QWidget</classname>
+that you need in your own widgets and specify how your widget has to react. <classname>TQWidget</classname>
also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient
-to know about <classname>QWidget</classname> very well.
+to know about <classname>TQWidget</classname> very well.
</para>
</sect2>
<sect2 id="c1s2s4">
@@ -422,8 +422,8 @@ that can be connected to methods declared as slots. For the C++ part of the prog
some things about this mechanism:
<itemizedlist>
<listitem><para>
-the class declaration of a class using signals/slots has to contain the Q_OBJECT macro at the beginning
-(without a semicolon); and have to be derved from the <classname>QObject</classname> class
+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 <classname>TQObject</classname> class
</para></listitem>
<listitem><para>
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
</itemizedlist>
</para>
<para>
-Another way to use signals without deriving from <classname>QObject</classname> is to use the
+Another way to use signals without deriving from <classname>TQObject</classname> is to use the
<classname>QSignal</classname> class- see the reference documentation for more information and example
-usage. In the following, we assume you're deriving from <classname>QObject</classname>.
+usage. In the following, we assume you're deriving from <classname>TQObject</classname>.
</para>
<para>
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.
</para>
<para>
Now, to connect a signal to a slot, you have to use the <methodname>connect()</methodname> methods that
-are provided by <classname>QObject</classname> or, where available, special methods that objects provide
+are provided by <classname>TQObject</classname> or, where available, special methods that objects provide
to set the connection for a certain signal.
</para>
@@ -479,7 +479,7 @@ hello.resize( 100, 30 );
a.setMainWidget( &amp;hello );
-QObject::connect(&amp;hello, SIGNAL( clicked() ), &amp;a, SLOT( quit() ));
+TQObject::connect(&amp;hello, TQ_SIGNAL( clicked() ), &amp;a, TQ_SLOT( quit() ));
hello.show();
return a.exec();
@@ -488,15 +488,15 @@ return a.exec();
</para>
<para>
You see, the only addition to give the button more interaction is to use a <methodname>connect()
-</methodname> method: <methodname>connect(&amp;hello, SIGNAL( clicked() ), &amp;a, SLOT( quit() ))</methodname>;
-is all you have to add. What is the meaning now? The class declaration of QObject says about the
+</methodname> method: <methodname>connect(&amp;hello, TQ_SIGNAL( clicked() ), &amp;a, TQ_SLOT( quit() ))</methodname>;
+is all you have to add. What is the meaning now? The class declaration of TQObject says about the
<methodname>connect()</methodname> method:
</para>
<para><methodname>
-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 )
</methodname></para>
<para>
-This means you have to specify a <classname>QObject</classname> instance pointer that is the sender
+This means you have to specify a <classname>TQObject</classname> 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( &amp;hello );
-QObject::connect(&amp;hello, SIGNAL( clicked() ), &amp;a, SLOT( quit() ));
+TQObject::connect(&amp;hello, TQ_SIGNAL( clicked() ), &amp;a, TQ_SLOT( quit() ));
hello.show();
return a.exec();
@@ -595,7 +595,7 @@ mentioned before and see the effects.
</para>
<para>
What you should have looked into additionally until now is the reference documentation for Qt,
-especially the <classname>QApplication</classname>, <classname>QWidget</classname> and <classname>QObject
+especially the <classname>QApplication</classname>, <classname>TQWidget</classname> and <classname>TQObject
</classname> class and the tdecore library documentation for the <classname>TDEApplication</classname> class.
The <ulink url="developer.kde.org/documentation/library/libraryref.html">TDE Library Reference handbook</ulink>
also covers a complete description about the invocation of the <classname>QApplication</classname> and
@@ -822,7 +822,7 @@ via &tdevelop;.
<para>
Before the next file (kscribble.cpp, line 29) is compiled, the moc (meta object compiler) is first
invoked on kscribble.h (line 25). This is because KScribble classes use signals/slots, so the
-Q_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is
+TQ_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is
used by kscribble.cpp via an #include statement inside of the file.
</para>
</sect1>
@@ -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&amp;)),
-20 this, SLOT(changeStatusbar(const QString&amp;)));
-21 connect(m_view, SIGNAL(signalChangeCaption(const QString&amp;)),
-22 this, SLOT(changeCaption(const QString&amp;)));
+19 connect(m_view, TQ_SIGNAL(signalChangeStatusbar(const TQString&amp;)),
+20 this, TQ_SLOT(changeStatusbar(const TQString&amp;)));
+21 connect(m_view, TQ_SIGNAL(signalChangeCaption(const TQString&amp;)),
+22 this, TQ_SLOT(changeCaption(const TQString&amp;)));
23
24 }
</programlisting>
@@ -1011,10 +1011,10 @@ a joy if you know how to exploit it's capabilities- inheritance, information hid
already existing code.
</para>
<para>
-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.
</para>
<para>
This chapter therefore describes how to use library widgets for creating views of TDE or
@@ -1080,7 +1080,7 @@ inherit your own widget from <classname>QScrollView</classname> or use an instan
document's view widget.
</para></listitem>
<listitem><para>
-to create a ScrollView yourself, inherit the View widget from <classname>QWidget</classname>
+to create a ScrollView yourself, inherit the View widget from <classname>TQWidget</classname>
and add vertical and horizontal <classname>QScrollBars </classname>.
(This is done by TDE`s TDEHTMLView widget.)
</para></listitem>
@@ -1206,7 +1206,7 @@ such as F1 for accessing online-help, Ctrl+N for New File etc.
</para>
<para>
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 <classname>KKeyChooser</classname>
for use in tab dialogs, whereas <classname>KKeyDialog</classname> 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
</para>
<para>
To add the What's This...? help to one of your widgets, use the static method
-<methodname>QWhatsThis::add(QWidget *widget, const QString &amp;text)</methodname>
+<methodname>QWhatsThis::add(TQWidget *widget, const TQString &amp;text)</methodname>
</para>
</sect1>
</chapter>