summaryrefslogtreecommitdiffstats
path: root/doc/html/tutorial2-09.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/tutorial2-09.html')
-rw-r--r--doc/html/tutorial2-09.html118
1 files changed, 59 insertions, 59 deletions
diff --git a/doc/html/tutorial2-09.html b/doc/html/tutorial2-09.html
index a8c5586d..52f6678d 100644
--- a/doc/html/tutorial2-09.html
+++ b/doc/html/tutorial2-09.html
@@ -39,30 +39,30 @@ apply to all data sets in one place.
<p> (Extracts from <tt>optionsform.h</tt>.)
<p>
-<pre> class OptionsForm : public <a href="qdialog.html">TQDialog</a>
+<pre> class OptionsForm : public <a href="ntqdialog.html">TQDialog</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- OptionsForm( <a href="qwidget.html">TQWidget</a>* parent = 0, const char* name = "options form",
+ OptionsForm( <a href="ntqwidget.html">TQWidget</a>* parent = 0, const char* name = "options form",
bool modal = FALSE, WFlags f = 0 );
~OptionsForm() {}
- <a href="qfont.html">TQFont</a> font() const { return m_font; }
- void setFont( <a href="qfont.html">TQFont</a> font );
-
- <a href="qlabel.html">TQLabel</a> *chartTypeTextLabel;
- <a href="qcombobox.html">TQComboBox</a> *chartTypeComboBox;
- <a href="qpushbutton.html">TQPushButton</a> *fontPushButton;
- <a href="qlabel.html">TQLabel</a> *fontTextLabel;
- <a href="qframe.html">TQFrame</a> *addValuesFrame;
- <a href="qbuttongroup.html">TQButtonGroup</a> *addValuesButtonGroup;
- <a href="qradiobutton.html">TQRadioButton</a> *noRadioButton;
- <a href="qradiobutton.html">TQRadioButton</a> *yesRadioButton;
- <a href="qradiobutton.html">TQRadioButton</a> *asPercentageRadioButton;
- <a href="qlabel.html">TQLabel</a> *decimalPlacesTextLabel;
- <a href="qspinbox.html">TQSpinBox</a> *decimalPlacesSpinBox;
- <a href="qpushbutton.html">TQPushButton</a> *okPushButton;
- <a href="qpushbutton.html">TQPushButton</a> *cancelPushButton;
+ <a href="ntqfont.html">TQFont</a> font() const { return m_font; }
+ void setFont( <a href="ntqfont.html">TQFont</a> font );
+
+ <a href="ntqlabel.html">TQLabel</a> *chartTypeTextLabel;
+ <a href="ntqcombobox.html">TQComboBox</a> *chartTypeComboBox;
+ <a href="ntqpushbutton.html">TQPushButton</a> *fontPushButton;
+ <a href="ntqlabel.html">TQLabel</a> *fontTextLabel;
+ <a href="ntqframe.html">TQFrame</a> *addValuesFrame;
+ <a href="ntqbuttongroup.html">TQButtonGroup</a> *addValuesButtonGroup;
+ <a href="ntqradiobutton.html">TQRadioButton</a> *noRadioButton;
+ <a href="ntqradiobutton.html">TQRadioButton</a> *yesRadioButton;
+ <a href="ntqradiobutton.html">TQRadioButton</a> *asPercentageRadioButton;
+ <a href="ntqlabel.html">TQLabel</a> *decimalPlacesTextLabel;
+ <a href="ntqspinbox.html">TQSpinBox</a> *decimalPlacesSpinBox;
+ <a href="ntqpushbutton.html">TQPushButton</a> *okPushButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> *cancelPushButton;
protected slots:
void chooseFont();
@@ -77,7 +77,7 @@ apply to all data sets in one place.
<a href="qhboxlayout.html">TQHBoxLayout</a> *buttonsLayout;
private:
- <a href="qfont.html">TQFont</a> m_font;
+ <a href="ntqfont.html">TQFont</a> m_font;
};
</pre>
<p> The layout of this dialog is slightly more complicated than for the
@@ -95,14 +95,14 @@ things based on the changes the user makes.
<p> We include some some pixmaps to use in the chart type combobox.
<p> <h2> The Constructor
</h2>
-<a name="1"></a><p> <pre> OptionsForm::OptionsForm( <a href="qwidget.html">TQWidget</a>* parent, const char* name,
+<a name="1"></a><p> <pre> OptionsForm::OptionsForm( <a href="ntqwidget.html">TQWidget</a>* parent, const char* name,
bool modal, WFlags f )
- : <a href="qdialog.html">TQDialog</a>( parent, name, modal, f )
+ : <a href="ntqdialog.html">TQDialog</a>( parent, name, modal, f )
{
- <a href="qwidget.html#setCaption">setCaption</a>( "Chart -- Options" );
- <a href="qwidget.html#resize">resize</a>( 320, 290 );
+ <a href="ntqwidget.html#setCaption">setCaption</a>( "Chart -- Options" );
+ <a href="ntqwidget.html#resize">resize</a>( 320, 290 );
</pre>
-<p> We pass all the arguments on to the <a href="qdialog.html">TQDialog</a> constructor, set a caption
+<p> We pass all the arguments on to the <a href="ntqdialog.html">TQDialog</a> constructor, set a caption
and set an initial size.
<p> The layout of the form will be to have the chart type label and combo
box in a horizontal box layout, and similarly for the font button and
@@ -117,14 +117,14 @@ vertical box layout.
<p> <pre> chartTypeLayout = new <a href="qhboxlayout.html">TQHBoxLayout</a>( 0, 0, 6 );
</pre>
<p> The chart type label and combobox will be laid out side by side.
-<p> <pre> chartTypeTextLabel = new <a href="qlabel.html">TQLabel</a>( "&amp;Chart Type", this );
+<p> <pre> chartTypeTextLabel = new <a href="ntqlabel.html">TQLabel</a>( "&amp;Chart Type", this );
<a name="x2631"></a> chartTypeLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( chartTypeTextLabel );
- chartTypeComboBox = new <a href="qcombobox.html">TQComboBox</a>( FALSE, this );
- <a name="x2633"></a> chartTypeComboBox-&gt;<a href="qcombobox.html#insertItem">insertItem</a>( TQPixmap( options_piechart ), "Pie Chart" );
- chartTypeComboBox-&gt;<a href="qcombobox.html#insertItem">insertItem</a>( TQPixmap( options_verticalbarchart ),
+ chartTypeComboBox = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, this );
+ <a name="x2633"></a> chartTypeComboBox-&gt;<a href="ntqcombobox.html#insertItem">insertItem</a>( TQPixmap( options_piechart ), "Pie Chart" );
+ chartTypeComboBox-&gt;<a href="ntqcombobox.html#insertItem">insertItem</a>( TQPixmap( options_verticalbarchart ),
"Vertical Bar Chart" );
- chartTypeComboBox-&gt;<a href="qcombobox.html#insertItem">insertItem</a>( TQPixmap( options_horizontalbarchart ),
+ chartTypeComboBox-&gt;<a href="ntqcombobox.html#insertItem">insertItem</a>( TQPixmap( options_horizontalbarchart ),
"Horizontal Bar Chart" );
chartTypeLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( chartTypeComboBox );
<a name="x2630"></a> optionsFormLayout-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( chartTypeLayout );
@@ -136,14 +136,14 @@ to the horizontal layout and add the horizontal layout to the form's
vertical layout.
<p> <pre> fontLayout = new <a href="qhboxlayout.html">TQHBoxLayout</a>( 0, 0, 6 );
- fontPushButton = new <a href="qpushbutton.html">TQPushButton</a>( "&amp;Font...", this );
+ fontPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "&amp;Font...", this );
fontLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( fontPushButton );
<a href="qspaceritem.html">TQSpacerItem</a>* spacer = new <a href="qspaceritem.html">TQSpacerItem</a>( 0, 0,
TQSizePolicy::Expanding,
TQSizePolicy::Minimum );
<a name="x2629"></a> fontLayout-&gt;<a href="qboxlayout.html#addItem">addItem</a>( spacer );
- fontTextLabel = new <a href="qlabel.html">TQLabel</a>( this ); // Must be set by caller via setFont()
+ fontTextLabel = new <a href="ntqlabel.html">TQLabel</a>( this ); // Must be set by caller via setFont()
fontLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( fontTextLabel );
optionsFormLayout-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( fontLayout );
</pre>
@@ -151,27 +151,27 @@ vertical layout.
label. The font button is straight-forward. We add a spacer to improve
the appearance. The font text label is initially empty (since we don't
know what font the user is using).
-<p> <pre> addValuesFrame = new <a href="qframe.html">TQFrame</a>( this );
- <a name="x2640"></a> addValuesFrame-&gt;<a href="qframe.html#setFrameShape">setFrameShape</a>( TQFrame::StyledPanel );
- <a name="x2639"></a> addValuesFrame-&gt;<a href="qframe.html#setFrameShadow">setFrameShadow</a>( TQFrame::Sunken );
+<p> <pre> addValuesFrame = new <a href="ntqframe.html">TQFrame</a>( this );
+ <a name="x2640"></a> addValuesFrame-&gt;<a href="ntqframe.html#setFrameShape">setFrameShape</a>( TQFrame::StyledPanel );
+ <a name="x2639"></a> addValuesFrame-&gt;<a href="ntqframe.html#setFrameShadow">setFrameShadow</a>( TQFrame::Sunken );
addValuesFrameLayout = new <a href="qvboxlayout.html">TQVBoxLayout</a>( addValuesFrame, 11, 6 );
- addValuesButtonGroup = new <a href="qbuttongroup.html">TQButtonGroup</a>( "Show Values", addValuesFrame );
- <a name="x2641"></a> addValuesButtonGroup-&gt;<a href="qgroupbox.html#setColumnLayout">setColumnLayout</a>(0, TQt::Vertical );
- <a name="x2647"></a> addValuesButtonGroup-&gt;<a href="qwidget.html#layout">layout</a>()-&gt;setSpacing( 6 );
- addValuesButtonGroup-&gt;<a href="qwidget.html#layout">layout</a>()-&gt;setMargin( 11 );
+ addValuesButtonGroup = new <a href="ntqbuttongroup.html">TQButtonGroup</a>( "Show Values", addValuesFrame );
+ <a name="x2641"></a> addValuesButtonGroup-&gt;<a href="ntqgroupbox.html#setColumnLayout">setColumnLayout</a>(0, TQt::Vertical );
+ <a name="x2647"></a> addValuesButtonGroup-&gt;<a href="ntqwidget.html#layout">layout</a>()-&gt;setSpacing( 6 );
+ addValuesButtonGroup-&gt;<a href="ntqwidget.html#layout">layout</a>()-&gt;setMargin( 11 );
addValuesButtonGroupLayout = new <a href="qvboxlayout.html">TQVBoxLayout</a>(
- addValuesButtonGroup-&gt;<a href="qwidget.html#layout">layout</a>() );
+ addValuesButtonGroup-&gt;<a href="ntqwidget.html#layout">layout</a>() );
<a name="x2644"></a> addValuesButtonGroupLayout-&gt;<a href="qlayoutitem.html#setAlignment">setAlignment</a>( TQt::AlignTop );
- noRadioButton = new <a href="qradiobutton.html">TQRadioButton</a>( "&amp;No", addValuesButtonGroup );
- <a name="x2645"></a> noRadioButton-&gt;<a href="qradiobutton.html#setChecked">setChecked</a>( TRUE );
+ noRadioButton = new <a href="ntqradiobutton.html">TQRadioButton</a>( "&amp;No", addValuesButtonGroup );
+ <a name="x2645"></a> noRadioButton-&gt;<a href="ntqradiobutton.html#setChecked">setChecked</a>( TRUE );
addValuesButtonGroupLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( noRadioButton );
- yesRadioButton = new <a href="qradiobutton.html">TQRadioButton</a>( "&amp;Yes", addValuesButtonGroup );
+ yesRadioButton = new <a href="ntqradiobutton.html">TQRadioButton</a>( "&amp;Yes", addValuesButtonGroup );
addValuesButtonGroupLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( yesRadioButton );
- asPercentageRadioButton = new <a href="qradiobutton.html">TQRadioButton</a>( "As &amp;Percentage",
+ asPercentageRadioButton = new <a href="ntqradiobutton.html">TQRadioButton</a>( "As &amp;Percentage",
addValuesButtonGroup );
addValuesButtonGroupLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( asPercentageRadioButton );
addValuesFrameLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( addValuesButtonGroup );
@@ -185,21 +185,21 @@ create the radio buttons, making "No" the default.
<p> The decimal places label and spin box are laid out just like the other
horizontal layouts, and the buttons are laid out in a very similar way
to the buttons in the set data form.
-<p> <pre> <a href="qobject.html#connect">connect</a>( fontPushButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( chooseFont() ) );
- <a href="qobject.html#connect">connect</a>( okPushButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( <a href="qdialog.html#accept">accept</a>() ) );
- <a href="qobject.html#connect">connect</a>( cancelPushButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( <a href="qdialog.html#reject">reject</a>() ) );
+<p> <pre> <a href="ntqobject.html#connect">connect</a>( fontPushButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( chooseFont() ) );
+ <a href="ntqobject.html#connect">connect</a>( okPushButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( <a href="ntqdialog.html#accept">accept</a>() ) );
+ <a href="ntqobject.html#connect">connect</a>( cancelPushButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( <a href="ntqdialog.html#reject">reject</a>() ) );
</pre>
<p> We only need three connections:
<ol type=1>
<li> When the user clicks the font button we execute our own
chooseFont() slot.
-<li> If the user clicks OK we call <a href="qdialog.html#accept">TQDialog::accept</a>(); it is up to the
+<li> If the user clicks OK we call <a href="ntqdialog.html#accept">TQDialog::accept</a>(); it is up to the
caller to read the data from the dialog's widgets and perform any
necessary actions.
-<li> If the user clicks Cancel we call <a href="qdialog.html#reject">TQDialog::reject</a>().
+<li> If the user clicks Cancel we call <a href="ntqdialog.html#reject">TQDialog::reject</a>().
</ol>
-<p> <pre> <a name="x2642"></a> chartTypeTextLabel-&gt;<a href="qlabel.html#setBuddy">setBuddy</a>( chartTypeComboBox );
- decimalPlacesTextLabel-&gt;<a href="qlabel.html#setBuddy">setBuddy</a>( decimalPlacesSpinBox );
+<p> <pre> <a name="x2642"></a> chartTypeTextLabel-&gt;<a href="ntqlabel.html#setBuddy">setBuddy</a>( chartTypeComboBox );
+ decimalPlacesTextLabel-&gt;<a href="ntqlabel.html#setBuddy">setBuddy</a>( decimalPlacesSpinBox );
</pre>
<p> We use the setBuddy() function to associate widgets with label
accelerators.
@@ -208,24 +208,24 @@ accelerators.
<a name="2"></a><p> <pre> void OptionsForm::chooseFont()
{
bool ok;
- <a name="x2638"></a> <a href="qfont.html">TQFont</a> font = TQFontDialog::<a href="qfontdialog.html#getFont">getFont</a>( &amp;ok, m_font, this );
+ <a name="x2638"></a> <a href="ntqfont.html">TQFont</a> font = TQFontDialog::<a href="ntqfontdialog.html#getFont">getFont</a>( &amp;ok, m_font, this );
if ( ok )
- <a href="qwidget.html#setFont">setFont</a>( font );
+ <a href="ntqwidget.html#setFont">setFont</a>( font );
}
</pre>
<p> When the user clicks the Font button this slot is invoked. It simply
-calls the static <a href="qfontdialog.html#getFont">TQFontDialog::getFont</a>() function to obtain the user's
+calls the static <a href="ntqfontdialog.html#getFont">TQFontDialog::getFont</a>() function to obtain the user's
choice of font. If they chose a font we call our setFont() slot which
will present a textual description of the font in the font label.
-<p> <pre> void OptionsForm::<a href="qwidget.html#setFont">setFont</a>( <a href="qfont.html">TQFont</a> font )
+<p> <pre> void OptionsForm::<a href="ntqwidget.html#setFont">setFont</a>( <a href="ntqfont.html">TQFont</a> font )
{
- <a name="x2635"></a> <a href="qstring.html">TQString</a> label = font.<a href="qfont.html#family">family</a>() + " " +
- <a name="x2637"></a> TQString::<a href="qstring.html#number">number</a>( font.<a href="qfont.html#pointSize">pointSize</a>() ) + "pt";
- <a name="x2634"></a> if ( font.<a href="qfont.html#bold">bold</a>() )
+ <a name="x2635"></a> <a href="ntqstring.html">TQString</a> label = font.<a href="ntqfont.html#family">family</a>() + " " +
+ <a name="x2637"></a> TQString::<a href="ntqstring.html#number">number</a>( font.<a href="ntqfont.html#pointSize">pointSize</a>() ) + "pt";
+ <a name="x2634"></a> if ( font.<a href="ntqfont.html#bold">bold</a>() )
label += " Bold";
- <a name="x2636"></a> if ( font.<a href="qfont.html#italic">italic</a>() )
+ <a name="x2636"></a> if ( font.<a href="ntqfont.html#italic">italic</a>() )
label += " Italic";
- fontTextLabel-&gt;<a href="qlabel.html#setText">setText</a>( label );
+ fontTextLabel-&gt;<a href="ntqlabel.html#setText">setText</a>( label );
m_font = font;
}
</pre>