From 48ea22d00b58a37508567756b2955582cd9efe5a Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 9 Jul 2023 20:12:14 +0900 Subject: [PATCH] Drop compatibility code for TQToolButton Signed-off-by: Michele Calgaro --- doc/html/ntqtoolbutton.html | 57 ---------------- doc/html/porting.html | 30 +++------ doc/html/propertydocs | 28 -------- doc/html/propertyindex | 2 - doc/html/qtoolbutton-h.html | 10 --- doc/html/qtoolbutton-members.html | 4 -- doc/man/man3/tqtoolbutton.3qt | 74 --------------------- doc/porting3.doc | 26 ++------ src/widgets/ntqtoolbutton.h | 10 --- src/widgets/qtoolbutton.cpp | 105 ------------------------------ 10 files changed, 13 insertions(+), 333 deletions(-) diff --git a/doc/html/ntqtoolbutton.html b/doc/html/ntqtoolbutton.html index 95c588c9..d8886421 100644 --- a/doc/html/ntqtoolbutton.html +++ b/doc/html/ntqtoolbutton.html @@ -44,12 +44,6 @@ commands or options, usually used inside a TQToolBar.
  • TQToolButton ( const TQIconSet & iconSet, const TQString & textLabel, const TQString & grouptext, TQObject * receiver, const char * slot, TQToolBar * parent, const char * name = 0 )
  • TQToolButton ( ArrowType type, TQWidget * parent, const char * name = 0 )
  • ~TQToolButton ()
  • -
  • void setOnIconSet ( const TQIconSet & )  (obsolete)
  • -
  • void setOffIconSet ( const TQIconSet & )  (obsolete)
  • -
  • void setIconSet ( const TQIconSet & set, bool on )  (obsolete)
  • -
  • TQIconSet onIconSet () const  (obsolete)
  • -
  • TQIconSet offIconSet () const  (obsolete)
  • -
  • TQIconSet iconSet ( bool on ) const  (obsolete)
  • virtual void setIconSet ( const TQIconSet & )
  • TQIconSet iconSet () const
  • bool usesBigPixmap () const
  • @@ -80,9 +74,7 @@ commands or options, usually used inside a TQToolBar.
  • bool autoRaise - whether auto-raising is enabled
  • BackgroundMode backgroundMode - the toolbutton's background mode  (read only)
  • TQIconSet iconSet - the icon set providing the icon shown on the button
  • -
  • TQIconSet offIconSet - the icon set that is used when the button is in an "off" state  (obsolete)
  • bool on - whether this tool button is on
  • -
  • TQIconSet onIconSet - the icon set that is used when the button is in an "on" state  (obsolete)
  • TQPixmap pixmap - the pixmap of the button  (read only)
  • int popupDelay - the time delay between pressing the button and the appearance of the associated popup menu in milliseconds
  • TQString textLabel - the label of this button
  • @@ -171,21 +163,7 @@ See the "autoRaise" property for

    TQIconSet TQToolButton::iconSet () const

    Returns the icon set providing the icon shown on the button. See the "iconSet" property for details. -

    TQIconSet TQToolButton::iconSet ( bool on ) const -

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Since TQt 3.0, TQIconSet contains both the On and Off icons. -

    For ease of porting, this function ignores the on parameter and -returns the iconSet property. If you relied on the on -parameter, you probably want to update your code to use the TQIconSet -On/Off mechanism. -

    TQIconSet TQToolButton::offIconSet () const -

    Returns the icon set that is used when the button is in an "off" state. -See the "offIconSet" property for details. -

    TQIconSet TQToolButton::onIconSet () const -

    Returns the icon set that is used when the button is in an "on" state. -See the "onIconSet" property for details.

    void TQToolButton::openPopup ()

    Opens (pops up) the associated popup menu. If there is no such @@ -207,25 +185,10 @@ See the "autoRaise" property for

    void TQToolButton::setIconSet ( const TQIconSet & ) [virtual]

    Sets the icon set providing the icon shown on the button. See the "iconSet" property for details. -

    void TQToolButton::setIconSet ( const TQIconSet & set, bool on ) -

    This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -

    This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Since TQt 3.0, TQIconSet contains both the On and Off icons. -

    For ease of porting, this function ignores the on parameter and -sets the iconSet property. If you relied on the on parameter, -you probably want to update your code to use the TQIconSet On/Off -mechanism. -

    See also iconSet and TQIconSet::State. -

    void TQToolButton::setOffIconSet ( const TQIconSet & ) -

    Sets the icon set that is used when the button is in an "off" state. -See the "offIconSet" property for details.

    void TQToolButton::setOn ( bool enable ) [virtual slot]

    Sets whether this tool button is on to enable. See the "on" property for details. -

    void TQToolButton::setOnIconSet ( const TQIconSet & ) -

    Sets the icon set that is used when the button is in an "on" state. -See the "onIconSet" property for details.

    void TQToolButton::setPopup ( TQPopupMenu * popup )

    Associates the popup menu popup with this tool button. @@ -303,35 +266,15 @@ See the "usesTextLabel" prop

    Setting this property sets TQToolButton::pixmap to a null pixmap. There is no default iconset.

    See also pixmap, toggleButton, and on. -

    Set this property's value with setIconSet() and get this property's value with iconSet(). -

    TQIconSet offIconSet

    -

    This property holds the icon set that is used when the button is in an "off" state. -

    This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Since TQt 3.0, TQIconSet contains both the On and Off icons. There is -now an TQToolButton::iconSet property that replaces both TQToolButton::onIconSet and TQToolButton::offIconSet. -

    For ease of porting, this property is a synonym for TQToolButton::iconSet. You probably want to go over your application -code and use the TQIconSet On/Off mechanism. -

    See also iconSet and TQIconSet::State. -

    Set this property's value with setOffIconSet() and get this property's value with offIconSet().

    bool on

    This property holds whether this tool button is on.

    This property has no effect on non-toggling buttons. The default is FALSE (i.e. off).

    See also toggleButton and toggle(). -

    Set this property's value with setOn(). -

    TQIconSet onIconSet

    -

    This property holds the icon set that is used when the button is in an "on" state. -

    This property is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. -

    Since TQt 3.0, TQIconSet contains both the On and Off icons. There is -now an TQToolButton::iconSet property that replaces both TQToolButton::onIconSet and TQToolButton::offIconSet. -

    For ease of porting, this property is a synonym for TQToolButton::iconSet. You probably want to go over your application -code and use the TQIconSet On/Off mechanism. -

    See also iconSet and TQIconSet::State. -

    Set this property's value with setOnIconSet() and get this property's value with onIconSet().

    TQPixmap pixmap

    This property holds the pixmap of the button.

    The pixmap property has no meaning for tool buttons. Use the iconSet property instead. diff --git a/doc/html/porting.html b/doc/html/porting.html index e095549c..50f7fb04 100644 --- a/doc/html/porting.html +++ b/doc/html/porting.html @@ -357,12 +357,12 @@ new code.

  • TQTabDialog::setTabEnabled( const char *name, bool enable )
  • TQTextStream::TQTextStream( TQString & str, int filemode )
  • TQToolBar::TQToolBar( const TQString & label, TQMainWindow *, ToolBarDock = DockTop, bool newLine = FALSE, const char *name = 0 ) -
  • TQToolButton::iconSet( bool on ) const -
  • TQToolButton::offIconSet() const -
  • TQToolButton::onIconSet() const -
  • TQToolButton::setIconSet( const TQIconSet & set, bool on ) -
  • TQToolButton::setOffIconSet( const TQIconSet & ) -
  • TQToolButton::setOnIconSet( const TQIconSet & ) +
  • TQToolButton::iconSet( bool on ) const +
  • TQToolButton::offIconSet() const +
  • TQToolButton::onIconSet() const +
  • TQToolButton::setIconSet( const TQIconSet & set, bool on ) +
  • TQToolButton::setOffIconSet( const TQIconSet & ) +
  • TQToolButton::setOnIconSet( const TQIconSet & )
  • TQToolTip::enabled()
  • TQToolTip::setEnabled( bool enable )
  • TQTranslator::find( const char *context, const char *sourceText, const char *comment = 0 ) const @@ -651,29 +651,17 @@ TQtTableView throughout.

    The TQToolButton class used to distinguish between "on" and "off" icons. In 3.0, this mechanism was moved into the TQIconSet class (see TQIconSet::State). -

    The old TQToolButton::onIconSet and TQToolButton::offIconSet -properties are still provided so that old source will compile, but -their semantics have changed: they are now synonyms for TQToolButton::iconSet. If you used that distinction in TQt 2.x, you will -need to adjust your code to use the TQIconSet On/Off mechanism. -

    Likewise, the on parameter of these two functions is now ignored: +

    The two TQToolButton::onIconSet and TQToolButton::offIconSet properties +have been removed, together with the following two functions as well.

    • void TQToolButton::setIconSet ( const TQIconSet & set, bool on )
    • TQIconSet TQToolButton::iconSet ( bool on ) const
    -

    These functions are only provided for ease of porting. New code -should use the following instead: +

    New code should use the following functions instead:

    -

    Finally, this function is no longer virtual: -

      -
    • void TQToolButton::setIconSet( const TQIconSet & set, bool on ) -
    -

    If you have a class that inherits TQToolButton and that reimplements -TQToolButton::setIconSet(), you should make the signature of the -reimplementation agree with the new TQToolButton::setIconSet(), -a virtual function.

    TQTextStream

    The global TQTextStream manipulators setw(), setfill() and setprecison() diff --git a/doc/html/propertydocs b/doc/html/propertydocs index 3ec3818d..ea60364b 100644 --- a/doc/html/propertydocs +++ b/doc/html/propertydocs @@ -4234,34 +4234,6 @@ pixmap. There is no default iconset. <p>Set this property's value with <a href="ntqtoolbutton.html#setIconSet">setIconSet</a>() and get this property's value with <a href="ntqtoolbutton.html#iconSet">iconSet</a>(). - - QToolButton::offIconSet - -<p>This property holds the icon set that is used when the button is in an "off" state. -<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. -<p> Since TQt 3.0, <a href="ntqiconset.html">QIconSet</a> contains both the On and Off icons. There is -now an <a href="ntqtoolbutton.html#iconSet-prop">QToolButton::iconSet</a> property that replaces both <a href="ntqtoolbutton.html#onIconSet-prop">QToolButton::onIconSet</a> and <a href="ntqtoolbutton.html#offIconSet-prop">QToolButton::offIconSet</a>. -<p> For ease of porting, this property is a synonym for <a href="ntqtoolbutton.html#iconSet-prop">QToolButton::iconSet</a>. You probably want to go over your application -code and use the QIconSet On/Off mechanism. -<p> <p>See also <a href="ntqtoolbutton.html#iconSet-prop">iconSet</a> and <a href="ntqiconset.html#State-enum">QIconSet::State</a>. - -<p>Set this property's value with <a href="ntqtoolbutton.html#setOffIconSet">setOffIconSet</a>() and get this property's value with <a href="ntqtoolbutton.html#offIconSet">offIconSet</a>(). - - - - QToolButton::onIconSet - -<p>This property holds the icon set that is used when the button is in an "on" state. -<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. -<p> Since TQt 3.0, <a href="ntqiconset.html">QIconSet</a> contains both the On and Off icons. There is -now an <a href="ntqtoolbutton.html#iconSet-prop">QToolButton::iconSet</a> property that replaces both <a href="ntqtoolbutton.html#onIconSet-prop">QToolButton::onIconSet</a> and <a href="ntqtoolbutton.html#offIconSet-prop">QToolButton::offIconSet</a>. -<p> For ease of porting, this property is a synonym for <a href="ntqtoolbutton.html#iconSet-prop">QToolButton::iconSet</a>. You probably want to go over your application -code and use the QIconSet On/Off mechanism. -<p> <p>See also <a href="ntqtoolbutton.html#iconSet-prop">iconSet</a> and <a href="ntqiconset.html#State-enum">QIconSet::State</a>. - -<p>Set this property's value with <a href="ntqtoolbutton.html#setOnIconSet">setOnIconSet</a>() and get this property's value with <a href="ntqtoolbutton.html#onIconSet">onIconSet</a>(). - - QToolButton::popupDelay diff --git a/doc/html/propertyindex b/doc/html/propertyindex index 37bccdb0..a5bd9514 100644 --- a/doc/html/propertyindex +++ b/doc/html/propertyindex @@ -347,8 +347,6 @@ "QToolBox/currentIndex" ntqtoolbox.html#currentIndex-prop "QToolButton/autoRaise" ntqtoolbutton.html#autoRaise-prop "QToolButton/iconSet" ntqtoolbutton.html#iconSet-prop -"QToolButton/offIconSet" ntqtoolbutton.html#offIconSet-prop -"QToolButton/onIconSet" ntqtoolbutton.html#onIconSet-prop "QToolButton/popupDelay" ntqtoolbutton.html#popupDelay-prop "QToolButton/textLabel" ntqtoolbutton.html#textLabel-prop "QToolButton/textPosition" ntqtoolbutton.html#textPosition-prop diff --git a/doc/html/qtoolbutton-h.html b/doc/html/qtoolbutton-h.html index 162d2b8e..9519ee20 100644 --- a/doc/html/qtoolbutton-h.html +++ b/doc/html/qtoolbutton-h.html @@ -96,8 +96,6 @@ class Q_EXPORT TQToolButton : public TQButton TQ_ENUMS( TextPosition ) TQ_PROPERTY( TQIconSet iconSet READ iconSet WRITE setIconSet ) - TQ_PROPERTY( TQIconSet onIconSet READ onIconSet WRITE setOnIconSet DESIGNABLE false STORED false ) - TQ_PROPERTY( TQIconSet offIconSet READ offIconSet WRITE setOffIconSet DESIGNABLE false STORED false ) TQ_PROPERTY( bool usesBigPixmap READ usesBigPixmap WRITE setUsesBigPixmap ) TQ_PROPERTY( bool usesTextLabel READ usesTextLabel WRITE setUsesTextLabel ) TQ_PROPERTY( TQString textLabel READ textLabel WRITE setTextLabel ) @@ -130,14 +128,6 @@ public: TQSize sizeHint() const; TQSize minimumSizeHint() const; -#ifndef TQT_NO_COMPAT - void setOnIconSet( const TQIconSet& ); - void setOffIconSet( const TQIconSet& ); - void setIconSet( const TQIconSet &, bool on ); - TQIconSet onIconSet() const; - TQIconSet offIconSet( ) const; - TQIconSet iconSet( bool on ) const; -#endif virtual void setIconSet( const TQIconSet & ); TQIconSet iconSet() const; diff --git a/doc/html/qtoolbutton-members.html b/doc/html/qtoolbutton-members.html index 6fba5dea..f5a593ed 100644 --- a/doc/html/qtoolbutton-members.html +++ b/doc/html/qtoolbutton-members.html @@ -201,8 +201,6 @@ body { background: #ffffff; color: black; }

  • name()
  • normalizeSignalSlot()
  • objectTrees() -
  • offIconSet() -
  • onIconSet()
  • openPopup()
  • ownCursor()
  • ownFont() @@ -283,9 +281,7 @@ body { background: #ffffff; color: black; }
  • setMinimumWidth()
  • setMouseTracking()
  • setName() -
  • setOffIconSet()
  • setOn() -
  • setOnIconSet()
  • setPalette()
  • setPaletteBackgroundColor()
  • setPaletteBackgroundPixmap() diff --git a/doc/man/man3/tqtoolbutton.3qt b/doc/man/man3/tqtoolbutton.3qt index aa3477c9..c7f1e8ad 100644 --- a/doc/man/man3/tqtoolbutton.3qt +++ b/doc/man/man3/tqtoolbutton.3qt @@ -31,24 +31,6 @@ Inherits QButton. .BI "\fB~QToolButton\fR ()" .br .ti -1c -.BI "void setOnIconSet ( const QIconSet & ) \fI(obsolete)\fR" -.br -.ti -1c -.BI "void setOffIconSet ( const QIconSet & ) \fI(obsolete)\fR" -.br -.ti -1c -.BI "void setIconSet ( const QIconSet & set, bool on ) \fI(obsolete)\fR" -.br -.ti -1c -.BI "QIconSet onIconSet () const \fI(obsolete)\fR" -.br -.ti -1c -.BI "QIconSet offIconSet () const \fI(obsolete)\fR" -.br -.ti -1c -.BI "QIconSet iconSet ( bool on ) const \fI(obsolete)\fR" -.br -.ti -1c .BI "virtual void \fBsetIconSet\fR ( const QIconSet & )" .br .ti -1c @@ -127,15 +109,9 @@ Inherits QButton. .BI "QIconSet \fBiconSet\fR - the icon set providing the icon shown on the button" .br .ti -1c -.BI "QIconSet offIconSet - the icon set that is used when the button is in an ""off"" state \fI(obsolete)\fR" -.br -.ti -1c .BI "bool \fBon\fR - whether this tool button is on" .br .ti -1c -.BI "QIconSet onIconSet - the icon set that is used when the button is in an ""on"" state \fI(obsolete)\fR" -.br -.ti -1c .BI "QPixmap \fBpixmap\fR - the pixmap of the button \fI(read " "only" ")\fR" .br .ti -1c @@ -209,18 +185,6 @@ Destroys the object and frees any allocated resources. Returns TRUE if auto-raising is enabled; otherwise returns FALSE. See the "autoRaise" property for details. .SH "QIconSet QToolButton::iconSet () const" Returns the icon set providing the icon shown on the button. See the "iconSet" property for details. -.SH "QIconSet QToolButton::iconSet ( bool on ) const" -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.PP -\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.PP -Since TQt 3.0, QIconSet contains both the On and Off icons. -.PP -For ease of porting, this function ignores the \fIon\fR parameter and returns the iconSet property. If you relied on the \fIon\fR parameter, you probably want to update your code to use the QIconSet On/Off mechanism. -.SH "QIconSet QToolButton::offIconSet () const" -Returns the icon set that is used when the button is in an "off" state. See the "offIconSet" property for details. -.SH "QIconSet QToolButton::onIconSet () const" -Returns the icon set that is used when the button is in an "on" state. See the "onIconSet" property for details. .SH "void QToolButton::openPopup ()" Opens (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user. .SH "QPopupMenu * QToolButton::popup () const" @@ -233,22 +197,8 @@ Returns the time delay between pressing the button and the appearance of the ass Sets whether auto-raising is enabled to \fIenable\fR. See the "autoRaise" property for details. .SH "void QToolButton::setIconSet ( const QIconSet & )\fC [virtual]\fR" Sets the icon set providing the icon shown on the button. See the "iconSet" property for details. -.SH "void QToolButton::setIconSet ( const QIconSet & set, bool on )" -This is an overloaded member function, provided for convenience. It behaves essentially like the above function. -.PP -\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.PP -Since TQt 3.0, QIconSet contains both the On and Off icons. -.PP -For ease of porting, this function ignores the \fIon\fR parameter and sets the iconSet property. If you relied on the \fIon\fR parameter, you probably want to update your code to use the QIconSet On/Off mechanism. -.PP -See also iconSet and QIconSet::State. -.SH "void QToolButton::setOffIconSet ( const QIconSet & )" -Sets the icon set that is used when the button is in an "off" state. See the "offIconSet" property for details. .SH "void QToolButton::setOn ( bool enable )\fC [virtual slot]\fR" Sets whether this tool button is on to \fIenable\fR. See the "on" property for details. -.SH "void QToolButton::setOnIconSet ( const QIconSet & )" -Sets the icon set that is used when the button is in an "on" state. See the "onIconSet" property for details. .SH "void QToolButton::setPopup ( QPopupMenu * popup )" Associates the popup menu \fIpopup\fR with this tool button. .PP @@ -312,18 +262,6 @@ Setting this property sets QToolButton::pixmap to a null pixmap. There is no def See also pixmap, toggleButton, and on. .PP Set this property's value with setIconSet() and get this property's value with iconSet(). -.SH "QIconSet offIconSet" -This property holds the icon set that is used when the button is in an "off" state. -.PP -\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.PP -Since TQt 3.0, QIconSet contains both the On and Off icons. There is now an QToolButton::iconSet property that replaces both QToolButton::onIconSet and QToolButton::offIconSet. -.PP -For ease of porting, this property is a synonym for QToolButton::iconSet. You probably want to go over your application code and use the QIconSet On/Off mechanism. -.PP -See also iconSet and QIconSet::State. -.PP -Set this property's value with setOffIconSet() and get this property's value with offIconSet(). .SH "bool on" This property holds whether this tool button is on. .PP @@ -332,18 +270,6 @@ This property has no effect on non-toggling buttons. The default is FALSE (i.e. See also toggleButton and toggle(). .PP Set this property's value with setOn(). -.SH "QIconSet onIconSet" -This property holds the icon set that is used when the button is in an "on" state. -.PP -\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. -.PP -Since TQt 3.0, QIconSet contains both the On and Off icons. There is now an QToolButton::iconSet property that replaces both QToolButton::onIconSet and QToolButton::offIconSet. -.PP -For ease of porting, this property is a synonym for QToolButton::iconSet. You probably want to go over your application code and use the QIconSet On/Off mechanism. -.PP -See also iconSet and QIconSet::State. -.PP -Set this property's value with setOnIconSet() and get this property's value with onIconSet(). .SH "QPixmap pixmap" This property holds the pixmap of the button. .PP diff --git a/doc/porting3.doc b/doc/porting3.doc index 8d55bbe8..a099d0fe 100644 --- a/doc/porting3.doc +++ b/doc/porting3.doc @@ -648,40 +648,22 @@ QtTableView throughout. The \l QToolButton class used to distinguish between "on" and "off" icons. In 3.0, this mechanism was moved into the \l QIconSet class -(see \l QIconSet::State). - -The old \l QToolButton::onIconSet and \l QToolButton::offIconSet -properties are still provided so that old source will compile, but -their semantics have changed: they are now synonyms for \l -QToolButton::iconSet. If you used that distinction in TQt 2.x, you will -need to adjust your code to use the QIconSet On/Off mechanism. - -Likewise, the \e on parameter of these two functions is now ignored: +(see \l QIconSet::State). The two TQToolButton::onIconSet and +TQToolButton::offIconSet properties have been removed, together with +the following two functions as well. \list \i void QToolButton::setIconSet ( const QIconSet \& set, bool on ) \i QIconSet QToolButton::iconSet ( bool on ) const \endlist -These functions are only provided for ease of porting. New code -should use the following instead: +New code should use the following functions instead: \list \i void QToolButton::setIconSet( const QIconSet \& set ) \i QIconSet QToolButton::iconSet() const \endlist -Finally, this function is no longer virtual: - -\list -\i void QToolButton::setIconSet( const QIconSet \& set, bool on ) -\endlist - -If you have a class that inherits QToolButton and that reimplements -QToolButton::setIconSet(), you should make the signature of the -reimplementation agree with the new \l QToolButton::setIconSet(), -a virtual function. - \section1 QTextStream The global QTextStream manipulators setw(), setfill() and setprecison() diff --git a/src/widgets/ntqtoolbutton.h b/src/widgets/ntqtoolbutton.h index 84909de5..0ece3a9f 100644 --- a/src/widgets/ntqtoolbutton.h +++ b/src/widgets/ntqtoolbutton.h @@ -60,8 +60,6 @@ class Q_EXPORT TQToolButton : public TQButton TQ_ENUMS( TextPosition ) TQ_PROPERTY( TQIconSet iconSet READ iconSet WRITE setIconSet ) - TQ_PROPERTY( TQIconSet onIconSet READ onIconSet WRITE setOnIconSet DESIGNABLE false STORED false ) - TQ_PROPERTY( TQIconSet offIconSet READ offIconSet WRITE setOffIconSet DESIGNABLE false STORED false ) TQ_PROPERTY( bool usesBigPixmap READ usesBigPixmap WRITE setUsesBigPixmap ) TQ_PROPERTY( bool usesTextLabel READ usesTextLabel WRITE setUsesTextLabel ) TQ_PROPERTY( TQString textLabel READ textLabel WRITE setTextLabel ) @@ -94,14 +92,6 @@ public: TQSize sizeHint() const; TQSize minimumSizeHint() const; -#ifndef TQT_NO_COMPAT - void setOnIconSet( const TQIconSet& ); - void setOffIconSet( const TQIconSet& ); - void setIconSet( const TQIconSet &, bool on ); - TQIconSet onIconSet() const; - TQIconSet offIconSet( ) const; - TQIconSet iconSet( bool on ) const; -#endif virtual void setIconSet( const TQIconSet & ); TQIconSet iconSet() const; diff --git a/src/widgets/qtoolbutton.cpp b/src/widgets/qtoolbutton.cpp index 74f3f4ad..1316944f 100644 --- a/src/widgets/qtoolbutton.cpp +++ b/src/widgets/qtoolbutton.cpp @@ -38,7 +38,6 @@ ** **********************************************************************/ -#undef TQT_NO_COMPAT #include "ntqtoolbutton.h" #ifndef TQT_NO_TOOLBUTTON @@ -685,69 +684,6 @@ void TQToolButton::setTextLabel( const TQString &newLabel , bool tipToo ) } -#ifndef TQT_NO_COMPAT - -TQIconSet TQToolButton::onIconSet() const -{ - return iconSet(); -} - -TQIconSet TQToolButton::offIconSet( ) const -{ - return iconSet(); -} - - -/*! - \property TQToolButton::onIconSet - \brief the icon set that is used when the button is in an "on" state - - \obsolete - - Since TQt 3.0, TQIconSet contains both the On and Off icons. There is - now an \l TQToolButton::iconSet property that replaces both \l - TQToolButton::onIconSet and \l TQToolButton::offIconSet. - - For ease of porting, this property is a synonym for \l - TQToolButton::iconSet. You probably want to go over your application - code and use the TQIconSet On/Off mechanism. - - \sa iconSet TQIconSet::State -*/ -void TQToolButton::setOnIconSet( const TQIconSet& set ) -{ - setIconSet( set ); - /* - ### Get rid of all tqWarning in this file in 4.0. - Also consider inlining the obsolete functions then. - */ - tqWarning( "TQToolButton::setOnIconSet(): This function is not supported" - " anymore" ); -} - -/*! - \property TQToolButton::offIconSet - \brief the icon set that is used when the button is in an "off" state - - \obsolete - - Since TQt 3.0, TQIconSet contains both the On and Off icons. There is - now an \l TQToolButton::iconSet property that replaces both \l - TQToolButton::onIconSet and \l TQToolButton::offIconSet. - - For ease of porting, this property is a synonym for \l - TQToolButton::iconSet. You probably want to go over your application - code and use the TQIconSet On/Off mechanism. - - \sa iconSet TQIconSet::State -*/ -void TQToolButton::setOffIconSet( const TQIconSet& set ) -{ - setIconSet( set ); -} - -#endif - /*! \property TQToolButton::pixmap \brief the pixmap of the button @@ -774,29 +710,6 @@ void TQToolButton::setIconSet( const TQIconSet & set ) update(); } -/*! \overload - \obsolete - - Since TQt 3.0, TQIconSet contains both the On and Off icons. - - For ease of porting, this function ignores the \a on parameter and - sets the \l iconSet property. If you relied on the \a on parameter, - you probably want to update your code to use the TQIconSet On/Off - mechanism. - - \sa iconSet TQIconSet::State -*/ - -#ifndef TQT_NO_COMPAT - -void TQToolButton::setIconSet( const TQIconSet & set, bool /* on */ ) -{ - setIconSet( set ); - tqWarning( "TQToolButton::setIconSet(): 'on' parameter ignored" ); -} - -#endif - TQIconSet TQToolButton::iconSet() const { TQToolButton *that = (TQToolButton *) this; @@ -818,24 +731,6 @@ TQIconSet TQToolButton::iconSet() const return TQIconSet(); } -#ifndef TQT_NO_COMPAT -/*! \overload - \obsolete - - Since TQt 3.0, TQIconSet contains both the On and Off icons. - - For ease of porting, this function ignores the \a on parameter and - returns the \l iconSet property. If you relied on the \a on - parameter, you probably want to update your code to use the TQIconSet - On/Off mechanism. -*/ -TQIconSet TQToolButton::iconSet( bool /* on */ ) const -{ - return iconSet(); -} - -#endif - #ifndef TQT_NO_POPUPMENU /*! Associates the popup menu \a popup with this tool button.