Drop compatibility code for TQPalette

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/88/head
Michele Calgaro 9 months ago
parent 2e817b4bc1
commit fb6884ead2
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -44,7 +44,7 @@ body { background: #ffffff; color: black; }
<li class=fn><a href="#TQPalette-5"><b>TQPalette</b></a> ( const&nbsp;TQPalette&nbsp;&amp;&nbsp;p )</li>
<li class=fn><a href="#~TQPalette"><b>~TQPalette</b></a> ()</li>
<li class=fn>TQPalette &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;TQPalette&nbsp;&amp;&nbsp;p )</li>
<li class=fn>enum <a href="#ColorGroup-enum"><b>ColorGroup</b></a> { Disabled, Active, Inactive, NColorGroups, Normal = Active }</li>
<li class=fn>enum <a href="#ColorGroup-enum"><b>ColorGroup</b></a> { Disabled, Active, Inactive, NColorGroups }</li>
<li class=fn>const TQColor &amp; <a href="#color"><b>color</b></a> ( ColorGroup&nbsp;gr, TQColorGroup::ColorRole&nbsp;r ) const</li>
<li class=fn>const TQBrush &amp; <a href="#brush"><b>brush</b></a> ( ColorGroup&nbsp;gr, TQColorGroup::ColorRole&nbsp;r ) const</li>
<li class=fn>void <a href="#setColor"><b>setColor</b></a> ( ColorGroup&nbsp;gr, TQColorGroup::ColorRole&nbsp;r, const&nbsp;TQColor&nbsp;&amp;&nbsp;c )</li>
@ -55,11 +55,9 @@ body { background: #ffffff; color: black; }
<li class=fn>const TQColorGroup &amp; <a href="#active"><b>active</b></a> () const</li>
<li class=fn>const TQColorGroup &amp; <a href="#disabled"><b>disabled</b></a> () const</li>
<li class=fn>const TQColorGroup &amp; <a href="#inactive"><b>inactive</b></a> () const</li>
<li class=fn>const TQColorGroup &amp; normal () const &nbsp;<em>(obsolete)</em></li>
<li class=fn>void <a href="#setActive"><b>setActive</b></a> ( const&nbsp;TQColorGroup&nbsp;&amp;&nbsp;g )</li>
<li class=fn>void <a href="#setDisabled"><b>setDisabled</b></a> ( const&nbsp;TQColorGroup&nbsp;&amp;&nbsp;g )</li>
<li class=fn>void <a href="#setInactive"><b>setInactive</b></a> ( const&nbsp;TQColorGroup&nbsp;&amp;&nbsp;g )</li>
<li class=fn>void setNormal ( const&nbsp;TQColorGroup&nbsp;&amp;&nbsp;cg ) &nbsp;<em>(obsolete)</em></li>
<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;TQPalette&nbsp;&amp;&nbsp;p ) const</li>
<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;TQPalette&nbsp;&amp;&nbsp;p ) const</li>
<li class=fn>bool <a href="#isCopyOf"><b>isCopyOf</b></a> ( const&nbsp;TQPalette&nbsp;&amp;&nbsp;p )</li>
@ -98,9 +96,7 @@ disabled for some reason.
2000 style and Macintosh Platinum style, the two styles look
slightly different.
<p> There are <a href="#setActive">setActive</a>(), <a href="#setInactive">setInactive</a>(), and <a href="#setDisabled">setDisabled</a>() functions
to modify the palette. (TQt also supports a <a href="#normal">normal</a>() group; this is
an obsolete alias for active(), supported for backwards
compatibility.)
to modify the palette.
<p> Colors and brushes can be set for particular roles in any of a
palette's color groups with <a href="#setColor">setColor</a>() and <a href="#setBrush">setBrush</a>().
<p> You can copy a palette using the copy constructor and test to see
@ -115,7 +111,6 @@ if two palettes are <em>identical</em> using <a href="#isCopyOf">isCopyOf</a>().
<li><tt>TQPalette::Active</tt>
<li><tt>TQPalette::Inactive</tt>
<li><tt>TQPalette::NColorGroups</tt>
<li><tt>TQPalette::Normal</tt> - synonym for Active
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQPalette"></a>TQPalette::TQPalette ()
@ -195,13 +190,6 @@ was subsequently modified; otherwise returns FALSE. This is much
stricter than equality.
<p> <p>See also <a href="#operator-eq">operator=</a>() and <a href="#operator-eq-eq">operator==</a>().
<h3 class=fn>const&nbsp;<a href="qcolorgroup.html">TQColorGroup</a>&nbsp;&amp; <a name="normal"></a>TQPalette::normal () const
</h3>
<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p>
<p> Returns the active color group. Use <a href="#active">active</a>() instead.
<p> <p>See also <a href="#setActive">setActive</a>() and <a href="#active">active</a>().
<h3 class=fn>bool <a name="operator!-eq"></a>TQPalette::operator!= ( const&nbsp;<a href="ntqpalette.html">TQPalette</a>&nbsp;&amp;&nbsp;p ) const
</h3>
@ -273,13 +261,6 @@ Sets the <a href="#ColorGroup-enum">Disabled</a> color group to <em>g</em>.
Sets the <a href="#ColorGroup-enum">Inactive</a> color group to <em>g</em>.
<p> <p>See also <a href="#active">active</a>(), <a href="#setDisabled">setDisabled</a>(), <a href="#setActive">setActive</a>(), and <a href="qcolorgroup.html">TQColorGroup</a>.
<h3 class=fn>void <a name="setNormal"></a>TQPalette::setNormal ( const&nbsp;<a href="qcolorgroup.html">TQColorGroup</a>&nbsp;&amp;&nbsp;cg )
</h3>
<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p>
<p> Sets the active color group to <em>cg</em>. Use <a href="#setActive">setActive</a>() instead.
<p> <p>See also <a href="#setActive">setActive</a>() and <a href="#active">active</a>().
<hr><h2>Related Functions</h2>
<h3 class=fn><a href="ntqdatastream.html">TQDataStream</a>&nbsp;&amp; <a name="operator-lt-lt"></a>operator&lt;&lt; ( <a href="ntqdatastream.html">TQDataStream</a>&nbsp;&amp;&nbsp;s, const&nbsp;<a href="ntqpalette.html">TQPalette</a>&nbsp;&amp;&nbsp;p )
</h3>

