summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqstylesheet.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 15:17:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 19:38:03 +0900
commit7d612f7c91d55501276a385a30dbadb121e7bd9f (patch)
tree4c6f1546e16db32779dfbf5c9e107b938faee6bb /src/kernel/tqstylesheet.cpp
parent5a863a8932d14b99c5f838c4efa1618070d71b29 (diff)
downloadtqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.tar.gz
tqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.zip
Replace TRUE/FALSE with boolean values true/false - part 8HEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel/tqstylesheet.cpp')
-rw-r--r--src/kernel/tqstylesheet.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/kernel/tqstylesheet.cpp b/src/kernel/tqstylesheet.cpp
index c03cc792e..afa9fa057 100644
--- a/src/kernel/tqstylesheet.cpp
+++ b/src/kernel/tqstylesheet.cpp
@@ -226,7 +226,7 @@ void TQStyleSheetItem::init()
d->fontsizestep = 0;
d->ncolumns = Undefined;
d->col = TQColor(); // !isValid()
- d->anchor = FALSE;
+ d->anchor = false;
d->align = Undefined;
d->valign = VAlignBaseline;
d->margin[0] = Undefined;
@@ -236,7 +236,7 @@ void TQStyleSheetItem::init()
d->margin[4] = Undefined;
d->list = ListStyleUndefined;
d->whitespacemode = WhiteSpaceModeUndefined;
- d->selfnest = TRUE;
+ d->selfnest = true;
d->lineSpacing = Undefined;
}
@@ -356,8 +356,8 @@ void TQStyleSheetItem::setVerticalAlignment( VerticalAlignment valign )
/*!
- Returns TRUE if the style sets an italic font; otherwise returns
- FALSE.
+ Returns true if the style sets an italic font; otherwise returns
+ false.
\sa setFontItalic(), definesFontItalic()
*/
@@ -367,7 +367,7 @@ bool TQStyleSheetItem::fontItalic() const
}
/*!
- If \a italic is TRUE sets italic for the style; otherwise sets
+ If \a italic is true sets italic for the style; otherwise sets
upright.
\sa fontItalic(), definesFontItalic()
@@ -378,8 +378,8 @@ void TQStyleSheetItem::setFontItalic(bool italic)
}
/*!
- Returns TRUE if the style defines a font shape; otherwise returns
- FALSE. A style does not define any shape until setFontItalic() is
+ Returns true if the style defines a font shape; otherwise returns
+ false. A style does not define any shape until setFontItalic() is
called.
\sa setFontItalic(), fontItalic()
@@ -390,8 +390,8 @@ bool TQStyleSheetItem::definesFontItalic() const
}
/*!
- Returns TRUE if the style sets an underlined font; otherwise
- returns FALSE.
+ Returns true if the style sets an underlined font; otherwise
+ returns false.
\sa setFontUnderline(), definesFontUnderline()
*/
@@ -401,7 +401,7 @@ bool TQStyleSheetItem::fontUnderline() const
}
/*!
- If \a underline is TRUE, sets underline for the style; otherwise
+ If \a underline is true, sets underline for the style; otherwise
sets no underline.
\sa fontUnderline(), definesFontUnderline()
@@ -412,8 +412,8 @@ void TQStyleSheetItem::setFontUnderline(bool underline)
}
/*!
- Returns TRUE if the style defines a setting for the underline
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the underline
+ property of the font; otherwise returns false. A style does not
define this until setFontUnderline() is called.
\sa setFontUnderline(), fontUnderline()
@@ -425,8 +425,8 @@ bool TQStyleSheetItem::definesFontUnderline() const
/*!
- Returns TRUE if the style sets a strike out font; otherwise
- returns FALSE.
+ Returns true if the style sets a strike out font; otherwise
+ returns false.
\sa setFontStrikeOut(), definesFontStrikeOut()
*/
@@ -436,7 +436,7 @@ bool TQStyleSheetItem::fontStrikeOut() const
}
/*!
- If \a strikeOut is TRUE, sets strike out for the style; otherwise
+ If \a strikeOut is true, sets strike out for the style; otherwise
sets no strike out.
\sa fontStrikeOut(), definesFontStrikeOut()
@@ -447,8 +447,8 @@ void TQStyleSheetItem::setFontStrikeOut(bool strikeOut)
}
/*!
- Returns TRUE if the style defines a setting for the strikeOut
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the strikeOut
+ property of the font; otherwise returns false. A style does not
define this until setFontStrikeOut() is called.
\sa setFontStrikeOut(), fontStrikeOut()
@@ -633,7 +633,7 @@ bool TQStyleSheetItem::isAnchor() const
}
/*!
- If \a anc is TRUE, sets this style to be an anchor (hypertext
+ If \a anc is true, sets this style to be an anchor (hypertext
link); otherwise sets it to not be an anchor. Elements in this
style link to other documents or anchors.
@@ -781,22 +781,22 @@ void TQStyleSheetItem::setContexts( const TQString& c)
}
/*!
- Returns TRUE if this style can be nested into an element of style
- \a s; otherwise returns FALSE.
+ Returns true if this style can be nested into an element of style
+ \a s; otherwise returns false.
\sa contexts(), setContexts()
*/
bool TQStyleSheetItem::allowedInContext( const TQStyleSheetItem* s) const
{
if ( d->contxt.isEmpty() )
- return TRUE;
+ return true;
return d->contxt.find( TQChar(' ')+s->name()+TQChar(' ')) != -1;
}
/*!
- Returns TRUE if this style has self-nesting enabled; otherwise
- returns FALSE.
+ Returns true if this style has self-nesting enabled; otherwise
+ returns false.
\sa setSelfNesting()
*/
@@ -1112,7 +1112,7 @@ TQStyleSheet::~TQStyleSheet()
*/
void TQStyleSheet::init()
{
- styles.setAutoDelete( TRUE );
+ styles.setAutoDelete( true );
nullstyle = new TQStyleSheetItem( this,
TQString::fromLatin1("") );
@@ -1126,13 +1126,13 @@ void TQStyleSheet::init()
style->setDisplayMode( TQStyleSheetItem::DisplayBlock );
style = new TQStyleSheetItem( this, TQString::fromLatin1("a") );
- style->setAnchor( TRUE );
+ style->setAnchor( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("em") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("i") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("big") );
style->setLogicalFontSizeStep( 1 );
@@ -1185,7 +1185,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("p") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
style-> setMargin(TQStyleSheetItem::MarginVertical, 12);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("center") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
@@ -1213,7 +1213,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("li") );
style->setDisplayMode(TQStyleSheetItem::DisplayListItem);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("code") );
style->setFontFamily( TQString::fromLatin1("Courier New,courier") );
@@ -1258,9 +1258,9 @@ void TQStyleSheet::init()
style->setMargin(TQStyleSheetItem::MarginLeft, 30);
style->setContexts(TQString::fromLatin1("dt dl") );
style = new TQStyleSheetItem( this, TQString::fromLatin1("u") );
- style->setFontUnderline( TRUE);
+ style->setFontUnderline( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("s") );
- style->setFontStrikeOut( TRUE);
+ style->setFontStrikeOut( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("nobr") );
style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpaceNoWrap );
@@ -1498,7 +1498,7 @@ TQString TQStyleSheet::escape( const TQString& plain)
string using the current TQStyleSheet::defaultSheet().
\value AutoText The text string is interpreted as for \c RichText
- if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as
+ if TQStyleSheet::mightBeRichText() returns true, otherwise as
\c PlainText.
\value LogText A special, limited text format which is only used
@@ -1506,8 +1506,8 @@ TQString TQStyleSheet::escape( const TQString& plain)
*/
/*!
- Returns TRUE if the string \a text is likely to be rich text;
- otherwise returns FALSE.
+ Returns true if the string \a text is likely to be rich text;
+ otherwise returns false.
This function uses a fast and therefore simple heuristic. It
mainly checks whether there is something that looks like a tag
@@ -1517,18 +1517,18 @@ TQString TQStyleSheet::escape( const TQString& plain)
bool TQStyleSheet::mightBeRichText( const TQString& text)
{
if ( text.isEmpty() )
- return FALSE;
+ return false;
int start = 0;
while ( start < int(text.length()) && text[start].isSpace() )
++start;
if ( text.mid( start, 5 ).lower() == "<!doc" )
- return TRUE;
+ return true;
int open = start;
while ( open < int(text.length()) && text[open] != '<'
&& text[open] != '\n' ) {
if ( text[open] == '&' && text.mid(open+1,3) == "lt;" )
- return TRUE; // support desperate attempt of user to see <...>
+ return true; // support desperate attempt of user to see <...>
++open;
}
if ( open < (int)text.length() && text[open] == '<' ) {
@@ -1541,12 +1541,12 @@ bool TQStyleSheet::mightBeRichText( const TQString& text)
else if ( !tag.isEmpty() && text[i].isSpace() )
break;
else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) )
- return FALSE; // that's not a tag
+ return false; // that's not a tag
}
return defaultSheet()->item( tag.lower() ) != 0;
}
}
- return FALSE;
+ return false;
}
@@ -1586,10 +1586,10 @@ void TQStyleSheet::scaleFont( TQFont& font, int logicalSize ) const
if ( logicalSize > 7 )
logicalSize = 7;
int baseSize = font.pointSize();
- bool pixel = FALSE;
+ bool pixel = false;
if ( baseSize == -1 ) {
baseSize = font.pixelSize();
- pixel = TRUE;
+ pixel = true;
}
int s;
switch ( logicalSize ) {