diff options
author | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/layout-example.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/layout-example.html')
-rw-r--r-- | doc/html/layout-example.html | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/doc/html/layout-example.html b/doc/html/layout-example.html index bff159fab..a70717757 100644 --- a/doc/html/layout-example.html +++ b/doc/html/layout-example.html @@ -47,49 +47,49 @@ classes, <a href="qgridlayout.html">TQGridLayout</a>, <a href="qboxlayout.html"> ** *****************************************************************************/ -#include <<a href="qapplication-h.html">qapplication.h</a>> -#include <<a href="qlabel-h.html">qlabel.h</a>> -#include <<a href="qcolor-h.html">qcolor.h</a>> -#include <<a href="qpushbutton-h.html">qpushbutton.h</a>> -#include <<a href="qlayout-h.html">qlayout.h</a>> -#include <<a href="qlineedit-h.html">qlineedit.h</a>> -#include <<a href="qmultilineedit-h.html">qmultilineedit.h</a>> -#include <<a href="qmenubar-h.html">qmenubar.h</a>> -#include <<a href="qpopupmenu-h.html">qpopupmenu.h</a>> - -class ExampleWidget : public <a href="qwidget.html">TQWidget</a> +#include <<a href="qapplication-h.html">ntqapplication.h</a>> +#include <<a href="qlabel-h.html">ntqlabel.h</a>> +#include <<a href="qcolor-h.html">ntqcolor.h</a>> +#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> +#include <<a href="qlayout-h.html">ntqlayout.h</a>> +#include <<a href="qlineedit-h.html">ntqlineedit.h</a>> +#include <<a href="qmultilineedit-h.html">ntqmultilineedit.h</a>> +#include <<a href="qmenubar-h.html">ntqmenubar.h</a>> +#include <<a href="qpopupmenu-h.html">ntqpopupmenu.h</a>> + +class ExampleWidget : public <a href="ntqwidget.html">TQWidget</a> { public: - ExampleWidget( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); + ExampleWidget( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); ~ExampleWidget(); }; -<a name="f260"></a>ExampleWidget::ExampleWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qwidget.html">TQWidget</a>( parent, name ) +<a name="f260"></a>ExampleWidget::ExampleWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqwidget.html">TQWidget</a>( parent, name ) { // Make the top-level layout; a vertical box to contain all widgets // and sub-layouts. <a href="qboxlayout.html">TQBoxLayout</a> *topLayout = new <a href="qvboxlayout.html">TQVBoxLayout</a>( this, 5 ); // Create a menubar... - <a href="qmenubar.html">TQMenuBar</a> *menubar = new <a href="qmenubar.html">TQMenuBar</a>( this ); -<a name="x540"></a> menubar-><a href="qmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle ); - <a href="qpopupmenu.html">TQPopupMenu</a>* popup; - popup = new <a href="qpopupmenu.html">TQPopupMenu</a>( this ); - popup-><a href="qmenudata.html#insertItem">insertItem</a>( "&Quit", qApp, SLOT(<a href="qapplication.html#quit">quit</a>()) ); - menubar-><a href="qmenudata.html#insertItem">insertItem</a>( "&File", popup ); + <a href="ntqmenubar.html">TQMenuBar</a> *menubar = new <a href="ntqmenubar.html">TQMenuBar</a>( this ); +<a name="x540"></a> menubar-><a href="ntqmenubar.html#setSeparator">setSeparator</a>( TQMenuBar::InWindowsStyle ); + <a href="ntqpopupmenu.html">TQPopupMenu</a>* popup; + popup = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( this ); + popup-><a href="ntqmenudata.html#insertItem">insertItem</a>( "&Quit", qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); + menubar-><a href="ntqmenudata.html#insertItem">insertItem</a>( "&File", popup ); // ...and tell the layout about it. -<a name="x539"></a> topLayout-><a href="qlayout.html#setMenuBar">setMenuBar</a>( menubar ); +<a name="x539"></a> topLayout-><a href="ntqlayout.html#setMenuBar">setMenuBar</a>( menubar ); // Make an hbox that will hold a row of buttons. <a href="qboxlayout.html">TQBoxLayout</a> *buttons = new <a href="qhboxlayout.html">TQHBoxLayout</a>( topLayout ); int i; for ( i = 1; i <= 4; i++ ) { - <a href="qpushbutton.html">TQPushButton</a>* but = new <a href="qpushbutton.html">TQPushButton</a>( this ); - <a href="qstring.html">TQString</a> s; -<a name="x542"></a> s.<a href="qstring.html#sprintf">sprintf</a>( "Button %d", i ); -<a name="x530"></a> but-><a href="qbutton.html#setText">setText</a>( s ); + <a href="ntqpushbutton.html">TQPushButton</a>* but = new <a href="ntqpushbutton.html">TQPushButton</a>( this ); + <a href="ntqstring.html">TQString</a> s; +<a name="x542"></a> s.<a href="ntqstring.html#sprintf">sprintf</a>( "Button %d", i ); +<a name="x530"></a> but-><a href="ntqbutton.html#setText">setText</a>( s ); // Set horizontal <a href="layout.html#stretch-factor">stretch factor</a> to 10 to let the buttons // stretch horizontally. The buttons will not stretch @@ -104,10 +104,10 @@ public: // Make another hbox that will hold a left-justified row of buttons. <a href="qboxlayout.html">TQBoxLayout</a> *buttons2 = new <a href="qhboxlayout.html">TQHBoxLayout</a>( topLayout ); - <a href="qpushbutton.html">TQPushButton</a>* but = new <a href="qpushbutton.html">TQPushButton</a>( "Button five", this ); + <a href="ntqpushbutton.html">TQPushButton</a>* but = new <a href="ntqpushbutton.html">TQPushButton</a>( "Button five", this ); buttons2-><a href="qboxlayout.html#addWidget">addWidget</a>( but ); - but = new <a href="qpushbutton.html">TQPushButton</a>( "Button 6", this ); + but = new <a href="ntqpushbutton.html">TQPushButton</a>( "Button 6", this ); buttons2-><a href="qboxlayout.html#addWidget">addWidget</a>( but ); // Fill up the rest of the hbox with stretchable space, so that @@ -115,9 +115,9 @@ public: <a name="x528"></a> buttons2-><a href="qboxlayout.html#addStretch">addStretch</a>( 10 ); // Make a big widget that will grab all space in the middle. - <a href="qmultilineedit.html">TQMultiLineEdit</a> *bigWidget = new <a href="qmultilineedit.html">TQMultiLineEdit</a>( this ); - bigWidget-><a href="qtextedit.html#setText">setText</a>( "This widget will get all the remaining space" ); -<a name="x531"></a> bigWidget-><a href="qframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Plain ); + <a href="ntqmultilineedit.html">TQMultiLineEdit</a> *bigWidget = new <a href="ntqmultilineedit.html">TQMultiLineEdit</a>( this ); + bigWidget-><a href="ntqtextedit.html#setText">setText</a>( "This widget will get all the remaining space" ); +<a name="x531"></a> bigWidget-><a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Plain ); // Set vertical stretch factor to 10 to let the bigWidget stretch // vertically. It will stretch horizontally because there are no @@ -141,14 +141,14 @@ public: int row; for ( row = 0; row < numRows; row++ ) { - <a href="qlineedit.html">TQLineEdit</a> *ed = new <a href="qlineedit.html">TQLineEdit</a>( this ); + <a href="ntqlineedit.html">TQLineEdit</a> *ed = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); // The line edit goes in the second column <a name="x533"></a> grid-><a href="qgridlayout.html#addWidget">addWidget</a>( ed, row, linedCol ); // Make a label that is a buddy of the line edit - <a href="qstring.html">TQString</a> s; - s.<a href="qstring.html#sprintf">sprintf</a>( "Line &%d", row+1 ); - <a href="qlabel.html">TQLabel</a> *label = new <a href="qlabel.html">TQLabel</a>( ed, s, this ); + <a href="ntqstring.html">TQString</a> s; + s.<a href="ntqstring.html#sprintf">sprintf</a>( "Line &%d", row+1 ); + <a href="ntqlabel.html">TQLabel</a> *label = new <a href="ntqlabel.html">TQLabel</a>( ed, s, this ); // The label goes in the first column. grid-><a href="qgridlayout.html#addWidget">addWidget</a>( label, row, labelCol ); } @@ -156,7 +156,7 @@ public: // The multiline edit will cover the entire vertical range of the // grid (rows 0 to numRows) and stay in column 2. - <a href="qmultilineedit.html">TQMultiLineEdit</a> *med = new <a href="qmultilineedit.html">TQMultiLineEdit</a>( this ); + <a href="ntqmultilineedit.html">TQMultiLineEdit</a> *med = new <a href="ntqmultilineedit.html">TQMultiLineEdit</a>( this ); <a name="x532"></a> grid-><a href="qgridlayout.html#addMultiCellWidget">addMultiCellWidget</a>( med, 0, -1, multiCol, multiCol ); // The labels will take the space they need. Let the remaining @@ -166,18 +166,18 @@ public: grid-><a href="qgridlayout.html#setColStretch">setColStretch</a>( multiCol, 20 ); // Add a widget at the bottom. - <a href="qlabel.html">TQLabel</a>* sb = new <a href="qlabel.html">TQLabel</a>( this ); - sb-><a href="qlabel.html#setText">setText</a>( "Let's pretend this is a status bar" ); - sb-><a href="qframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); + <a href="ntqlabel.html">TQLabel</a>* sb = new <a href="ntqlabel.html">TQLabel</a>( this ); + sb-><a href="ntqlabel.html#setText">setText</a>( "Let's pretend this is a status bar" ); + sb-><a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); // This widget will use all horizontal space, and have a fixed height. // we should have made a subclass and implemented sizePolicy there... -<a name="x545"></a><a name="x537"></a> sb-><a href="qwidget.html#setFixedHeight">setFixedHeight</a>( sb-><a href="qwidget.html#sizeHint">sizeHint</a>().height() ); +<a name="x545"></a><a name="x537"></a> sb-><a href="ntqwidget.html#setFixedHeight">setFixedHeight</a>( sb-><a href="ntqwidget.html#sizeHint">sizeHint</a>().height() ); -<a name="x535"></a> sb-><a href="qlabel.html#setAlignment">setAlignment</a>( AlignVCenter | AlignLeft ); +<a name="x535"></a> sb-><a href="ntqlabel.html#setAlignment">setAlignment</a>( AlignVCenter | AlignLeft ); topLayout-><a href="qboxlayout.html#addWidget">addWidget</a>( sb ); -<a name="x538"></a> topLayout-><a href="qlayout.html#activate">activate</a>(); +<a name="x538"></a> topLayout-><a href="ntqlayout.html#activate">activate</a>(); } ExampleWidget::~ExampleWidget() @@ -188,14 +188,14 @@ ExampleWidget::~ExampleWidget() int main( int argc, char **argv ) { - <a href="qapplication.html">TQApplication</a> a( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); ExampleWidget f; - a.<a href="qapplication.html#setMainWidget">setMainWidget</a>(&f); - f.<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Layouts"); - f.<a href="qwidget.html#show">show</a>(); + a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(&f); + f.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Layouts"); + f.<a href="ntqwidget.html#show">show</a>(); - return a.<a href="qapplication.html#exec">exec</a>(); + return a.<a href="ntqapplication.html#exec">exec</a>(); } </pre> |