diff options
author | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-03 22:23:44 -0600 |
commit | 203ba231d0276943aae36111f9ec1e949f3c6a4c (patch) | |
tree | f039f7a5b5fc2da88a96876971bac580d87f6788 /doc/signal.html | |
parent | fd35f4a8382b7d223bc0325b9ca3f88515778aa0 (diff) | |
download | pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.tar.gz pytde-203ba231d0276943aae36111f9ec1e949f3c6a4c.zip |
Initial TQt conversion
Diffstat (limited to 'doc/signal.html')
-rw-r--r-- | doc/signal.html | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/doc/signal.html b/doc/signal.html index ab5b3f9..76599e6 100644 --- a/doc/signal.html +++ b/doc/signal.html @@ -76,7 +76,7 @@ NAME="AEN83" ></A >General Signals and Slots</H2 ><P ->A signal may be either a Qt signal (specified using +>A signal may be either a TQt signal (specified using <TT CLASS="LITERAL" >SIGNAL()</TT @@ -86,7 +86,7 @@ CLASS="LITERAL" >PYSIGNAL()</TT >).</P ><P ->A slot can be either a Python callable object, a Qt signal (specified using +>A slot can be either a Python callable object, a TQt signal (specified using <TT CLASS="LITERAL" >SIGNAL()</TT @@ -94,7 +94,7 @@ CLASS="LITERAL" <TT CLASS="LITERAL" >PYSIGNAL()</TT ->), or a Qt slot (specified using +>), or a TQt slot (specified using <TT CLASS="LITERAL" >SLOT()</TT @@ -110,20 +110,20 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->QObject.connect(a,SIGNAL("QtSig()"),pyFunction) -QObject.connect(a,SIGNAL("QtSig()"),pyClass.pyMethod) -QObject.connect(a,SIGNAL("QtSig()"),PYSIGNAL("PySig")) -QObject.connect(a,SIGNAL("QtSig()"),SLOT("QtSlot()")) -QObject.connect(a,PYSIGNAL("PySig"),pyFunction) -QObject.connect(a,PYSIGNAL("PySig"),pyClass.pyMethod) -QObject.connect(a,PYSIGNAL("PySig"),SIGNAL("QtSig()")) -QObject.connect(a,PYSIGNAL("PySig"),SLOT("QtSlot()"))</PRE +>TQObject.connect(a,SIGNAL("TQtSig()"),pyFunction) +TQObject.connect(a,SIGNAL("TQtSig()"),pyClass.pyMethod) +TQObject.connect(a,SIGNAL("TQtSig()"),PYSIGNAL("PySig")) +TQObject.connect(a,SIGNAL("TQtSig()"),SLOT("TQtSlot()")) +TQObject.connect(a,PYSIGNAL("PySig"),pyFunction) +TQObject.connect(a,PYSIGNAL("PySig"),pyClass.pyMethod) +TQObject.connect(a,PYSIGNAL("PySig"),SIGNAL("TQtSig()")) +TQObject.connect(a,PYSIGNAL("PySig"),SLOT("TQtSlot()"))</PRE ></TD ></TR ></TABLE ><P ->When a slot is a Python method that corresponds to a Qt slot then a signal can -be connected to either the Python method or the Qt slot. The following +>When a slot is a Python method that corresponds to a TQt slot then a signal can +be connected to either the Python method or the TQt slot. The following connections achieve the same effect.</P ><TABLE BORDER="0" @@ -133,11 +133,11 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->sbar = QScrollBar() -lcd = QLCDNumber() +>sbar = TQScrollBar() +lcd = TQLCDNumber() -QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd.display) -QObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd,SLOT("display(int)"))</PRE +TQObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd.display) +TQObject.connect(sbar,SIGNAL("valueChanged(int)"),lcd,SLOT("display(int)"))</PRE ></TD ></TR ></TABLE @@ -149,13 +149,13 @@ more efficient.</P ><P >Any instance of a class that is derived from the <TT CLASS="LITERAL" ->QObject</TT +>TQObject</TT > class can emit a signal using the <TT CLASS="LITERAL" >emit</TT > method. This takes -two arguments. The first is the Python or Qt signal, the second is a Python +two arguments. The first is the Python or TQt signal, the second is a Python tuple which are the arguments to the signal. For example:</P ><TABLE BORDER="0" @@ -171,8 +171,8 @@ a.emit(PYSIGNAL("pySig"),("Hello","World"))</PRE ></TR ></TABLE ><P ->Qt allows a signal to be connected to a slot that requires fewer arguments than -the signal passes. The extra arguments are quietly discarded. Python slots +>TQt allows a signal to be connected to a slot that retquires fewer arguments than +the signal passes. The extra arguments are tquietly discarded. Python slots can be used in the same way.</P ></DIV ><DIV @@ -193,18 +193,18 @@ WIDTH="100%" ><TD ><PRE CLASS="PROGRAMLISTING" ->int QMenuData::insertItem (const QString & text, - const QObject * receiver, const char * member, +>int TQMenuData::insertItem (const TQString & text, + const TQObject * receiver, const char * member, int accel = 0, int id = -1, int index = -1 ) -KAction ( const QString& text, int accel, - const QObject* receiver, const char* slot, - QObject* parent, const char* name = 0 )</PRE +KAction ( const TQString& text, int accel, + const TQObject* receiver, const char* slot, + TQObject* parent, const char* name = 0 )</PRE ></TD ></TR ></TABLE ><P ->Notice the "const QObject* receiver, const char* slot" parameters for each declaration.</P +>Notice the "const TQObject* receiver, const char* slot" parameters for each declaration.</P ><P >In PyKDE, these two parameters are replaced with a SINGLE parameter that specifies the slot to be connected to the menu item, toolbar button or KAction:</P |