diff options
author | Michele Calgaro <[email protected]> | 2024-06-02 23:07:22 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-06-02 23:22:42 +0900 |
commit | 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch) | |
tree | b95884617b9a37accc843676d5d42be4116a3f54 /doc/html/popup-example.html | |
parent | 68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff) | |
download | tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.tar.gz tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.zip |
Rename ntqwidget* related files to equivalent tqwidget*
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'doc/html/popup-example.html')
-rw-r--r-- | doc/html/popup-example.html | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/html/popup-example.html b/doc/html/popup-example.html index 4e20c9e81..643092721 100644 --- a/doc/html/popup-example.html +++ b/doc/html/popup-example.html @@ -61,16 +61,16 @@ class FancyPopup : public <a href="ntqlabel.html">TQLabel</a> { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> public: - FancyPopup( <a href="ntqwidget.html">TQWidget</a>* parent = 0, const char* name=0); + FancyPopup( <a href="tqwidget.html">TQWidget</a>* parent = 0, const char* name=0); - void popup( <a href="ntqwidget.html">TQWidget</a>* parent = 0); + void popup( <a href="tqwidget.html">TQWidget</a>* parent = 0); protected: virtual void mouseMoveEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); virtual void mouseReleaseEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); virtual void closeEvent( <a href="qcloseevent.html">TQCloseEvent</a> * ); private: - <a href="ntqwidget.html">TQWidget</a>* popupParent; + <a href="tqwidget.html">TQWidget</a>* popupParent; int moves; }; @@ -79,7 +79,7 @@ private: { TQ_OBJECT public: - Frame( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char* name=0); + Frame( <a href="tqwidget.html">TQWidget</a> *parent=0, const char* name=0); protected: @@ -114,16 +114,16 @@ private: #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qlayout-h.html">ntqlayout.h</a>> -<a name="f468"></a>FancyPopup::FancyPopup( <a href="ntqwidget.html">TQWidget</a>* parent, const char* name ): +<a name="f468"></a>FancyPopup::FancyPopup( <a href="tqwidget.html">TQWidget</a>* parent, const char* name ): <a href="ntqlabel.html">TQLabel</a>( parent, name, WType_Popup ){ <a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( WinPanel|Raised ); <a href="ntqlabel.html#setAlignment">setAlignment</a>( AlignCenter ); - <a href="ntqwidget.html#resize">resize</a>(150,100); + <a href="tqwidget.html#resize">resize</a>(150,100); moves = 0; - <a href="ntqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE ); + <a href="tqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE ); } -<a name="x1620"></a>void FancyPopup::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * e){ +<a name="x1620"></a>void FancyPopup::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * e){ moves++; <a href="ntqstring.html">TQString</a> s; <a name="x1611"></a> s.<a href="ntqstring.html#sprintf">sprintf</a>("%d/%d", e-><a href="qmouseevent.html#pos">pos</a>().x(), e-><a href="qmouseevent.html#pos">pos</a>().y()); @@ -132,12 +132,12 @@ private: <a href="ntqlabel.html#setText">setText</a>(s); } -<a name="x1621"></a>void FancyPopup::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * e){ - if (<a href="ntqwidget.html#rect">rect</a>().contains( e-><a href="qmouseevent.html#pos">pos</a>() ) || moves > 5) - <a href="ntqwidget.html#close">close</a>(); +<a name="x1621"></a>void FancyPopup::<a href="tqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * e){ + if (<a href="tqwidget.html#rect">rect</a>().contains( e-><a href="qmouseevent.html#pos">pos</a>() ) || moves > 5) + <a href="tqwidget.html#close">close</a>(); } -<a name="x1617"></a>void FancyPopup::<a href="ntqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ){ +<a name="x1617"></a>void FancyPopup::<a href="tqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ){ <a name="x1607"></a> e-><a href="qcloseevent.html#accept">accept</a>(); moves = 0; if (!popupParent) @@ -152,12 +152,12 @@ private: <a name="x1602"></a> TQApplication::<a href="ntqapplication.html#sendEvent">sendEvent</a>( popupParent, &me ); } -void <a name="f469"></a>FancyPopup::popup( <a href="ntqwidget.html">TQWidget</a>* parent) { +void <a name="f469"></a>FancyPopup::popup( <a href="tqwidget.html">TQWidget</a>* parent) { popupParent = parent; setText("Move the mouse!"); if (popupParent) - <a href="ntqwidget.html#move">move</a>( popupParent->mapToGlobal( popupParent->rect().bottomLeft() ) ); - <a href="ntqwidget.html#show">show</a>(); + <a href="tqwidget.html#move">move</a>( popupParent->mapToGlobal( popupParent->rect().bottomLeft() ) ); + <a href="tqwidget.html#show">show</a>(); } @@ -172,29 +172,29 @@ void <a name="f469"></a>FancyPopup::popup( <a href="ntqwidget.html">TQWidget</a> <a name="x1606"></a> <a href="tqobject.html#connect">connect</a> ( button2, TQ_SIGNAL( <a href="ntqbutton.html#pressed">pressed</a>() ), TQ_SLOT( button2Pressed() ) ); <a href="qboxlayout.html">TQBoxLayout</a> * l = new <a href="qhboxlayout.html">TQHBoxLayout</a>( this ); -<a name="x1627"></a><a name="x1614"></a> button1-><a href="ntqwidget.html#setMaximumSize">setMaximumSize</a>(button1-><a href="ntqwidget.html#sizeHint">sizeHint</a>()); - button2-><a href="ntqwidget.html#setMaximumSize">setMaximumSize</a>(button2-><a href="ntqwidget.html#sizeHint">sizeHint</a>()); +<a name="x1627"></a><a name="x1614"></a> button1-><a href="tqwidget.html#setMaximumSize">setMaximumSize</a>(button1-><a href="tqwidget.html#sizeHint">sizeHint</a>()); + button2-><a href="tqwidget.html#setMaximumSize">setMaximumSize</a>(button2-><a href="tqwidget.html#sizeHint">sizeHint</a>()); l-><a href="qboxlayout.html#addWidget">addWidget</a>( button1 ); l-><a href="qboxlayout.html#addWidget">addWidget</a>( button2 ); <a name="x1609"></a> l-><a href="ntqlayout.html#activate">activate</a>(); -<a name="x1613"></a>// button1-><a href="ntqwidget.html#setGeometry">setGeometry</a>(20,20,100,30); -// button2-><a href="ntqwidget.html#setGeometry">setGeometry</a>(140,20,100,30); - <a href="ntqwidget.html#resize">resize</a>(270, 70); +<a name="x1613"></a>// button1-><a href="tqwidget.html#setGeometry">setGeometry</a>(20,20,100,30); +// button2-><a href="tqwidget.html#setGeometry">setGeometry</a>(140,20,100,30); + <a href="tqwidget.html#resize">resize</a>(270, 70); //create a very simple popup: it is just composed with other //widget and will be shown after clicking on button1 popup1 = new <a href="ntqframe.html">TQFrame</a>( this ,0, WType_Popup); popup1-><a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( WinPanel|Raised ); - popup1-><a href="ntqwidget.html#resize">resize</a>(150,100); + popup1-><a href="tqwidget.html#resize">resize</a>(150,100); <a href="ntqlineedit.html">TQLineEdit</a> *tmpE = new <a href="ntqlineedit.html">TQLineEdit</a>( popup1 ); -<a name="x1619"></a><a name="x1610"></a> <a href="tqobject.html#connect">connect</a>( tmpE, TQ_SIGNAL( <a href="ntqlineedit.html#returnPressed">returnPressed</a>() ), popup1, TQ_SLOT( <a href="ntqwidget.html#hide">hide</a>() ) ); -<a name="x1626"></a> tmpE-><a href="ntqwidget.html#setGeometry">setGeometry</a>(10,10, 130, 30); -<a name="x1625"></a> tmpE-><a href="ntqwidget.html#setFocus">setFocus</a>(); +<a name="x1619"></a><a name="x1610"></a> <a href="tqobject.html#connect">connect</a>( tmpE, TQ_SIGNAL( <a href="ntqlineedit.html#returnPressed">returnPressed</a>() ), popup1, TQ_SLOT( <a href="tqwidget.html#hide">hide</a>() ) ); +<a name="x1626"></a> tmpE-><a href="tqwidget.html#setGeometry">setGeometry</a>(10,10, 130, 30); +<a name="x1625"></a> tmpE-><a href="tqwidget.html#setFocus">setFocus</a>(); <a href="ntqpushbutton.html">TQPushButton</a> *tmpB = new <a href="ntqpushbutton.html">TQPushButton</a>("Click me!", popup1); -<a name="x1616"></a> <a href="tqobject.html#connect">connect</a>( tmpB, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), popup1, TQ_SLOT( <a href="ntqwidget.html#close">close</a>() ) ); - tmpB-><a href="ntqwidget.html#setGeometry">setGeometry</a>(10, 50, 130, 30); +<a name="x1616"></a> <a href="tqobject.html#connect">connect</a>( tmpB, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), popup1, TQ_SLOT( <a href="tqwidget.html#close">close</a>() ) ); + tmpB-><a href="tqwidget.html#setGeometry">setGeometry</a>(10, 50, 130, 30); // the fancier version uses its own class. It will be shown when // pressing button2, so they behavior is more like a modern menu @@ -207,15 +207,15 @@ void <a name="f469"></a>FancyPopup::popup( <a href="ntqwidget.html">TQWidget</a> // commented out) will for instance add a line edit widget. // tmpE = new <a href="ntqlineedit.html">TQLineEdit</a>( popup2 ); -// tmpE-><a href="ntqwidget.html#setFocus">setFocus</a>(); -// connect( tmpE, TQ_SIGNAL( <a href="ntqlineedit.html#returnPressed">returnPressed</a>() ), popup2, TQ_SLOT( <a href="ntqwidget.html#close">close</a>() ) ); -// tmpE-><a href="ntqwidget.html#setGeometry">setGeometry</a>(10, 10, 130, 30); +// tmpE-><a href="tqwidget.html#setFocus">setFocus</a>(); +// connect( tmpE, TQ_SIGNAL( <a href="ntqlineedit.html#returnPressed">returnPressed</a>() ), popup2, TQ_SLOT( <a href="tqwidget.html#close">close</a>() ) ); +// tmpE-><a href="tqwidget.html#setGeometry">setGeometry</a>(10, 10, 130, 30); } void <a name="f471"></a>Frame::button1Clicked(){ -<a name="x1622"></a><a name="x1618"></a> popup1-><a href="ntqwidget.html#move">move</a>( <a href="ntqwidget.html#mapToGlobal">mapToGlobal</a>( button1-><a href="ntqwidget.html#geometry">geometry</a>().bottomLeft() ) ); -<a name="x1628"></a> popup1-><a href="ntqwidget.html#show">show</a>(); +<a name="x1622"></a><a name="x1618"></a> popup1-><a href="tqwidget.html#move">move</a>( <a href="tqwidget.html#mapToGlobal">mapToGlobal</a>( button1-><a href="tqwidget.html#geometry">geometry</a>().bottomLeft() ) ); +<a name="x1628"></a> popup1-><a href="tqwidget.html#show">show</a>(); } void <a name="f472"></a>Frame::button2Pressed(){ @@ -228,9 +228,9 @@ int main( int argc, char **argv ) <a href="ntqapplication.html">TQApplication</a> a(argc,argv); Frame frame; - frame.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Custom Popups"); + frame.<a href="tqwidget.html#setCaption">setCaption</a>("TQt Example - Custom Popups"); a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(&frame); - frame.<a href="ntqwidget.html#show">show</a>(); + frame.<a href="tqwidget.html#show">show</a>(); return a.<a href="ntqapplication.html#exec">exec</a>(); } </pre> |