@ -257,6 +257,8 @@ have been changed:
<li> TQMenuBar::setWindowsAltMode()
<li> TQObject::initMetaObject()
<li> TQPainter::drawQuadBezier()
<li> TQPalette::normal(). Use TQPalette::active instead.
<li> TQPalette::setNormal(). Use TQPalette::setActive instead.
<li> TQPointArray::quadBezier()
<li> TQRegExp::find()
<li> TQSpinBox::downButton()
@ -355,7 +357,6 @@ new code.
<li> <a href="ntqmessagebox.html#message">TQMessageBox::message</a>( const <a href="ntqstring.html">TQString</a> &amp; caption, const TQString &amp; text, const TQString &amp; buttonText = <a href="ntqstring.html#TQString-null">TQString::null</a>, <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *= 0 )
<li> <a href="ntqmessagebox.html#query">TQMessageBox::query</a>( const TQString &amp; caption, const TQString &amp; text, const TQString &amp; yesButtonText = TQString::null, const TQString &amp; noButtonText = TQString::null, TQWidget *parent = 0, const char *= 0 )
<li> <a href="ntqmessagebox.html#standardIcon">TQMessageBox::standardIcon</a>( Icon icon, GUIStyle style )
<li> <a href="ntqpalette.html#normal">TQPalette::normal</a>()
<li> <a href="ntqregexp.html#match">TQRegExp::match</a>( const TQString &amp; str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const
<li> <a href="ntqscrollview.html#childIsVisible">TQScrollView::childIsVisible</a>( TQWidget *child )
<li> <a href="ntqscrollview.html#showChild">TQScrollView::showChild</a>( TQWidget *child, bool show = TRUE )

@ -158,7 +158,7 @@ public:
~TQPalette();
TQPalette &amp;operator=( const TQPalette &amp; );
enum ColorGroup { Disabled, Active, Inactive, NColorGroups, Normal=Active };
enum ColorGroup { Disabled, Active, Inactive, NColorGroups };
const TQColor &amp;color( ColorGroup, TQColorGroup::ColorRole ) const;
const TQBrush &amp;brush( ColorGroup, TQColorGroup::ColorRole ) const;
@ -173,16 +173,10 @@ public:
const TQColorGroup &amp;active() const { return data-&gt;active; }
const TQColorGroup &amp;disabled() const { return data-&gt;disabled; }
const TQColorGroup &amp;inactive() const { return data-&gt;inactive; }
#ifndef TQT_NO_COMPAT
const TQColorGroup &amp;normal() const { return active(); }
#endif
void setActive( const TQColorGroup &amp; );
void setDisabled( const TQColorGroup &amp; );
void setInactive( const TQColorGroup &amp; );
#ifndef TQT_NO_COMPAT
void setNormal( const TQColorGroup &amp; cg ) { setActive(cg); }
#endif
bool operator==( const TQPalette &amp;p ) const;
bool operator!=( const TQPalette &amp;p ) const

@ -44,7 +44,6 @@ body { background: #ffffff; color: black; }
<li><a href="ntqpalette.html#disabled">disabled</a>()
<li><a href="ntqpalette.html#inactive">inactive</a>()
<li><a href="ntqpalette.html#isCopyOf">isCopyOf</a>()
<li><a href="ntqpalette.html#normal">normal</a>()
<li><a href="ntqpalette.html#operator!-eq">operator!=</a>()
<li><a href="ntqpalette.html#operator-eq">operator=</a>()
<li><a href="ntqpalette.html#operator-eq-eq">operator==</a>()
@ -54,7 +53,6 @@ body { background: #ffffff; color: black; }
<li><a href="ntqpalette.html#setColor">setColor</a>()
<li><a href="ntqpalette.html#setDisabled">setDisabled</a>()
<li><a href="ntqpalette.html#setInactive">setInactive</a>()
<li><a href="ntqpalette.html#setNormal">setNormal</a>()
</ul>
<!-- eof -->
<p><address><hr><div align=center>

@ -35,7 +35,7 @@ QPalette \- Color groups for each widget state
.BI "QPalette & \fBoperator=\fR ( const QPalette & p )"
.br
.ti -1c
.BI "enum \fBColorGroup\fR { Disabled, Active, Inactive, NColorGroups, Normal = Active }"
.BI "enum \fBColorGroup\fR { Disabled, Active, Inactive, NColorGroups }"
.br
.ti -1c
.BI "const QColor & \fBcolor\fR ( ColorGroup gr, QColorGroup::ColorRole r ) const"
@ -68,9 +68,6 @@ QPalette \- Color groups for each widget state
.BI "const QColorGroup & \fBinactive\fR () const"
.br
.ti -1c
.BI "const QColorGroup & normal () const \fI(obsolete)\fR"
.br
.ti -1c
.BI "void \fBsetActive\fR ( const QColorGroup & g )"
.br
.ti -1c
@ -80,9 +77,6 @@ QPalette \- Color groups for each widget state
.BI "void \fBsetInactive\fR ( const QColorGroup & g )"
.br
.ti -1c
.BI "void setNormal ( const QColorGroup & cg ) \fI(obsolete)\fR"
.br
.ti -1c
.BI "bool \fBoperator==\fR ( const QPalette & p ) const"
.br
.ti -1c
@ -123,7 +117,7 @@ Both active and inactive windows can contain disabled widgets. (Disabled widgets
.PP
In Motif style, active() and inactive() look the same. In Windows 2000 style and Macintosh Platinum style, the two styles look slightly different.
.PP
There are setActive(), setInactive(), and setDisabled() functions to modify the palette. (Qt also supports a normal() group; this is an obsolete alias for active(), supported for backwards compatibility.)
There are setActive(), setInactive(), and setDisabled() functions to modify the palette.
.PP
Colors and brushes can be set for particular roles in any of a palette's color groups with setColor() and setBrush().
.PP
@ -140,8 +134,6 @@ See also QApplication::setPalette(), QWidget::palette, QColorGroup, QColor, Widg
\fCQPalette::Inactive\fR
.TP
\fCQPalette::NColorGroups\fR
.TP
\fCQPalette::Normal\fR - synonym for Active
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QPalette::QPalette ()"
Constructs a palette that consists of color groups with only black colors.
@ -195,12 +187,6 @@ See also QColorGroup, setInactive(), active(), and disabled().
Returns TRUE if this palette and \fIp\fR are copies of each other, i.e. one of them was created as a copy of the other and neither was subsequently modified; otherwise returns FALSE. This is much stricter than equality.
.PP
See also operator=() and operator==().
.SH "const QColorGroup & QPalette::normal () const"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Returns the active color group. Use active() instead.
.PP
See also setActive() and active().
.SH "bool QPalette::operator!= ( const QPalette & p ) const"
Returns TRUE (slowly) if this palette is different from \fIp\fR; otherwise returns FALSE (usually quickly).
.SH "QPalette & QPalette::operator= ( const QPalette & p )"
@ -251,12 +237,6 @@ See also disabled(), setActive(), and setInactive().
Sets the Inactive color group to \fIg\fR.
.PP
See also active(), setDisabled(), setActive(), and QColorGroup.
.SH "void QPalette::setNormal ( const QColorGroup & cg )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Sets the active color group to \fIcg\fR. Use setActive() instead.
.PP
See also setActive() and active().
.SH RELATED FUNCTION DOCUMENTATION
.SH "QDataStream & operator<< ( QDataStream & s, const QPalette & p )"
Writes the palette, \fIp\fR to the stream \fIs\fR and returns a reference to the stream.

@ -206,6 +206,8 @@ All these functions have been removed in TQt 3.x:
\i QMenuBar::setWindowsAltMode()
\i QObject::initMetaObject()
\i QPainter::drawQuadBezier()
\i QPalette::normal(). Use TQPalette::active instead.
\i QPalette::setNormal(). Use TQPalette::setActive instead.
\i QPointArray::quadBezier()
\i QRegExp::find()
\i QSpinBox::downButton()
@ -308,7 +310,6 @@ new code.
\i QMessageBox::message( const QString \& caption, const QString \& text, const QString \& buttonText = QString::null, QWidget *parent = 0, const char *= 0 )
\i QMessageBox::query( const QString \& caption, const QString \& text, const QString \& yesButtonText = QString::null, const QString \& noButtonText = QString::null, QWidget *parent = 0, const char *= 0 )
\i QMessageBox::standardIcon( Icon icon, GUIStyle style )
\i QPalette::normal()
\i QRegExp::match( const QString \& str, int index = 0, int *len = 0, bool indexIsStart = TRUE ) const
\i QScrollView::childIsVisible( QWidget *child )
\i QScrollView::showChild( QWidget *child, bool show = TRUE )

@ -122,7 +122,7 @@ public:
~TQPalette();
TQPalette &operator=( const TQPalette & );
enum ColorGroup { Disabled, Active, Inactive, NColorGroups, Normal=Active };
enum ColorGroup { Disabled, Active, Inactive, NColorGroups };
const TQColor &color( ColorGroup, TQColorGroup::ColorRole ) const;
const TQBrush &brush( ColorGroup, TQColorGroup::ColorRole ) const;
@ -137,16 +137,10 @@ public:
const TQColorGroup &active() const { return data->active; }
const TQColorGroup &disabled() const { return data->disabled; }
const TQColorGroup &inactive() const { return data->inactive; }
#ifndef TQT_NO_COMPAT
const TQColorGroup &normal() const { return active(); }
#endif
void setActive( const TQColorGroup & );
void setDisabled( const TQColorGroup & );
void setInactive( const TQColorGroup & );
#ifndef TQT_NO_COMPAT
void setNormal( const TQColorGroup & cg ) { setActive(cg); }
#endif
bool operator==( const TQPalette &p ) const;
bool operator!=( const TQPalette &p ) const

@ -548,9 +548,7 @@ bool TQColorGroup::operator==( const TQColorGroup &g ) const
slightly different.
There are setActive(), setInactive(), and setDisabled() functions
to modify the palette. (TQt also supports a normal() group; this is
an obsolete alias for active(), supported for backwards
compatibility.)
to modify the palette.
Colors and brushes can be set for particular roles in any of a
palette's color groups with setColor() and setBrush().
@ -568,30 +566,8 @@ bool TQColorGroup::operator==( const TQColorGroup &g ) const
\value Active
\value Inactive
\value NColorGroups
\value Normal synonym for Active
*/
/*!
\obsolete
\fn const TQColorGroup &TQPalette::normal() const
Returns the active color group. Use active() instead.
\sa setActive() active()
*/
/*!
\obsolete
\fn void TQPalette::setNormal( const TQColorGroup & cg )
Sets the active color group to \a cg. Use setActive() instead.
\sa setActive() active()
*/
static int palette_count = 1;
/*!

Loading…
Cancel
Save