diff options
Diffstat (limited to 'doc/html/tutorial2-08.html')
| -rw-r--r-- | doc/html/tutorial2-08.html | 42 | 
1 files changed, 21 insertions, 21 deletions
| diff --git a/doc/html/tutorial2-08.html b/doc/html/tutorial2-08.html index da9766384..6bd21ee6b 100644 --- a/doc/html/tutorial2-08.html +++ b/doc/html/tutorial2-08.html @@ -40,7 +40,7 @@ enter label text and choose a label color for each label.  <p> (Extracts from <tt>setdataform.h</tt>.)  <p>  -<pre>    class SetDataForm: public <a href="ntqdialog.html">TQDialog</a> +<pre>    class SetDataForm: public <a href="tqdialog.html">TQDialog</a>      {          <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a>      public: @@ -60,9 +60,9 @@ enter label text and choose a label color for each label.      private:          <a href="ntqtable.html">TQTable</a> *table; -        <a href="ntqpushbutton.html">TQPushButton</a> *colorPushButton; -        <a href="ntqpushbutton.html">TQPushButton</a> *okPushButton; -        <a href="ntqpushbutton.html">TQPushButton</a> *cancelPushButton; +        <a href="tqpushbutton.html">TQPushButton</a> *colorPushButton; +        <a href="tqpushbutton.html">TQPushButton</a> *okPushButton; +        <a href="tqpushbutton.html">TQPushButton</a> *cancelPushButton;      protected:          <a href="qvboxlayout.html">TQVBoxLayout</a> *tableButtonBox; @@ -90,13 +90,13 @@ TQt supports. We'll use these in the pattern combobox.  <a name="1"></a><p> <pre>    SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,                                <a href="tqwidget.html">TQWidget</a>* parent,  const char* name,                                bool modal, WFlags f ) -        : <a href="ntqdialog.html">TQDialog</a>( parent, name, modal, f ) +        : <a href="tqdialog.html">TQDialog</a>( parent, name, modal, f )      {          m_elements = elements;          m_decimalPlaces = decimalPlaces;  </pre> -<p> We pass most of the arguments to the <a href="ntqdialog.html">TQDialog</a> superclass. We assign the +<p> We pass most of the arguments to the <a href="tqdialog.html">TQDialog</a> superclass. We assign the  elements vector pointer and the number of decimal places to display to  member variables so that they are accessible by all SetDataForm's  member functions. @@ -139,7 +139,7 @@ column and finally add the table to the tableButtonBox layout.  <p> <pre>        buttonBox = new <a href="qhboxlayout.html">TQHBoxLayout</a>( 0, 0, 6, "button box layout" );  </pre>  <p> We create a horizontal box layout to hold the buttons. -<p> <pre>        colorPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>( this, "color button" ); +<p> <pre>        colorPushButton = new <a href="tqpushbutton.html">TQPushButton</a>( this, "color button" );      <a name="x2598"></a>    colorPushButton-><a href="ntqbutton.html#setText">setText</a>( "&Color..." );          colorPushButton-><a href="tqwidget.html#setEnabled">setEnabled</a>( FALSE );          buttonBox-><a href="qboxlayout.html#addWidget">addWidget</a>( colorPushButton ); @@ -153,12 +153,12 @@ on a color cell.  </pre>  <p> Since we want to separate the color button from the OK and Cancel  buttons we next create a spacer and add that to the buttonBox layout. -<p> <pre>        okPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>( this, "ok button" ); +<p> <pre>        okPushButton = new <a href="tqpushbutton.html">TQPushButton</a>( this, "ok button" );          okPushButton-><a href="ntqbutton.html#setText">setText</a>( "OK" ); -    <a name="x2607"></a>    okPushButton-><a href="ntqpushbutton.html#setDefault">setDefault</a>( TRUE ); +    <a name="x2607"></a>    okPushButton-><a href="tqpushbutton.html#setDefault">setDefault</a>( TRUE );          buttonBox-><a href="qboxlayout.html#addWidget">addWidget</a>( okPushButton ); -        cancelPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>( this, "cancel button" ); +        cancelPushButton = new <a href="tqpushbutton.html">TQPushButton</a>( this, "cancel button" );          cancelPushButton-><a href="ntqbutton.html#setText">setText</a>( "Cancel" );      <a name="x2597"></a>    cancelPushButton-><a href="ntqbutton.html#setAccel">setAccel</a>( Key_Escape );          buttonBox-><a href="qboxlayout.html#addWidget">addWidget</a>( cancelPushButton ); @@ -177,8 +177,8 @@ complete.      <a name="x2626"></a>    <a href="tqobject.html#connect">connect</a>( table, TQ_SIGNAL( <a href="ntqtable.html#valueChanged">valueChanged</a>(int,int) ),                   this, TQ_SLOT( valueChanged(int,int) ) );      <a name="x2596"></a>    <a href="tqobject.html#connect">connect</a>( colorPushButton, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( setColor() ) ); -        <a href="tqobject.html#connect">connect</a>( okPushButton, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( <a href="ntqdialog.html#accept">accept</a>() ) ); -        <a href="tqobject.html#connect">connect</a>( cancelPushButton, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( <a href="ntqdialog.html#reject">reject</a>() ) ); +        <a href="tqobject.html#connect">connect</a>( okPushButton, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( <a href="tqdialog.html#accept">accept</a>() ) ); +        <a href="tqobject.html#connect">connect</a>( cancelPushButton, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( <a href="tqdialog.html#reject">reject</a>() ) );  </pre>  <p> We now "wire up" the form.   <ul> @@ -194,7 +194,7 @@ correct number of decimal places.  <li> If the user clicks the Color button we call a setColor() slot.  <li> The OK button is connected to the accept() slot; we will update the  elements vector in this slot. -<li> The Cancel button is connected to the <a href="ntqdialog.html">TQDialog</a> reject() slot, and +<li> The Cancel button is connected to the <a href="tqdialog.html">TQDialog</a> reject() slot, and  requires no further code or action on our part.  </ul>  <p> <pre>        TQPixmap patterns[MAX_PATTERNS]; @@ -221,10 +221,10 @@ create a blank pixmap of that size.              table-><a href="ntqtable.html#setPixmap">setPixmap</a>( i, 1, pix );              table-><a href="ntqtable.html#setText">setText</a>( i, 1, color.<a href="tqcolor.html#name">name</a>() ); -            <a href="ntqcombobox.html">TQComboBox</a> *combobox = new <a href="ntqcombobox.html">TQComboBox</a>; +            <a href="tqcombobox.html">TQComboBox</a> *combobox = new <a href="tqcombobox.html">TQComboBox</a>;              for ( int j = 0; j < MAX_PATTERNS; ++j ) -                combobox-><a href="ntqcombobox.html#insertItem">insertItem</a>( patterns[j] ); -    <a name="x2603"></a>        combobox-><a href="ntqcombobox.html#setCurrentItem">setCurrentItem</a>( element.valuePattern() - 1 ); +                combobox-><a href="tqcombobox.html#insertItem">insertItem</a>( patterns[j] ); +    <a name="x2603"></a>        combobox-><a href="tqcombobox.html#setCurrentItem">setCurrentItem</a>( element.valuePattern() - 1 );      <a name="x2618"></a>        table-><a href="ntqtable.html#setCellWidget">setCellWidget</a>( i, 2, combobox );              table-><a href="ntqtable.html#setText">setText</a>( i, 3, element.label() ); @@ -246,9 +246,9 @@ CanvasText subclass) and store the color there. But we've taken a  simpler route: we set the cell's text to the name of the color.  <p> Next we populate the pattern combobox with the patterns. We will use  the position of the chosen pattern in the combobox to determine which -pattern the user has selected. <a href="ntqtable.html">TQTable</a> can make use of <a href="qcombotableitem.html">TQComboTableItem</a> +pattern the user has selected. <a href="ntqtable.html">TQTable</a> can make use of <a href="tqcombotableitem.html">TQComboTableItem</a>  items; but these only support text, so we use setCellWidget() to -insert <a href="ntqcombobox.html">TQComboBox</a>'s into the table instead. +insert <a href="tqcombobox.html">TQComboBox</a>'s into the table instead.  <p> Next we insert the element's label. Finally we set the label color in  the same way as we set the value color.  <p> <h2> The Slots @@ -305,7 +305,7 @@ function and put the focus back into the table.  the static <a href="tqcolordialog.html#getColor">TQColorDialog::getColor</a>() dialog to get the user's choice of  color. If they chose a color we fill the color cell's pixmap with that  color and set the cell's text to the new color's name. -<p> <pre>    <a name="x2604"></a>void SetDataForm::<a href="ntqdialog.html#accept">accept</a>() +<p> <pre>    <a name="x2604"></a>void SetDataForm::<a href="tqdialog.html#accept">accept</a>()      {          bool ok;          for ( int i = 0; i < ChartForm::MAX_ELEMENTS; ++i ) { @@ -322,7 +322,7 @@ color and set the cell's text to the new color's name.              element.setLabelColor( TQColor( table-><a href="ntqtable.html#text">text</a>( i, 4 ) ) );          } -        TQDialog::<a href="ntqdialog.html#accept">accept</a>(); +        TQDialog::<a href="tqdialog.html#accept">accept</a>();      }  </pre>  <p> If the user clicks OK we must update the elements vector. We iterate @@ -332,7 +332,7 @@ and the label color by constructing <a href="tqcolor.html">TQColor</a> temporari  color name as argument. The pattern is set to the pattern combobox's  current item with an offset of 1 (since our pattern numbers begin at  1, but the combobox's items are indexed from 0). -<p> Finally we call <a href="ntqdialog.html#accept">TQDialog::accept</a>(). +<p> Finally we call <a href="tqdialog.html#accept">TQDialog::accept</a>().  <p> <p align="right">  <a href="tutorial2-07.html">« File Handling</a> |  <a href="tutorial2.html">Contents</a> | | 
