diff options
Diffstat (limited to 'lib')
137 files changed, 774 insertions, 774 deletions
diff --git a/lib/kformula/config/esstixeight.font b/lib/kformula/config/esstixeight.font index 88992333..37cbdfdb 100644 --- a/lib/kformula/config/esstixeight.font +++ b/lib/kformula/config/esstixeight.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixeight font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 33, 0xE201 37, 0xE205 diff --git a/lib/kformula/config/esstixeleven.font b/lib/kformula/config/esstixeleven.font index 41e9fbe1..d94bd375 100644 --- a/lib/kformula/config/esstixeleven.font +++ b/lib/kformula/config/esstixeleven.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixeleven font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixfifteen.font b/lib/kformula/config/esstixfifteen.font index 920be0c1..3df00e54 100644 --- a/lib/kformula/config/esstixfifteen.font +++ b/lib/kformula/config/esstixfifteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixfifteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixfive.font b/lib/kformula/config/esstixfive.font index 62724a84..9f57fec2 100644 --- a/lib/kformula/config/esstixfive.font +++ b/lib/kformula/config/esstixfive.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfive font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 52, 0x2295 53, 0x2297 diff --git a/lib/kformula/config/esstixfour.font b/lib/kformula/config/esstixfour.font index 411a138a..dc6844b9 100644 --- a/lib/kformula/config/esstixfour.font +++ b/lib/kformula/config/esstixfour.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfour font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 56, 0x2291 77, 0x2290 diff --git a/lib/kformula/config/esstixfourteen.font b/lib/kformula/config/esstixfourteen.font index 723a4094..802c47ec 100644 --- a/lib/kformula/config/esstixfourteen.font +++ b/lib/kformula/config/esstixfourteen.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfourteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 99, 0x2138 97, 0x2135 diff --git a/lib/kformula/config/esstixnine.font b/lib/kformula/config/esstixnine.font index e294bd6d..4f4e6197 100644 --- a/lib/kformula/config/esstixnine.font +++ b/lib/kformula/config/esstixnine.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixnine font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixone.font b/lib/kformula/config/esstixone.font index df3e95ec..9ff6cabf 100644 --- a/lib/kformula/config/esstixone.font +++ b/lib/kformula/config/esstixone.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixone font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 75, 0x219B 70, 0x219A diff --git a/lib/kformula/config/esstixseven.font b/lib/kformula/config/esstixseven.font index 37650ee1..25a7d01c 100644 --- a/lib/kformula/config/esstixseven.font +++ b/lib/kformula/config/esstixseven.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixseven font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 61, 0x0028 62, 0x0029 diff --git a/lib/kformula/config/esstixseventeen.font b/lib/kformula/config/esstixseventeen.font index 00df77cd..c3b8f311 100644 --- a/lib/kformula/config/esstixseventeen.font +++ b/lib/kformula/config/esstixseventeen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixseventeen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixsix.font b/lib/kformula/config/esstixsix.font index 43e2752c..a6412a58 100644 --- a/lib/kformula/config/esstixsix.font +++ b/lib/kformula/config/esstixsix.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixsix font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 46, 0x220F 35, 0x222E diff --git a/lib/kformula/config/esstixsixteen.font b/lib/kformula/config/esstixsixteen.font index 2a96c0c1..c212e08d 100644 --- a/lib/kformula/config/esstixsixteen.font +++ b/lib/kformula/config/esstixsixteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixsixteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixten.font b/lib/kformula/config/esstixten.font index fa9c5ee2..dd4c2b0f 100644 --- a/lib/kformula/config/esstixten.font +++ b/lib/kformula/config/esstixten.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixten font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 118, 0x2202 86, 0x2207 diff --git a/lib/kformula/config/esstixthirteen.font b/lib/kformula/config/esstixthirteen.font index cee5bf99..fc13f891 100644 --- a/lib/kformula/config/esstixthirteen.font +++ b/lib/kformula/config/esstixthirteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixthirteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixthree.font b/lib/kformula/config/esstixthree.font index fe359c1f..c55acaeb 100644 --- a/lib/kformula/config/esstixthree.font +++ b/lib/kformula/config/esstixthree.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixthree font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 101, 0x2204 95, 0x227B diff --git a/lib/kformula/config/esstixtwelve.font b/lib/kformula/config/esstixtwelve.font index 3a4b9d23..b82e5d7f 100644 --- a/lib/kformula/config/esstixtwelve.font +++ b/lib/kformula/config/esstixtwelve.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixtwelve font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # diff --git a/lib/kformula/config/esstixtwo.font b/lib/kformula/config/esstixtwo.font index 201f95e1..ed83909f 100644 --- a/lib/kformula/config/esstixtwo.font +++ b/lib/kformula/config/esstixtwo.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixtwo font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its tqunicode value. +# Each line consist of a char position and its unicode value. # 100, 0x2203 99, 0x2200 diff --git a/lib/kformula/config/unicode.tbl b/lib/kformula/config/unicode.tbl index d86b1df3..e3e27db8 100644 --- a/lib/kformula/config/unicode.tbl +++ b/lib/kformula/config/unicode.tbl @@ -1,6 +1,6 @@ # -# KFormula tqunicode table -# Each line contains the tqunicode value, the char class +# KFormula unicode table +# Each line contains the unicode value, the char class # (ORDINARY, BINOP or RELATION) and optionally the # chars TeX name. # diff --git a/lib/kformula/elementtype.cc b/lib/kformula/elementtype.cc index a2e44ee6..bd2c3373 100644 --- a/lib/kformula/elementtype.cc +++ b/lib/kformula/elementtype.cc @@ -406,9 +406,9 @@ void AbstractOperatorType::saveMathML( SequenceElement* se, TQDomDocument& doc, op.appendChild( doc.createTextNode( be->getCharacter() ) ); } else { - // tqunicode char + // unicode char TQString s; - op.appendChild( doc.createEntityReference( s.sprintf( "#x%05X", be->getCharacter().tqunicode() ) ) ); + op.appendChild( doc.createEntityReference( s.sprintf( "#x%05X", be->getCharacter().unicode() ) ) ); } TextElement* te = static_cast<TextElement*>( be ); TQString mathvariant = format2variant( te->getCharStyle(), te->getCharFamily() ); diff --git a/lib/kformula/entities.h b/lib/kformula/entities.h index 78e39315..38a5a0e8 100644 --- a/lib/kformula/entities.h +++ b/lib/kformula/entities.h @@ -38,7 +38,7 @@ struct entityMap { return strcmp( name, right ) < 0; } const char* name; - const uint tqunicode; + const uint unicode; }; extern const entityMap entities[]; diff --git a/lib/kformula/fontstyle.h b/lib/kformula/fontstyle.h index 8132bbb6..9fcd78b7 100644 --- a/lib/kformula/fontstyle.h +++ b/lib/kformula/fontstyle.h @@ -48,7 +48,7 @@ public: */ bool init( ContextStyle* context, bool install = true ); - /// the table for ordinary symbols (those that have a tqunicode value) + /// the table for ordinary symbols (those that have a unicode value) const SymbolTable* symbolTable() const { return &m_symbolTable; } SymbolTable* symbolTable() { return &m_symbolTable; } diff --git a/lib/kformula/glyphelement.cc b/lib/kformula/glyphelement.cc index db509eef..709609cf 100644 --- a/lib/kformula/glyphelement.cc +++ b/lib/kformula/glyphelement.cc @@ -152,7 +152,7 @@ void GlyphElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, void GlyphElement::writeMathMLAttributes( TQDomElement& element ) const { element.setAttribute( "fontfamily", m_fontFamily ); - element.setAttribute( "index", m_char.tqunicode() ); + element.setAttribute( "index", m_char.unicode() ); element.setAttribute( "alt", m_alt ); } diff --git a/lib/kformula/kformulacompatibility.h b/lib/kformula/kformulacompatibility.h index 9be5c7ba..a221854c 100644 --- a/lib/kformula/kformulacompatibility.h +++ b/lib/kformula/kformulacompatibility.h @@ -51,8 +51,8 @@ private: TQDomElement findIndexNode(const TQDomDocument& doc, TQDomElement sequence); - ushort nextToken() { return formulaString[pos++].tqunicode(); } - ushort lookAhead(uint i) const { return formulaString[pos+i].tqunicode(); } + ushort nextToken() { return formulaString[pos++].unicode(); } + ushort lookAhead(uint i) const { return formulaString[pos+i].unicode(); } void pushback() { pos--; } bool hasNext() const { return pos < formulaString.length(); } diff --git a/lib/kformula/kformulaconfigpage.cc b/lib/kformula/kformulaconfigpage.cc index 21c3b946..87160a98 100644 --- a/lib/kformula/kformulaconfigpage.cc +++ b/lib/kformula/kformulaconfigpage.cc @@ -63,7 +63,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi TQGroupBox *gbox = new TQGroupBox( i18n( "Fonts" ), box ); gbox->setColumnLayout( 0, Qt::Horizontal ); - TQGridLayout* grid = new TQGridLayout( gbox->tqlayout(), 5, 3 ); + TQGridLayout* grid = new TQGridLayout( gbox->layout(), 5, 3 ); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -108,7 +108,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi // hlBox = new TQGroupBox( i18n( "Highlight Colors" ), box ); // hlBox->setColumnLayout( 0, Qt::Horizontal ); -// grid = new TQGridLayout( hlBox->tqlayout(), 5, 2 ); +// grid = new TQGridLayout( hlBox->layout(), 5, 2 ); // grid->setSpacing( KDialog::spacingHint() ); // TQLabel* defaultLabel = new TQLabel( hlBox, "defaultLabel" ); @@ -168,7 +168,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi TQPushButton* ConfigurePage::buildFontLine( TQWidget* parent, - TQGridLayout* tqlayout, int number, TQFont font, TQString name, + TQGridLayout* layout, int number, TQFont font, TQString name, TQLabel*& fontName ) { TQLabel* fontTitle = new TQLabel( name, parent ); @@ -180,9 +180,9 @@ TQPushButton* ConfigurePage::buildFontLine( TQWidget* parent, TQPushButton* chooseButton = new TQPushButton( i18n( "Choose..." ), parent ); - tqlayout->addWidget( fontTitle, number, 0 ); - tqlayout->addWidget( fontName, number, 1 ); - tqlayout->addWidget( chooseButton, number, 2 ); + layout->addWidget( fontTitle, number, 0 ); + layout->addWidget( fontName, number, 1 ); + layout->addWidget( chooseButton, number, 2 ); return chooseButton; } diff --git a/lib/kformula/kformulaconfigpage.h b/lib/kformula/kformulaconfigpage.h index e3ff716a..2649ffa3 100644 --- a/lib/kformula/kformulaconfigpage.h +++ b/lib/kformula/kformulaconfigpage.h @@ -76,7 +76,7 @@ protected slots: private: - TQPushButton* buildFontLine( TQWidget* fontWidget, TQGridLayout* tqlayout, int number, + TQPushButton* buildFontLine( TQWidget* fontWidget, TQGridLayout* layout, int number, TQFont font, TQString name, TQLabel*& fontName ); void updateFontLabel( TQFont font, TQLabel* label ); diff --git a/lib/kformula/kformulacontainer.cc b/lib/kformula/kformulacontainer.cc index f533db86..4d4aa96c 100644 --- a/lib/kformula/kformulacontainer.cc +++ b/lib/kformula/kformulacontainer.cc @@ -339,7 +339,7 @@ void Container::paste() { if (!hasValidCursor()) return; - TQClipboard* clipboard = TQApplication::tqclipboard(); + TQClipboard* clipboard = TQApplication::clipboard(); const TQMimeSource* source = clipboard->data(); if (source->provides( MimeSource::selectionMimeType() )) { TQByteArray data = source->encodedData( MimeSource::selectionMimeType() ); @@ -374,7 +374,7 @@ void Container::copy() if (cursor != 0) { TQDomDocument formula = document()->createMathMLDomDocument(); cursor->copy( formula ); - TQClipboard* clipboard = TQApplication::tqclipboard(); + TQClipboard* clipboard = TQApplication::clipboard(); clipboard->setData(new MimeSource(document(), formula)); } } diff --git a/lib/kformula/kformuladefs.h b/lib/kformula/kformuladefs.h index 80879f98..855121c7 100644 --- a/lib/kformula/kformuladefs.h +++ b/lib/kformula/kformuladefs.h @@ -163,7 +163,7 @@ enum TokenElementType { * The struct used to store static font data. */ struct InternFontTable { - short tqunicode; + short unicode; TQChar pos; CharClass cl; CharStyle style; diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index 9caa66cb..ecd621ee 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -200,7 +200,7 @@ TQDomDocument Document::createDomDocument() } /** - * Create a MathML Dom Document, deprecates KFO Dom Document for internal tqlayout + * Create a MathML Dom Document, deprecates KFO Dom Document for internal layout * TODO: Shouldn't this go to KoDocument ? */ TQDomDocument Document::createMathMLDomDocument() @@ -969,7 +969,7 @@ void DocumentWrapper::insertSymbol() { if ( hasFormula() && m_document->m_contextStyle->symbolTable().contains( m_selectedName ) ) { - TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( m_selectedName ); + TQChar ch = m_document->m_contextStyle->symbolTable().unicode( m_selectedName ); if ( ch != TQChar::null ) { TextCharRequest r( ch, true ); formula()->performRequest( &r ); @@ -985,7 +985,7 @@ void DocumentWrapper::insertSymbol( TQString name ) { if ( hasFormula() ) { if ( m_document->m_contextStyle->symbolTable().contains( name ) ) { - TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( name ); + TQChar ch = m_document->m_contextStyle->symbolTable().unicode( name ); if ( ch != TQChar::null ) { TextCharRequest r( ch, true ); formula()->performRequest( &r ); @@ -1174,7 +1174,7 @@ void DocumentWrapper::initSymbolNamesAction() for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it, ++i ) { - chars[ i ] = st.tqunicode( *it ); + chars[ i ] = st.unicode( *it ); } m_symbolNamesAction->setSymbols( names, m_document->m_contextStyle->getMathFont(), chars ); m_selectedName = names[0]; diff --git a/lib/kformula/kformuladocument.h b/lib/kformula/kformuladocument.h index 46de5774..4d757262 100644 --- a/lib/kformula/kformuladocument.h +++ b/lib/kformula/kformuladocument.h @@ -188,7 +188,7 @@ public: static TQDomDocument createDomDocument(); /** - * Create a MathML Dom Document, deprecates KFO Dom Document for internal tqlayout + * Create a MathML Dom Document, deprecates KFO Dom Document for internal layout * TODO: Shouldn't this go to KoDocument ? */ TQDomDocument createMathMLDomDocument(); diff --git a/lib/kformula/main.cc b/lib/kformula/main.cc index 57344739..56a9e837 100644 --- a/lib/kformula/main.cc +++ b/lib/kformula/main.cc @@ -277,7 +277,7 @@ int main(int argc, char** argv) // Make sure there are no elements in the clipboard. // Okey for a debug app. - TQApplication::tqclipboard()->clear(); + TQApplication::clipboard()->clear(); int destruct = BasicElement::getEvilDestructionCount(); if (destruct != 0) { diff --git a/lib/kformula/prototype/gensymbolfontmap.py b/lib/kformula/prototype/gensymbolfontmap.py index 0f9f3a11..a1373815 100644 --- a/lib/kformula/prototype/gensymbolfontmap.py +++ b/lib/kformula/prototype/gensymbolfontmap.py @@ -3,7 +3,7 @@ import time from xml.sax import saxutils, handler, make_parser -tqunicodetable = { "normal":{}, "bold":{}, "italic":{}, +unicodetable = { "normal":{}, "bold":{}, "italic":{}, "slant":{}, "boldItalic":{} } fonttable = {} @@ -14,7 +14,7 @@ class ContentGenerator(handler.ContentHandler): self.font = None def startElement(self, name, attrs): - if name == 'tqunicodetable': + if name == 'unicodetable': self.font = None for (name, value) in attrs.items(): if name == "font" and value: @@ -31,7 +31,7 @@ class ContentGenerator(handler.ContentHandler): elif name == "style": style = value if number != '': - tqunicodetable[style][number] = (latexName, charClass) + unicodetable[style][number] = (latexName, charClass) fonttable[self.font].append((key, number, style)) def fontkey(font, style, number): @@ -43,9 +43,9 @@ def fontkey(font, style, number): def writeFontTable(fontname, f): f.write('\n\nstatic InternFontTable ' + fontname + 'Map[] = {\n') - for style in tqunicodetable: - for key in tqunicodetable[style]: - latexName, charClass = tqunicodetable[style][key] + for style in unicodetable: + for key in unicodetable[style]: + latexName, charClass = unicodetable[style][key] pos = fontkey(fontname, style, key) if pos: f.write(' { ' + key + ', ' + hex(pos) + ', ' + charClass + ', ' + style + 'Char },\n') @@ -107,14 +107,14 @@ def main(): writeFontTable(fn, f) f.close() - f = open('../tqunicodenames.cc', 'w') + f = open('../unicodenames.cc', 'w') write_header(f) - print >>f, 'struct UnicodeNameTable { short tqunicode; const char* name; };' + print >>f, 'struct UnicodeNameTable { short unicode; const char* name; };' print >>f, 'static UnicodeNameTable nameTable[] = {' nameDir = {} table = {} - for style in tqunicodetable: - table.update(tqunicodetable[style]) + for style in unicodetable: + table.update(unicodetable[style]) for key in table: latexName, charClass = table[key] @@ -128,10 +128,10 @@ def main(): -def make_tqunicode_table(): +def make_unicode_table(): header = [] codes = {} - f = open('../config/tqunicode.tbl', 'r') + f = open('../config/unicode.tbl', 'r') for line in f.xreadlines(): if line[0] == '#': header.append(line.strip()) @@ -142,14 +142,14 @@ def make_tqunicode_table(): codes[line.split(',')[0].strip()] = line f.close() - for key in tqunicodetable: - latexName, charClass = tqunicodetable[key] + for key in unicodetable: + latexName, charClass = unicodetable[key] if len(latexName) > 0: codes[key] = key + ', ' + charClass + ', ' + latexName.replace('\\', '') else: codes[key] = key + ', ' + charClass - f = open('../config/tqunicode.tbl', 'w') + f = open('../config/unicode.tbl', 'w') for line in header: print >> f, line for key in codes: @@ -174,8 +174,8 @@ def make_font_table(font): ## for line in header: ## print >> f, line #print >> f, "name = " + font - for key in tqunicodetable: - latexName, charClass = tqunicodetable[key] + for key in unicodetable: + latexName, charClass = unicodetable[key] pos = fontkey(font, key) if pos: print >> f, str(pos), key, charClass, latexName @@ -186,30 +186,30 @@ def make_all_font_tables(): make_font_table(font) -def symbol_entry(pos, tqunicode, charClass, name): +def symbol_entry(pos, unicode, charClass, name): return ' <entry key="%d" number="%s" name="%s" class="%s"/>' % \ - (pos, tqunicode, name, charClass) + (pos, unicode, name, charClass) def compare_font(font): for line in file(font+".font"): list = line.split() pos = int(list[0]) - tqunicode = list[1] + unicode = list[1] charClass = list[2] if len(list)>3: name = list[3] else: name = "" - if (pos, tqunicode) not in fonttable[font]: - print "not in font", font, (pos, tqunicode) - print symbol_entry(pos, tqunicode, charClass, name) - if tqunicode not in tqunicodetable: - print font, tqunicode, (name, charClass) - print symbol_entry(pos, tqunicode, charClass, name) - elif tqunicodetable[tqunicode] != (name, charClass): - print font, tqunicode, pos, tqunicodetable[tqunicode], "!=", (name, charClass) + if (pos, unicode) not in fonttable[font]: + print "not in font", font, (pos, unicode) + print symbol_entry(pos, unicode, charClass, name) + if unicode not in unicodetable: + print font, unicode, (name, charClass) + print symbol_entry(pos, unicode, charClass, name) + elif unicodetable[unicode] != (name, charClass): + print font, unicode, pos, unicodetable[unicode], "!=", (name, charClass) def compare(): fontnames = [ "symbol", @@ -241,10 +241,10 @@ if __name__ == '__main__': parser.parse("symbol.xml") #print fonttable - #print tqunicodetable + #print unicodetable #compare() main() - #make_tqunicode_table() + #make_unicode_table() #make_all_font_tables() diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py index 585574cf..3559711d 100755 --- a/lib/kformula/prototype/unicode.py +++ b/lib/kformula/prototype/unicode.py @@ -130,7 +130,7 @@ class Widget(QWidget): print >> f, '<?xml version="1.0" encoding="iso-8859-1"?>' print >> f, '<table>' for font in self.fonts: - print >> f, ' <tqunicodetable font="' + font + '">' + print >> f, ' <unicodetable font="' + font + '">' for (key, number, latexName, charClass) in self.fonts[font]: if not charClass or charClass == '': charClass = 'ORDINARY' @@ -140,7 +140,7 @@ class Widget(QWidget): '" class="' + str(charClass) + \ '"/>' - print >> f, ' </tqunicodetable>' + print >> f, ' </unicodetable>' print >> f, '</table>' f.close() @@ -152,7 +152,7 @@ class ContentGenerator(handler.ContentHandler): self.currentFont = None def startElement(self, name, attrs): - if name == 'tqunicodetable': + if name == 'unicodetable': for (name, value) in attrs.items(): if name == "font": self.currentFont = value diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py index 35b79a55..16d71959 100755 --- a/lib/kformula/scripts/bycodes.py +++ b/lib/kformula/scripts/bycodes.py @@ -25,11 +25,11 @@ import qt def decode( fd, font, line ): begin = string.find( line, '"' ) end = string.find( line, '"', begin + 1) - tqunicode = line[begin + 2:end] # Remove 'U' from string aswell + unicode = line[begin + 2:end] # Remove 'U' from string aswell char_list = [] - separation = string.find( tqunicode, '-' ) + separation = string.find( unicode, '-' ) if separation != -1: - second = tqunicode + second = unicode while separation != -1: first = second[0:separation] second = second[separation + 2:] @@ -38,13 +38,13 @@ def decode( fd, font, line ): if separation == -1: char_list.append( string.atoi( second, 16 ) ) else: - char_list.append( string.atoi ( tqunicode, 16 ) ) + char_list.append( string.atoi ( unicode, 16 ) ) fm = qt.QFontMetrics( qt.QFont( font ) ) in_font = True for c in char_list: if not fm.inFont( qt.QChar( c ) ): in_font = False - fd.write( tqunicode + ' ' + str( in_font ) + '\n') + fd.write( unicode + ' ' + str( in_font ) + '\n') def parse( file, font ): fd = open( file ) diff --git a/lib/kformula/scripts/bynames.py b/lib/kformula/scripts/bynames.py index 0829cf90..afb9ece5 100755 --- a/lib/kformula/scripts/bynames.py +++ b/lib/kformula/scripts/bynames.py @@ -66,7 +66,7 @@ struct entityMap { return qstrcmp( name, right ) < 0; } const char* name; - const uint tqunicode; + const uint unicode; }; extern const entityMap entities[]; diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc index c44c1b50..e3573174 100644 --- a/lib/kformula/sequenceelement.cc +++ b/lib/kformula/sequenceelement.cc @@ -1184,7 +1184,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request const SymbolTable& table = container->document()->getSymbolTable(); if (table.greekLetters().find(element->getCharacter()) != -1) { KFCReplace* command = new KFCReplace( i18n( "Change Char to Symbol" ), container ); - TextElement* symbol = creationStrategy->createTextElement( table.tqunicodeFromSymbolFont( element->getCharacter() ), true ); + TextElement* symbol = creationStrategy->createTextElement( table.unicodeFromSymbolFont( element->getCharacter() ), true ); command->addElement( symbol ); return command; } @@ -1311,8 +1311,8 @@ KCommand* SequenceElement::input( Container* container, TQKeyEvent* event ) KCommand* SequenceElement::input( Container* container, TQChar ch ) { - int tqunicode = ch.tqunicode(); - switch (tqunicode) { + int unicode = ch.unicode(); + switch (unicode) { case '(': { BracketRequest r( container->document()->leftBracketChar(), container->document()->rightBracketChar() ); @@ -1700,8 +1700,8 @@ KCommand* NameSequence::buildCommand( Container* container, Request* request ) KCommand* NameSequence::input( Container* container, TQChar ch ) { - int tqunicode = ch.tqunicode(); - switch (tqunicode) { + int unicode = ch.unicode(); + switch (unicode) { case '(': case '[': case '|': @@ -1746,12 +1746,12 @@ void NameSequence::setElementType( ElementType* t ) BasicElement* NameSequence::replaceElement( const SymbolTable& table ) { TQString name = buildName(); - TQChar ch = table.tqunicode( name ); + TQChar ch = table.unicode( name ); if ( !ch.isNull() ) { return new TextElement( ch, true ); } else { - ch = table.tqunicode( i18n( name.latin1() ) ); + ch = table.unicode( i18n( name.latin1() ) ); if ( !ch.isNull() ) { return new TextElement( ch, true ); } diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc index 9b27871b..83de81c9 100644 --- a/lib/kformula/symboltable.cc +++ b/lib/kformula/symboltable.cc @@ -44,12 +44,12 @@ KFORMULA_NAMESPACE_BEGIN SymbolFontHelper::SymbolFontHelper() : greek("abgdezhqiklmnxpvrstufjcywGDTQLXPSUFYVW") { - for ( uint i = 0; symbolMap[ i ].tqunicode != 0; i++ ) { - compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].tqunicode; + for ( uint i = 0; symbolMap[ i ].unicode != 0; i++ ) { + compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].unicode; } } -TQChar SymbolFontHelper::tqunicodeFromSymbolFont( TQChar pos ) const +TQChar SymbolFontHelper::unicodeFromSymbolFont( TQChar pos ) const { if ( compatibility.contains( pos ) ) { return compatibility[ pos.latin1() ]; @@ -66,17 +66,17 @@ SymbolTable::SymbolTable() void SymbolTable::init( const TQFont& font ) { backupFont = font; - for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { - names[TQChar( operatorTable[i].tqunicode )] = get_name( operatorTable[i] ); - entries[get_name( operatorTable[i] )] = TQChar( operatorTable[i].tqunicode ); + for ( int i=0; operatorTable[i].unicode != 0; ++i ) { + names[TQChar( operatorTable[i].unicode )] = get_name( operatorTable[i] ); + entries[get_name( operatorTable[i] )] = TQChar( operatorTable[i].unicode ); } - for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { - names[TQChar( arrowTable[i].tqunicode )] = get_name( arrowTable[i] ); - entries[get_name( arrowTable[i] )] = TQChar( arrowTable[i].tqunicode ); + for ( int i=0; arrowTable[i].unicode != 0; ++i ) { + names[TQChar( arrowTable[i].unicode )] = get_name( arrowTable[i] ); + entries[get_name( arrowTable[i] )] = TQChar( arrowTable[i].unicode ); } - for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { - names[TQChar( greekTable[i].tqunicode )] = get_name( greekTable[i] ); - entries[get_name( greekTable[i] )] = TQChar( greekTable[i].tqunicode ); + for ( int i=0; greekTable[i].unicode != 0; ++i ) { + names[TQChar( greekTable[i].unicode )] = get_name( greekTable[i] ); + entries[get_name( greekTable[i] )] = TQChar( greekTable[i].unicode ); } } @@ -85,7 +85,7 @@ bool SymbolTable::contains(TQString name) const return entries.find( name ) != entries.end(); } -TQChar SymbolTable::tqunicode(TQString name) const +TQChar SymbolTable::unicode(TQString name) const { return entries[ name ]; } @@ -112,9 +112,9 @@ CharClass SymbolTable::charClass( TQChar symbol ) const } -TQChar SymbolTable::tqunicodeFromSymbolFont( TQChar pos ) const +TQChar SymbolTable::unicodeFromSymbolFont( TQChar pos ) const { - return symbolFontHelper.tqunicodeFromSymbolFont( pos ); + return symbolFontHelper.unicodeFromSymbolFont( pos ); } @@ -128,13 +128,13 @@ TQStringList SymbolTable::allNames() const { TQStringList list; - for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { + for ( int i=0; operatorTable[i].unicode != 0; ++i ) { list.append( get_name( operatorTable[i] )); } - for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { + for ( int i=0; arrowTable[i].unicode != 0; ++i ) { list.append( get_name( arrowTable[i] )); } - for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { + for ( int i=0; greekTable[i].unicode != 0; ++i ) { list.append( get_name( greekTable[i] ) ); } return list; @@ -144,7 +144,7 @@ TQStringList SymbolTable::allNames() const TQString SymbolTable::get_name( struct UnicodeNameTable entry ) const { if ( !*entry.name ) { - return "U" + TQString( "%1" ).arg( entry.tqunicode, 4, 16 ).upper(); + return "U" + TQString( "%1" ).arg( entry.unicode, 4, 16 ).upper(); } return entry.name; } diff --git a/lib/kformula/symboltable.h b/lib/kformula/symboltable.h index d4a19f03..7820af81 100644 --- a/lib/kformula/symboltable.h +++ b/lib/kformula/symboltable.h @@ -51,14 +51,14 @@ public: TQString greekLetters() const { return greek; } /** - * @returns the tqunicode value of the symbol font char. + * @returns the unicode value of the symbol font char. */ - TQChar tqunicodeFromSymbolFont( TQChar pos ) const; + TQChar unicodeFromSymbolFont( TQChar pos ) const; private: /** - * symbol font char -> tqunicode mapping. + * symbol font char -> unicode mapping. */ TQMap<TQChar, TQChar> compatibility; @@ -91,7 +91,7 @@ public: * @returns the char in the symbol font that belongs to * the given name. */ - TQChar tqunicode( TQString name ) const; + TQChar unicode( TQString name ) const; TQString name( TQChar symbol ) const; TQFont font( TQChar symbol, const TQFont& f ) const; @@ -104,9 +104,9 @@ public: TQString greekLetters() const; /** - * @returns the tqunicode value of the symbol font char. + * @returns the unicode value of the symbol font char. */ - TQChar tqunicodeFromSymbolFont( TQChar pos ) const; + TQChar unicodeFromSymbolFont( TQChar pos ) const; /** * @returns all known names as strings. @@ -121,12 +121,12 @@ private: TQString get_name( UnicodeNameTable entry ) const; /** - * tqunicode -> name mapping. + * unicode -> name mapping. */ NameTable names; /** - * Name -> tqunicode mapping. + * Name -> unicode mapping. */ EntryTable entries; diff --git a/lib/kformula/textelement.cc b/lib/kformula/textelement.cc index 8789377c..7f146b49 100644 --- a/lib/kformula/textelement.cc +++ b/lib/kformula/textelement.cc @@ -66,7 +66,7 @@ TokenType TextElement::getTokenType() const return getSymbolTable().charClass( character ); } - switch ( character.tqunicode() ) { + switch ( character.unicode() ) { case '+': case '-': case '*': @@ -202,7 +202,7 @@ void TextElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, ElementType* token = getElementType(); if ( ( token != 0 ) && !symbol ) { TQString text = token->text( static_cast<SequenceElement*>( getParent() ) ); -// kdDebug() << "draw text: " << text[0].tqunicode() +// kdDebug() << "draw text: " << text[0].unicode() // << " " << painter.font().family().latin1() // << endl; painter.fillRect( context.layoutUnitToPixelX( parentOrigin.x() ), @@ -401,10 +401,10 @@ bool TextElement::readAttributesFromDom(TQDomElement element) if(!symbolStr.isNull()) { int symbolInt = symbolStr.toInt(); if ( symbolInt == 1 ) { - character = getSymbolTable().tqunicodeFromSymbolFont(character); + character = getSymbolTable().unicodeFromSymbolFont(character); } if ( symbolInt == 2 ) { - switch ( character.tqunicode() ) { + switch ( character.unicode() ) { case 0x03D5: character = 0x03C6; break; case 0x03C6: character = 0x03D5; break; case 0x03Ba: character = 0x03BA; break; diff --git a/lib/kformula/tokenelement.cc b/lib/kformula/tokenelement.cc index eda9c0dc..6addc385 100644 --- a/lib/kformula/tokenelement.cc +++ b/lib/kformula/tokenelement.cc @@ -67,7 +67,7 @@ int TokenElement::buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDo kdWarning() << "Invalid entity refererence: " << entity << endl; } else { - TextElement* child = new TextElement( TQChar( pos->tqunicode ) ); + TextElement* child = new TextElement( TQChar( pos->unicode ) ); child->setParent(this); child->setCharFamily( charFamily() ); child->setCharStyle( charStyle() ); diff --git a/lib/kformula/unicodetable.cc b/lib/kformula/unicodetable.cc index ad9a7f74..23dc8636 100644 --- a/lib/kformula/unicodetable.cc +++ b/lib/kformula/unicodetable.cc @@ -19,7 +19,7 @@ KFORMULA_NAMESPACE_BEGIN -struct UnicodeNameTable { short tqunicode; const char* name; }; +struct UnicodeNameTable { short unicode; const char* name; }; static UnicodeNameTable greekTable[] = { { 0x03B1, "alpha" }, diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index fd790991..f881293a 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -1222,7 +1222,7 @@ TQPixmap KoDocument::generatePreview( const TQSize& size ) docHeight = m_pageLayout.ptHeight / 72 * KoGlobal::dpiY(); } else { - // If we don't have a page tqlayout, just draw the top left hand corner + // If we don't have a page layout, just draw the top left hand corner docWidth = 500.0; docHeight = 500.0; } @@ -2656,7 +2656,7 @@ bool KoDocument::showEmbedInitDialog(TQWidget* parent) { KDialogBase dlg(parent, "EmbedInitDialog", true, i18n("Embedding Object"), 0, KDialogBase::NoDefault); KoOpenPane* pane = createOpenPane(&dlg, instance(), templateType()); - pane->tqlayout()->setMargin(0); + pane->layout()->setMargin(0); dlg.setMainWidget(pane); dlg.setInitialSize(dlg.configDialogSize("EmbedInitDialog")); connect(this, TQT_SIGNAL(closeEmbedInitDialog()), &dlg, TQT_SLOT(slotOk())); diff --git a/lib/kofficecore/KoDocument.h b/lib/kofficecore/KoDocument.h index df1518de..1a5d0805 100644 --- a/lib/kofficecore/KoDocument.h +++ b/lib/kofficecore/KoDocument.h @@ -741,7 +741,7 @@ public: virtual bool isStoredExtern() const; /** - * @return the page tqlayout associated with this document (margins, pageSize, etc). + * @return the page layout associated with this document (margins, pageSize, etc). * Override this if you want to provide different sized pages. * * @see KoPageLayout diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp index 8c6fe16f..c71c7609 100644 --- a/lib/kofficecore/KoDocumentChild.cpp +++ b/lib/kofficecore/KoDocumentChild.cpp @@ -454,7 +454,7 @@ void KoDocumentChild::saveOasisAttributes( KoXmlWriter &xmlWriter, const TQStrin d->m_doc->setURL( u ); } - //<draw:object draw:style-name="standard" draw:id="1" draw:layer="tqlayout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> + //<draw:object draw:style-name="standard" draw:id="1" draw:layer="layout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> xmlWriter.addAttribute( "xlink:type", "simple" ); xmlWriter.addAttribute( "xlink:show", "embed" ); xmlWriter.addAttribute( "xlink:actuate", "onLoad" ); diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp index bcd56f75..f1bf2229 100644 --- a/lib/kofficecore/KoFilterManager.cpp +++ b/lib/kofficecore/KoFilterManager.cpp @@ -59,13 +59,13 @@ KoFilterChooser::KoFilterChooser (TQWidget *parent, const TQStringList &mimeType setMainWidget (page); // looks too squashed together without * 2 - TQVBoxLayout *tqlayout = new TQVBoxLayout (page, marginHint (), spacingHint () * 2); + TQVBoxLayout *layout = new TQVBoxLayout (page, marginHint (), spacingHint () * 2); TQLabel *filterLabel = new TQLabel (i18n ("Select a filter:"), page, "filterlabel"); - tqlayout->addWidget (filterLabel); + layout->addWidget (filterLabel); m_filterList = new KListBox (page, "filterlist"); - tqlayout->addWidget (m_filterList); + layout->addWidget (m_filterList); Q_ASSERT (!m_mimeTypes.isEmpty ()); for (TQStringList::ConstIterator it = m_mimeTypes.begin (); diff --git a/lib/kofficecore/KoGenStyles.h b/lib/kofficecore/KoGenStyles.h index 2a54f944..d7516732 100644 --- a/lib/kofficecore/KoGenStyles.h +++ b/lib/kofficecore/KoGenStyles.h @@ -274,7 +274,7 @@ public: { /** * DefaultType depends on family: e.g. paragraph-properties if family=paragraph - * or on the type of style (e.g. page-tqlayout -> page-tqlayout-properties). + * or on the type of style (e.g. page-layout -> page-layout-properties). * (In fact that tag name is the one passed to writeStyle) */ DefaultType = 0, diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp index fe88a11b..0f173658 100644 --- a/lib/kofficecore/KoOasisStyles.cpp +++ b/lib/kofficecore/KoOasisStyles.cpp @@ -194,9 +194,9 @@ void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles ) //kdDebug(30003) << "Style: '" << name << "' loaded " << endl; } } else if ( ns == KoXmlNS::style && ( - localName == "page-tqlayout" + localName == "page-layout" || localName == "font-decl" - || localName == "presentation-page-tqlayout" ) ) + || localName == "presentation-page-layout" ) ) { if ( m_styles.find( name ) != 0 ) kdDebug(30003) << "Style: '" << name << "' already exists" << endl; diff --git a/lib/kofficecore/KoOasisStyles.h b/lib/kofficecore/KoOasisStyles.h index dfa9e468..e73eab0e 100644 --- a/lib/kofficecore/KoOasisStyles.h +++ b/lib/kofficecore/KoOasisStyles.h @@ -47,8 +47,8 @@ public: /** * Look up a style by name. - * This method can find styles defined by the tags "style:page-tqlayout", - * "style:presentation-page-tqlayout", or "style:font-decl". + * This method can find styles defined by the tags "style:page-layout", + * "style:presentation-page-layout", or "style:font-decl". * Do NOT use this method for style:style styles. * * @param name the style name @@ -148,7 +148,7 @@ private: KoOasisStyles& operator=( const KoOasisStyles & ); // forbidden private: - TQDict<TQDomElement> m_styles; // page-tqlayout, font-decl etc. + TQDict<TQDomElement> m_styles; // page-layout, font-decl etc. TQDict<TQDomElement> m_defaultStyle; TQDomElement m_officeStyle; diff --git a/lib/kofficecore/KoPageLayout.cpp b/lib/kofficecore/KoPageLayout.cpp index d01ca6db..c3965d45 100644 --- a/lib/kofficecore/KoPageLayout.cpp +++ b/lib/kofficecore/KoPageLayout.cpp @@ -59,7 +59,7 @@ KoGenStyle KoPageLayout::saveOasis() const void KoPageLayout::loadOasis(const TQDomElement &style) { - TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) ); + TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) ); if ( !properties.isNull() ) { ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) ); @@ -82,18 +82,18 @@ void KoPageLayout::loadOasis(const TQDomElement &style) KoPageLayout KoPageLayout::standardLayout() { - KoPageLayout tqlayout; - tqlayout.format = KoPageFormat::defaultFormat(); - tqlayout.orientation = PG_PORTRAIT; - tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) ); - tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) ); - tqlayout.ptLeft = MM_TO_POINT( 20.0 ); - tqlayout.ptRight = MM_TO_POINT( 20.0 ); - tqlayout.ptTop = MM_TO_POINT( 20.0 ); - tqlayout.ptBottom = MM_TO_POINT( 20.0 ); - tqlayout.ptPageEdge = -1; - tqlayout.ptBindingSide = -1; - return tqlayout; + KoPageLayout layout; + layout.format = KoPageFormat::defaultFormat(); + layout.orientation = PG_PORTRAIT; + layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) ); + layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) ); + layout.ptLeft = MM_TO_POINT( 20.0 ); + layout.ptRight = MM_TO_POINT( 20.0 ); + layout.ptTop = MM_TO_POINT( 20.0 ); + layout.ptBottom = MM_TO_POINT( 20.0 ); + layout.ptPageEdge = -1; + layout.ptBindingSide = -1; + return layout; } struct PageFormatInfo @@ -149,12 +149,12 @@ int KoPageFormat::printerPageSize( KoFormat format ) { if ( format == PG_SCREEN ) { - kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; + kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; return KPrinter::A4; } else if ( format == PG_CUSTOM ) { - kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; + kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; return KPrinter::A4; } else if ( format <= PG_LAST_FORMAT ) diff --git a/lib/kofficecore/KoPageLayout.h b/lib/kofficecore/KoPageLayout.h index 4d4dc6cc..f854b1eb 100644 --- a/lib/kofficecore/KoPageLayout.h +++ b/lib/kofficecore/KoPageLayout.h @@ -154,7 +154,7 @@ enum KoHFType { }; /** - * This structure defines the page tqlayout, including + * This structure defines the page layout, including * its size in pt, its format (e.g. A4), orientation, unit, margins etc. */ struct KoPageLayout @@ -194,17 +194,17 @@ struct KoPageLayout } /** - * Save this page tqlayout to OASIS. + * Save this page layout to OASIS. */ KOFFICECORE_EXPORT KoGenStyle saveOasis() const; /** - * Load this page tqlayout from OASIS + * Load this page layout from OASIS */ KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style); /** - * @return a page tqlayout with the default page size depending on the locale settings, + * @return a page layout with the default page size depending on the locale settings, * default margins (2 cm), and portrait orientation. * @since 1.4 */ diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index 259c498e..634a1393 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -342,7 +342,7 @@ void KoView::partActivateEvent( KParts::PartActivateEvent *event ) d->m_children.append( viewChild ); TQApplication::setOverrideCursor(waitCursor); - // This is the long operation (due to toolbar tqlayout stuff) + // This is the long operation (due to toolbar layout stuff) d->m_manager->setActivePart( child->document(), viewChild->frame()->view() ); TQApplication::restoreOverrideCursor(); diff --git a/lib/kofficecore/koDetailsPaneBase.ui b/lib/kofficecore/koDetailsPaneBase.ui index 4a838726..0b64d5eb 100644 --- a/lib/kofficecore/koDetailsPaneBase.ui +++ b/lib/kofficecore/koDetailsPaneBase.ui @@ -58,7 +58,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <grid> <property name="name"> diff --git a/lib/kofficecore/koDocumentInfoAboutWidget.ui b/lib/kofficecore/koDocumentInfoAboutWidget.ui index bfd4d49e..9e100ed2 100644 --- a/lib/kofficecore/koDocumentInfoAboutWidget.ui +++ b/lib/kofficecore/koDocumentInfoAboutWidget.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout8</cstring> + <cstring>layout8</cstring> </property> <hbox> <property name="name"> @@ -67,7 +67,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <grid> <property name="name"> @@ -96,7 +96,7 @@ </widget> <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>tqlayout14</cstring> + <cstring>layout14</cstring> </property> <vbox> <property name="name"> @@ -173,7 +173,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout11</cstring> + <cstring>layout11</cstring> </property> <grid> <property name="name"> diff --git a/lib/kofficecore/koDocumentInfoAuthorWidget.ui b/lib/kofficecore/koDocumentInfoAuthorWidget.ui index e007e1a2..bce29446 100644 --- a/lib/kofficecore/koDocumentInfoAuthorWidget.ui +++ b/lib/kofficecore/koDocumentInfoAuthorWidget.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <hbox> <property name="name"> @@ -61,7 +61,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout16</cstring> + <cstring>layout16</cstring> </property> <grid> <property name="name"> @@ -227,7 +227,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui index d97a33f2..bc650f10 100644 --- a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui +++ b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui @@ -26,7 +26,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <vbox> <property name="name"> diff --git a/lib/kofficecore/koOpenPaneBase.ui b/lib/kofficecore/koOpenPaneBase.ui index a85ecb38..c0076afa 100644 --- a/lib/kofficecore/koOpenPaneBase.ui +++ b/lib/kofficecore/koOpenPaneBase.ui @@ -25,7 +25,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <vbox> <property name="name"> @@ -71,7 +71,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <vbox> <property name="name"> diff --git a/lib/kofficecore/tests/koxmlreadertest.cpp b/lib/kofficecore/tests/koxmlreadertest.cpp index 512dec71..af2bc696 100644 --- a/lib/kofficecore/tests/koxmlreadertest.cpp +++ b/lib/kofficecore/tests/koxmlreadertest.cpp @@ -1419,9 +1419,9 @@ void testSimpleOpenDocumentPresentation() xmlstream << " <office:presentation>"; xmlstream << " <draw:page draw:name=\"Title\" draw:style-name=\"dp1\" "; xmlstream << " draw:master-page-name=\"lyt-cool\" "; - xmlstream << " presentation:presentation-page-tqlayout-name=\"AL1T0\">"; + xmlstream << " presentation:presentation-page-layout-name=\"AL1T0\">"; xmlstream << " <draw:frame presentation:style-name=\"pr1\" "; - xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"tqlayout\" "; + xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"layout\" "; xmlstream << " svg:width=\"23.912cm\" svg:height=\"3.508cm\" "; xmlstream << " svg:x=\"2.058cm\" svg:y=\"1.543cm\" "; xmlstream << " presentation:class=\"title\" "; @@ -1431,7 +1431,7 @@ void testSimpleOpenDocumentPresentation() xmlstream << " </draw:text-box>"; xmlstream << " </draw:frame>"; xmlstream << " <draw:frame presentation:style-name=\"pr2\" "; - xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"tqlayout\""; + xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"layout\""; xmlstream << " svg:width=\"23.912cm\" svg:height=\"13.231cm\""; xmlstream << " svg:x=\"2.058cm\" svg:y=\"5.838cm\" "; xmlstream << " presentation:class=\"subtitle\">"; @@ -1440,8 +1440,8 @@ void testSimpleOpenDocumentPresentation() xmlstream << " </draw:text-box>"; xmlstream << " </draw:frame>"; xmlstream << " <presentation:notes draw:style-name=\"dp2\">"; - xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"tqlayout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>"; - xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"tqlayout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">"; + xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"layout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>"; + xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"layout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">"; xmlstream << " <draw:text-box/>"; xmlstream << " </draw:frame>"; xmlstream << " </presentation:notes>"; @@ -1587,7 +1587,7 @@ void testSimpleOpenDocumentPresentation() CHECK( titlePageElement.attributeNS(drawNS,"style-name",""), TQString("dp1") ); CHECK( titlePageElement.attributeNS(drawNS,"master-page-name",""), TQString("lyt-cool") ); CHECK( titlePageElement.attributeNS(presentationNS, - "presentation-page-tqlayout-name",""), TQString("AL1T0") ); + "presentation-page-layout-name",""), TQString("AL1T0") ); // <draw:frame> for the title frame KoXmlElement titleFrameElement; @@ -1605,7 +1605,7 @@ void testSimpleOpenDocumentPresentation() CHECK( titleFrameElement.attributeNS(presentationNS,"class",""), TQString("title") ); CHECK( titleFrameElement.attributeNS(presentationNS,"user-transformed",""), TQString("true") ); CHECK( titleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P2") ); - CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") ); + CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), TQString("layout") ); CHECK( titleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") ); CHECK( titleFrameElement.attributeNS(svgNS,"height",""), TQString("3.508cm") ); CHECK( titleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") ); @@ -1655,7 +1655,7 @@ void testSimpleOpenDocumentPresentation() CHECK( subtitleFrameElement.attributeNS(presentationNS,"class",""), TQString("subtitle") ); CHECK( subtitleFrameElement.hasAttributeNS(presentationNS,"user-transformed"), false ); CHECK( subtitleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P3") ); - CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") ); + CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), TQString("layout") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"height",""), TQString("13.231cm") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") ); diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index 2b1a2cbe..8e129f98 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -271,14 +271,14 @@ void KoHelpView::paintEvent( TQPaintEvent* ) KoHelpWidget::KoHelpWidget( TQString help, TQWidget* parent ) : TQWidget( parent ) { - TQGridLayout* tqlayout = new TQGridLayout( this, 3, 3 ); - tqlayout->setMargin( 2 ); - tqlayout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); - tqlayout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 ); - tqlayout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); - tqlayout->addColSpacing( 0, 5 ); - tqlayout->addColSpacing( 2, 5 ); - tqlayout->setColStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( this, 3, 3 ); + layout->setMargin( 2 ); + layout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); + layout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 ); + layout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); + layout->addColSpacing( 0, 5 ); + layout->addColSpacing( 2, 5 ); + layout->setColStretch( 1, 1 ); m_helpView = new KoHelpView( m_helpViewport ); m_helpViewport->setBackgroundMode( PaletteLight ); @@ -370,20 +370,20 @@ void KoHelpWidget::stopScrolling() KoContextHelpPopup::KoContextHelpPopup( TQWidget* parent ) : TQWidget( parent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder ) { - TQGridLayout* tqlayout = new TQGridLayout( this ); + TQGridLayout* layout = new TQGridLayout( this ); TQHBoxLayout* buttonLayout; - tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); - tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - buttonLayout = new TQHBoxLayout( tqlayout ); - //tqlayout->addLayout( buttonLayout, 2, 0 ); - tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); + layout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + buttonLayout = new TQHBoxLayout( layout ); + //layout->addLayout( buttonLayout, 2, 0 ); + layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); buttonLayout->add( m_close = new KoTinyButton( KoTinyButton::Close, this ) ); buttonLayout->add( m_sticky = new KoTinyButton( KoTinyButton::Sticky, this ) ); - tqlayout->addColSpacing( 2, 2 ); - tqlayout->addRowSpacing( 3, 2 ); - tqlayout->setMargin( 3 ); - tqlayout->setSpacing( 1 ); - tqlayout->setRowStretch( 1, 1 ); + layout->addColSpacing( 2, 2 ); + layout->addRowSpacing( 3, 2 ); + layout->setMargin( 3 ); + layout->setSpacing( 1 ); + layout->setRowStretch( 1, 1 ); buttonLayout->setSpacing( 1 ); setMinimumSize( 180, 180 ); @@ -537,13 +537,13 @@ KoContextHelpWidget::KoContextHelpWidget( TQWidget* parent, const char* name ) : TQWidget( parent, name ) { setCaption( i18n( "Context Help" ) ); - TQGridLayout* tqlayout = new TQGridLayout( this ); - tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); - tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); - tqlayout->setMargin( 2 ); - tqlayout->setSpacing( 1 ); - tqlayout->setRowStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( this ); + layout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); + layout->setMargin( 2 ); + layout->setSpacing( 1 ); + layout->setRowStretch( 1, 1 ); this->setMinimumSize( 180, 120 ); this->show(); setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 ); @@ -567,13 +567,13 @@ KoContextHelpDocker::KoContextHelpDocker( TQWidget* parent, const char* name ) { setCaption( i18n( "Context Help" ) ); TQWidget* mainWidget = new TQWidget( this ); - TQGridLayout* tqlayout = new TQGridLayout( mainWidget ); - tqlayout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 ); - tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); - tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); - tqlayout->setMargin( 2 ); - tqlayout->setSpacing( 1 ); - tqlayout->setRowStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( mainWidget ); + layout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 ); + layout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); + layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); + layout->setMargin( 2 ); + layout->setSpacing( 1 ); + layout->setRowStretch( 1, 1 ); mainWidget->setMinimumSize( 180, 120 ); mainWidget->show(); setWidget( mainWidget ); diff --git a/lib/kofficeui/KoGeneralPropertyUi.ui b/lib/kofficeui/KoGeneralPropertyUi.ui index 5d3d6e4f..399bc900 100644 --- a/lib/kofficeui/KoGeneralPropertyUi.ui +++ b/lib/kofficeui/KoGeneralPropertyUi.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout13</cstring> + <cstring>layout13</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kofficeui/KoGuideLineDia.cpp b/lib/kofficeui/KoGuideLineDia.cpp index a889b3d8..00664410 100644 --- a/lib/kofficeui/KoGuideLineDia.cpp +++ b/lib/kofficeui/KoGuideLineDia.cpp @@ -60,7 +60,7 @@ KoGuideLineDia::KoGuideLineDia( TQWidget *parent, KoPoint &pos, KoRect &rect, TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Orientation" ), vbox ); group->setRadioButtonExclusive( true ); - //group->tqlayout(); + //group->layout(); m_hButton = new TQRadioButton( i18n( "Horizontal" ), group ); m_vButton = new TQRadioButton( i18n( "Vertical" ), group ); diff --git a/lib/kofficeui/KoPageLayoutColumns.cpp b/lib/kofficeui/KoPageLayoutColumns.cpp index 8ea3b0b9..2d1e6b77 100644 --- a/lib/kofficeui/KoPageLayoutColumns.cpp +++ b/lib/kofficeui/KoPageLayoutColumns.cpp @@ -25,18 +25,18 @@ #include <tqlabel.h> #include <tqlayout.h> -KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout) +KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout) : KoPageLayoutColumnsBase(parent) { m_columns = columns; TQHBoxLayout *lay = new TQHBoxLayout(previewPane); - m_preview = new KoPagePreview( previewPane, "Preview", tqlayout ); + m_preview = new KoPagePreview( previewPane, "Preview", layout ); lay->addWidget(m_preview); lay = new TQHBoxLayout(columnSpacingPane); m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane ); m_spacing->setValue( m_columns.ptColumnSpacing ); m_spacing->setUnit( unit ); double dStep = KoUnit::fromUserValue( 0.2, unit ); - m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep ); + m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep ); lay->addWidget(m_spacing); labelSpacing->setBuddy( m_spacing ); nColumns->setValue( m_columns.columns ); @@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) { emit propertyChange(m_columns); } -void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) { - m_preview->setPageLayout( tqlayout ); +void KoPageLayoutColumns::setLayout(KoPageLayout &layout) { + m_preview->setPageLayout( layout ); } #include <KoPageLayoutColumns.moc> diff --git a/lib/kofficeui/KoPageLayoutColumns.h b/lib/kofficeui/KoPageLayoutColumns.h index 8ebac1b2..b9dcd6c2 100644 --- a/lib/kofficeui/KoPageLayoutColumns.h +++ b/lib/kofficeui/KoPageLayoutColumns.h @@ -43,15 +43,15 @@ public: * @param parent the parent widget * @param columns the KoColumns data structure that this dialog should be initialzed with * @param unit the unit-type (mm/cm/inch) that the dialog should show - * @param tqlayout the page tqlayout that the preview should be initialzed with. + * @param layout the page layout that the preview should be initialzed with. */ - KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout); + KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout); /** - * Update the page preview widget with the param tqlayout. - * @param tqlayout the new tqlayout + * Update the page preview widget with the param layout. + * @param layout the new layout */ - void setLayout(KoPageLayout &tqlayout); + void setLayout(KoPageLayout &layout); public slots: /** diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp index 5cffc108..3150ab51 100644 --- a/lib/kofficeui/KoPageLayoutDia.cpp +++ b/lib/kofficeui/KoPageLayoutDia.cpp @@ -49,10 +49,10 @@ /******************************************************************/ /*===================== constrcutor ==============================*/ -KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& tqlayout ) +KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& layout ) : TQGroupBox( i18n( "Page Preview" ), parent, name ) { - setPageLayout( tqlayout ); + setPageLayout( layout ); columns = 1; setMinimumSize( 150, 150 ); } @@ -62,15 +62,15 @@ KoPagePreview::~KoPagePreview() { } -/*=================== set tqlayout =================================*/ -void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) +/*=================== set layout =================================*/ +void KoPagePreview::setPageLayout( const KoPageLayout &layout ) { // resolution[XY] is in pixel per pt double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) ); double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) ); - m_pageWidth = tqlayout.ptWidth * resolutionX; - m_pageHeight = tqlayout.ptHeight * resolutionY; + m_pageWidth = layout.ptWidth * resolutionX; + m_pageHeight = layout.ptHeight * resolutionY; double zh = 110.0 / m_pageHeight; double zw = 110.0 / m_pageWidth; @@ -79,15 +79,15 @@ void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) m_pageWidth *= z; m_pageHeight *= z; - m_textFrameX = tqlayout.ptLeft * resolutionX * z; - m_textFrameY = tqlayout.ptTop * resolutionY * z; - m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; - m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; + m_textFrameX = layout.ptLeft * resolutionX * z; + m_textFrameY = layout.ptTop * resolutionY * z; + m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z; + m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z; repaint( true ); } -/*=================== set tqlayout =================================*/ +/*=================== set layout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; @@ -129,7 +129,7 @@ void KoPagePreview::drawContents( TQPainter *painter ) /*==================== constructor ===============================*/ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& tqlayout, + const KoPageLayout& layout, const KoHeadFoot& hf, int tabs, KoUnit::Unit unit, bool modal ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, @@ -137,7 +137,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, { flags = tabs; - m_layout = tqlayout; + m_layout = layout; m_unit = unit; m_pageSizeTab = 0; m_columnsTab = 0; @@ -154,7 +154,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, /*==================== constructor ===============================*/ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& tqlayout, + const KoPageLayout& layout, const KoHeadFoot& hf, const KoColumns& columns, const KoKWHeaderFooter& kwhf, @@ -164,7 +164,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, { flags = tabs; - m_layout = tqlayout; + m_layout = layout; m_column = columns; m_unit = unit; m_pageSizeTab = 0; @@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia() } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit ); if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); + if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); unit = dlg->unit(); } @@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int ta } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns, +bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns, KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit ); if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); + if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); if ( tabs & COLUMNS ) columns = dlg->columns(); if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter(); @@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColu return res; } -/*===================== get a standard page tqlayout ===============*/ +/*===================== get a standard page layout ===============*/ KoPageLayout KoPageLayoutDia::standardLayout() { return KoPageLayout::standardLayout(); @@ -261,17 +261,17 @@ void KoPageLayoutDia::setupTab1( bool enableBorders ) this, TQT_SLOT (sizeUpdated( KoPageLayout&))); } -void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) { - m_layout.ptWidth = tqlayout.ptWidth; - m_layout.ptHeight = tqlayout.ptHeight; - m_layout.ptLeft = tqlayout.ptLeft; - m_layout.ptRight = tqlayout.ptRight; - m_layout.ptTop = tqlayout.ptTop; - m_layout.ptBottom = tqlayout.ptBottom; - m_layout.format = tqlayout.format; - m_layout.orientation = tqlayout.orientation; +void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) { + m_layout.ptWidth = layout.ptWidth; + m_layout.ptHeight = layout.ptHeight; + m_layout.ptLeft = layout.ptLeft; + m_layout.ptRight = layout.ptRight; + m_layout.ptTop = layout.ptTop; + m_layout.ptBottom = layout.ptBottom; + m_layout.format = layout.format; + m_layout.orientation = layout.orientation; if(m_columnsTab) - m_columnsTab->setLayout(tqlayout); + m_columnsTab->setLayout(layout); } /*================ setup header and footer tab ===================*/ @@ -282,9 +282,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) // ------------- header --------------- TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); - gHead->tqlayout()->setSpacing(KDialog::spacingHint()); - gHead->tqlayout()->setMargin(KDialog::marginHint()); - TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 ); + gHead->layout()->setSpacing(KDialog::spacingHint()); + gHead->layout()->setMargin(KDialog::marginHint()); + TQGridLayout *headGrid = new TQGridLayout( gHead->layout(), 2, 3 ); TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead ); headGrid->addWidget( lHeadLeft, 0, 0 ); @@ -311,9 +311,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) // ------------- footer --------------- TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); - gFoot->tqlayout()->setSpacing(KDialog::spacingHint()); - gFoot->tqlayout()->setMargin(KDialog::marginHint()); - TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 ); + gFoot->layout()->setSpacing(KDialog::spacingHint()); + gFoot->layout()->setMargin(KDialog::marginHint()); + TQGridLayout *footGrid = new TQGridLayout( gFoot->layout(), 2, 3 ); TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot ); footGrid->addWidget( lFootLeft, 0, 0 ); @@ -362,7 +362,7 @@ void KoPageLayoutDia::setupTab3() TQWidget *tab3 = addPage(i18n( "Col&umns" )); TQHBoxLayout *lay = new TQHBoxLayout(tab3); m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout); - m_columnsTab->tqlayout()->setMargin(0); + m_columnsTab->layout()->setMargin(0); lay->addWidget(m_columnsTab); m_columnsTab->show(); connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)), @@ -382,7 +382,7 @@ void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf ) TQWidget *tab4 = addPage(i18n( "H&eader && Footer" )); TQHBoxLayout *lay = new TQHBoxLayout(tab4); m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf); - m_headerTab->tqlayout()->setMargin(0); + m_headerTab->layout()->setMargin(0); lay->addWidget(m_headerTab); m_headerTab->show(); diff --git a/lib/kofficeui/KoPageLayoutDia.h b/lib/kofficeui/KoPageLayoutDia.h index 21fe7df3..1ed23ec5 100644 --- a/lib/kofficeui/KoPageLayoutDia.h +++ b/lib/kofficeui/KoPageLayoutDia.h @@ -61,7 +61,7 @@ public: ~KoPagePreview(); /** - * set page tqlayout + * set page layout */ void setPageLayout( const KoPageLayout& ); void setPageColumns( const KoColumns& ); @@ -78,7 +78,7 @@ protected: class KoPageLayoutDiaPrivate; /** - * With this dialog the user can specify the tqlayout of the paper during printing. + * With this dialog the user can specify the layout of the paper during printing. */ class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase { @@ -92,14 +92,14 @@ public: * * @param parent The parent of the dialog. * @param name The name of the dialog. - * @param tqlayout The tqlayout. + * @param layout The layout. * @param headfoot The header and the footer. * @param flags a variable with all features this dialog should show. * @param unit The unit to use for displaying the values to the user. * @param modal Whether the dialog is modal or not. */ KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& tqlayout, + const KoPageLayout& layout, const KoHeadFoot& headfoot, int flags, KoUnit::Unit unit, bool modal=true ); @@ -108,7 +108,7 @@ public: * * @param parent The parent of the dialog. * @param name The name of the dialog. - * @param tqlayout The tqlayout. + * @param layout The layout. * @param headfoot The header and the footer. * @param columns The number of columns on the page. * @param kwheadfoot The KWord header and footer. @@ -116,7 +116,7 @@ public: * @param unit The unit to use for displaying the values to the user */ KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& tqlayout, + const KoPageLayout& layout, const KoHeadFoot& headfoot, const KoColumns& columns, const KoKWHeaderFooter& kwheadfoot, @@ -128,26 +128,26 @@ public: ~KoPageLayoutDia(); /** - * Show page tqlayout dialog. + * Show page layout dialog. * See constructor for documentation on the parameters */ static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* parent = 0 ); /** - * Show page tqlayout dialog. + * Show page layout dialog. * See constructor for documentation on the parameters */ static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* parent = 0 ); /** - * Retrieves a standard page tqlayout. + * Retrieves a standard page layout. * Deprecated: better use KoPageLayout::standardLayout() */ static KDE_DEPRECATED KoPageLayout standardLayout(); /** - * Returns the tqlayout + * Returns the layout */ - const KoPageLayout& tqlayout() const { return m_layout; } + const KoPageLayout& layout() const { return m_layout; } /** * Returns the header and footer information @@ -177,7 +177,7 @@ private: TQLineEdit *eFootMid; TQLineEdit *eFootRight; - // tqlayout + // layout KoPageLayout m_layout; KoColumns m_column; @@ -189,7 +189,7 @@ protected slots: virtual void slotOk(); private slots: - void sizeUpdated(KoPageLayout &tqlayout); + void sizeUpdated(KoPageLayout &layout); void columnsUpdated(KoColumns &columns); private: diff --git a/lib/kofficeui/KoPageLayoutHeaderBase.ui b/lib/kofficeui/KoPageLayoutHeaderBase.ui index 41246d84..7f36378e 100644 --- a/lib/kofficeui/KoPageLayoutHeaderBase.ui +++ b/lib/kofficeui/KoPageLayoutHeaderBase.ui @@ -45,7 +45,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> @@ -120,7 +120,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp index 54be2b3f..73629862 100644 --- a/lib/kofficeui/KoPageLayoutSize.cpp +++ b/lib/kofficeui/KoPageLayoutSize.cpp @@ -34,9 +34,9 @@ #include <tqvgroupbox.h> #include <tqhbuttongroup.h> -KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) +KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) : TQWidget(parent), m_blockSignals(false) { - m_layout = tqlayout; + m_layout = layout; m_unit = unit; TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); @@ -130,7 +130,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayou marginsFrame->setMargin( KDialog::marginHint() ); grid1->addWidget( marginsFrame, 3, 0 ); - TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3, + TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->layout(), 3, 3, KDialog::spacingHint() ); // left margin diff --git a/lib/kofficeui/KoPageLayoutSize.h b/lib/kofficeui/KoPageLayoutSize.h index d917b349..6d50e014 100644 --- a/lib/kofficeui/KoPageLayoutSize.h +++ b/lib/kofficeui/KoPageLayoutSize.h @@ -42,13 +42,13 @@ public: /** * Contructor * @param parent the parent widget - * @param tqlayout the page tqlayout that this widget should be initialzed with. + * @param layout the page layout that this widget should be initialzed with. * @param unit the unit-type (mm/cm/inch) that the dialog should show * @param columns the KoColumns (amout of columns) that the preview should be initialized with * @param unitChooser if true a combobox with the unit-type is shown for the user to change * @param enableBorders if true enable the user to change the margins (aka borders) of the page */ - KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayout, KoUnit::Unit unit, + KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit, const KoColumns& columns, bool unitChooser, bool enableBorders); /** @@ -78,11 +78,11 @@ public slots: signals: /** * Emitted whenever the user changed something in the dialog. - * @param tqlayout the update tqlayout structure with currently displayed info. + * @param layout the update layout structure with currently displayed info. * Note that the info may not be fully correct and physically possible (in which * case queryClose will return false) */ - void propertyChange(KoPageLayout &tqlayout); + void propertyChange(KoPageLayout &layout); protected: TQComboBox *cpgFormat; diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp index cc8f5189..b11b0604 100644 --- a/lib/kofficeui/KoRuler.cpp +++ b/lib/kofficeui/KoRuler.cpp @@ -44,7 +44,7 @@ public: bool whileMovingBorderLeft, whileMovingBorderRight; bool whileMovingBorderTop, whileMovingBorderBottom; TQPixmap pmFirst, pmLeft; - KoPageLayout tqlayout; + KoPageLayout layout; KoTabChooser *tabChooser; KoTabulatorList tabList; // Do we have to remove a certain tab in the DC Event? @@ -93,7 +93,7 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->canvas = _canvas; orientation = _orientation; - d->tqlayout = _layout; + d->layout = _layout; d->flags = _flags; d->m_bReadWrite=true; @@ -125,11 +125,11 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->removeTab.type = T_INVALID; if ( orientation == Qt::Horizontal ) { - frameStart = tqRound( zoomIt(d->tqlayout.ptLeft) ); - d->frameEnd = tqRound( zoomIt(d->tqlayout.ptWidth - d->tqlayout.ptRight) ); + frameStart = tqRound( zoomIt(d->layout.ptLeft) ); + d->frameEnd = tqRound( zoomIt(d->layout.ptWidth - d->layout.ptRight) ); } else { - frameStart = tqRound( zoomIt(d->tqlayout.ptTop) ); - d->frameEnd = tqRound( zoomIt(d->tqlayout.ptHeight - d->tqlayout.ptBottom) ); + frameStart = tqRound( zoomIt(d->layout.ptTop) ); + d->frameEnd = tqRound( zoomIt(d->layout.ptHeight - d->layout.ptBottom) ); } m_bFrameStartSet = false; @@ -211,7 +211,7 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) TQPainter p( &buffer ); p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); - int totalw = tqRound( zoomIt(d->tqlayout.ptWidth) ); + int totalw = tqRound( zoomIt(d->layout.ptWidth) ); TQString str; p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); @@ -373,7 +373,7 @@ void KoRuler::drawVertical( TQPainter *_painter ) TQPainter p( &buffer ); p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); - int totalh = tqRound( zoomIt(d->tqlayout.ptHeight) ); + int totalh = tqRound( zoomIt(d->layout.ptHeight) ); // Clip rect - this gives basically always a rect like (2,2,width-2,height-2) TQRect paintRect = _painter->clipRegion( TQPainter::CoordPainter ).boundingRect(); // Ruler rect @@ -598,7 +598,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) if ( d->canvas ) drawLine(d->oldMx, -1); update(); - emit newPageLayout( d->tqlayout ); + emit newPageLayout( d->layout ); } else if ( d->action == A_BR_TOP || d->action == A_BR_BOTTOM ) { d->whileMovingBorderTop = false; d->whileMovingBorderBottom = false; @@ -610,7 +610,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) p.end(); } update(); - emit newPageLayout( d->tqlayout ); + emit newPageLayout( d->layout ); } else if ( d->action == A_FIRST_INDENT ) { if ( d->canvas ) drawLine(d->oldMx, -1); @@ -667,12 +667,12 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) hasToDelete = false; int pw = d->frameEnd - frameStart; - int ph = tqRound(zoomIt(d->tqlayout.ptHeight)); + int ph = tqRound(zoomIt(d->layout.ptHeight)); int left = frameStart - diffx; - int top = tqRound(zoomIt(d->tqlayout.ptTop)); + int top = tqRound(zoomIt(d->layout.ptTop)); top -= diffy; int right = d->frameEnd - diffx; - int bottom = tqRound(zoomIt(d->tqlayout.ptBottom)); + int bottom = tqRound(zoomIt(d->layout.ptBottom)); bottom = ph - bottom - diffy; // Cumulate first-line-indent int ip_first = tqRound( zoomIt( i_first + ( d->rtl ? d->i_right : i_left) ) ); @@ -693,13 +693,13 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) /////// ###### // At the moment, moving the left and right border indicators // is disabled when setFrameStartEnd has been called (i.e. in KWord) - // Changing the tqlayout margins directly from it would be utterly wrong + // Changing the layout margins directly from it would be utterly wrong // (just try the 2-columns modes...). What needs to be done is: // emitting a signal frameResized in mouseReleaseEvent, when a left/right // border has been moved, and in kword we need to update the margins from // there, if the left border of the 1st column or the right border of the // last column was moved... and find what to do with the other borders. - // And for normal frames, resize the frame without touching the page tqlayout. + // And for normal frames, resize the frame without touching the page layout. // All that is too much for now -> disabling. if ( !m_bFrameStartSet ) { @@ -747,7 +747,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_LEFT: { if ( d->canvas && mx < right-10 && mx+diffx-2 > 0) { drawLine( d->oldMx, mx ); - d->tqlayout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); + d->layout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -770,7 +770,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_RIGHT: { if ( d->canvas && mx > left+10 && mx+diffx <= pw-2) { drawLine( d->oldMx, mx ); - d->tqlayout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); + d->layout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -895,7 +895,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->tqlayout.ptTop = unZoomIt(static_cast<double>(my + diffy)); + d->layout.ptTop = unZoomIt(static_cast<double>(my + diffy)); d->oldMx = mx; d->oldMy = my; update(); @@ -910,7 +910,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->tqlayout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); + d->layout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); d->oldMx = mx; d->oldMy = my; update(); @@ -984,7 +984,7 @@ void KoRuler::handleDoubleClick() // Double-clicked nothing d->action = A_NONE; - emit doubleClicked(); // usually page tqlayout dialog + emit doubleClicked(); // usually page layout dialog } void KoRuler::setTabList( const KoTabulatorList & _tabList ) @@ -1195,7 +1195,7 @@ TQSize KoRuler::sizeHint() const void KoRuler::setPageLayout( const KoPageLayout& _layout ) { - d->tqlayout = _layout; + d->layout = _layout; update(); } diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h index 52dcecd0..352e6820 100644 --- a/lib/kofficeui/KoRuler.h +++ b/lib/kofficeui/KoRuler.h @@ -96,7 +96,7 @@ class KoRulerPrivate; * and supports zooming, tabulators, paragraph indents, showing the mouse position, etc. * * It also offers a popupmenu upon right-clicking, for changing the unit, - * the page tqlayout, or removing a tab. + * the page layout, or removing a tab. */ class KOFFICEUI_EXPORT KoRuler : public TQFrame { @@ -139,7 +139,7 @@ public: const double& zoom() const { return m_zoom; } /** - * Set the page tqlayout, see @ref KoPageLayout. + * Set the page layout, see @ref KoPageLayout. * This defines the size of the page and the margins, * from which the size of the ruler is deducted. */ diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index a249084f..fe448916 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -37,7 +37,7 @@ // TODO // improvement possibilities // - use offscreen buffer to reduce flicker even more -// - keep track of tabs, only (re)tqlayout when necessary +// - keep track of tabs, only (re)layout when necessary // - paint all tabs to buffer, show only by shifting // - customizable button pixmaps // - use TQStyle to paint the tabs & buttons (is it good/possible?) @@ -57,7 +57,7 @@ public: // read-only: no mouse drag, double-click, right-click bool readOnly; - // if true, tqlayout is from right to left + // if true, layout is from right to left bool reverseLayout; // list of all tabs, in order of appearance @@ -724,7 +724,7 @@ void KoTabBar::resizeEvent( TQResizeEvent* ) TQSize KoTabBar::sizeHint() const { - return TQSize( 40, tqstyle().pixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); + return TQSize( 40, style().pixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); } void KoTabBar::renameTab( const TQString& old_name, const TQString& new_name ) diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 0311049e..af79486d 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -165,7 +165,7 @@ class KoTemplateChooseDiaPrivate { // choose a file MyFileDialog *m_filedialog; - // for the tqlayout + // for the layout TQTabWidget* tabWidget; TQWidget* newTab; TQWidget* existingTab; @@ -298,13 +298,13 @@ KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType() const { /*================================================================*/ // private -void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) +void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * layout) { d->m_recent = new KoTCDRecentFilesIconView(widgetbase, "recent files"); // I prefer the icons to be in "most recent first" order (DF) d->m_recent->setSorting( static_cast<TQDir::SortSpec>( TQDir::Time | TQDir::Reversed ) ); - tqlayout->addWidget(d->m_recent,0,0); + layout->addWidget(d->m_recent,0,0); TQString oldGroup = d->m_instance->config()->group(); d->m_instance->config()->setGroup( "RecentFiles" ); @@ -342,7 +342,7 @@ void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout /*================================================================*/ // private -void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) +void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * layout) { TQString dir = TQString(); TQPoint point( 0, 0 ); @@ -353,7 +353,7 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * "file dialog", false); - tqlayout->addWidget(d->m_filedialog,0,0); + layout->addWidget(d->m_filedialog,0,0); d->m_filedialog->reparent( widgetbase , point ); //d->m_filedialog->setOperationMode( KFileDialog::Opening); @@ -387,20 +387,20 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * /*================================================================*/ // private -void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) +void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * layout) { d->m_jwidget = new KJanusWidget( widgetbase, "kjanuswidget", KJanusWidget::IconList); - tqlayout->addWidget(d->m_jwidget,0,0); + layout->addWidget(d->m_jwidget,0,0); d->boxdescription = new TQVGroupBox( i18n("Selected Template"), widgetbase, "boxdescription"); - tqlayout->addWidget(d->boxdescription, 1, 0 ); + layout->addWidget(d->boxdescription, 1, 0 ); // config KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" ); @@ -429,9 +429,9 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou group->name(), group->first()->loadPicture(d->m_instance)); - TQGridLayout * tqlayout = new TQGridLayout(frame); + TQGridLayout * layout = new TQGridLayout(frame); KoTCDIconCanvas *canvas = new KoTCDIconCanvas( frame ); - tqlayout->addWidget(canvas,0,0); + layout->addWidget(canvas,0,0); canvas->setBackgroundColor( colorGroup().base() ); canvas->setResizeMode(TQIconView::Adjust); @@ -481,7 +481,7 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou TQString translatedstring = i18n("Always start %1 with the selected template").arg(d->m_nativeName); d->m_nodiag = new TQCheckBox ( translatedstring , widgetbase); - tqlayout->addWidget(d->m_nodiag, 2, 0); + layout->addWidget(d->m_nodiag, 2, 0); TQString startwithoutdialog = grp.readEntry( "NoStartDlg" ); bool ischecked = startwithoutdialog == TQString("yes"); diff --git a/lib/kofficeui/KoTemplateChooseDia.h b/lib/kofficeui/KoTemplateChooseDia.h index 677c11b1..9363477d 100644 --- a/lib/kofficeui/KoTemplateChooseDia.h +++ b/lib/kofficeui/KoTemplateChooseDia.h @@ -236,9 +236,9 @@ private: TQString descriptionText(const TQString &name, const TQString &description); void setupDialog(); - void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); - void setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); - void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); + void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * layout); + void setupFileDialog(TQWidget * widgetbase, TQGridLayout * layout); + void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * layout); bool collectInfo(); bool noStartupDlg() const; diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp index 4e8c4d0c..d2dc25f0 100644 --- a/lib/kofficeui/KoTemplateCreateDia.cpp +++ b/lib/kofficeui/KoTemplateCreateDia.cpp @@ -142,15 +142,15 @@ KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstan TQVBoxLayout *rightbox=new TQVBoxLayout(mbox); TQGroupBox *pixbox=new TQGroupBox(i18n("Picture"), mainwidget); rightbox->addWidget(pixbox); - TQVBoxLayout *pixtqlayout=new TQVBoxLayout(pixbox, KDialogBase::marginHint(), + TQVBoxLayout *pixlayout=new TQVBoxLayout(pixbox, KDialogBase::marginHint(), KDialogBase::spacingHint()); pixtqlayout->addSpacing(pixbox->fontMetrics().height()/2); - pixtqlayout->addStretch(1); + pixlayout->addStretch(1); d->m_default=new TQRadioButton(i18n("&Default"), pixbox); d->m_default->setChecked(true); connect(d->m_default, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefault())); - pixtqlayout->addWidget(d->m_default); - TQHBoxLayout *custombox=new TQHBoxLayout(pixtqlayout); + pixlayout->addWidget(d->m_default); + TQHBoxLayout *custombox=new TQHBoxLayout(pixlayout); d->m_custom=new TQRadioButton(i18n("Custom"), pixbox); d->m_custom->setChecked(false); connect(d->m_custom, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustom())); @@ -159,15 +159,15 @@ KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstan connect(d->m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelect())); custombox->addWidget(d->m_select, 1); custombox->addStretch(1); - pixtqlayout->addStretch(1); + pixlayout->addStretch(1); label=new TQLabel(i18n("Preview:"), pixbox); - pixtqlayout->addWidget(label); - TQHBoxLayout *previewbox=new TQHBoxLayout(pixtqlayout); + pixlayout->addWidget(label); + TQHBoxLayout *previewbox=new TQHBoxLayout(pixlayout); previewbox->addStretch(10); d->m_preview=new TQLabel(pixbox); // setPixmap() -> auto resize? previewbox->addWidget(d->m_preview); previewbox->addStretch(10); - pixtqlayout->addStretch(8); + pixlayout->addStretch(8); d->m_defaultTemplate = new TQCheckBox( i18n("Use the new template as default"), mainwidget ); d->m_defaultTemplate->setChecked( true ); diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index bc5affeb..10334c32 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -368,7 +368,7 @@ void KoColorPanel::paintEvent( TQPaintEvent* e ) // The "active" element (if there is one) if ( hasFocus() && m_focusPosition.x != -1 && m_focusPosition.y != -1 && mapFromPosition( m_focusPosition ).intersects( e->rect() ) ) - tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), + style().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); --lns; // Attention: We just avoid some lns - 1 statements @@ -579,7 +579,7 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition ) TQMap<Position, TQColor>::ConstIterator it = m_colorMap.find( m_focusPosition ); if ( it != m_colorMap.end() ) { // draw at the new focus position - tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), + style().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); p.fillRect( ( m_focusPosition.x << 4 ) + 2, ( m_focusPosition.y << 4 ) + 2, 12, 12, it.data() ); } @@ -712,15 +712,15 @@ void KoToolButton::drawButton(TQPainter *_painter) // Draw styled toolbuttons _painter->setClipRect( 0, 0, width() - ARROW_WIDTH, height() ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, + style().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, flags, TQStyle::SC_ToolButton, active, opt ); _painter->setClipRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, + style().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, arrowFlags, TQStyle::SC_ToolButton, arrowActive, opt ); _painter->setClipping( false ); // ...and the arrow indicating the popup - tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, _painter, TQRect( width() - ARROW_WIDTH - 1, 0, ARROW_WIDTH, height() ), + style().tqdrawPrimitive( TQStyle::PE_ArrowDown, _painter, TQRect( width() - ARROW_WIDTH - 1, 0, ARROW_WIDTH, height() ), cg, flags, opt ); if ( KToolBarButton::isRaised() || m_arrowPressed ) @@ -798,7 +798,7 @@ void KoToolButton::drawButton(TQPainter *_painter) if (!textLabel().isNull() && !textRect.isNull()) { _painter->setFont( KGlobalSettings::toolBarFont() ); if ( !isEnabled() ) - _painter->setPen( tqpalette().disabled().dark() ); + _painter->setPen( palette().disabled().dark() ); else if( KToolBarButton::isRaised() ) _painter->setPen( KGlobalSettings::toolBarHighlightColor() ); else @@ -838,15 +838,15 @@ void KoToolButton::init() // We are interested in the mouse clicks on the arrow button m_popup->installEventFilter( this ); - ARROW_WIDTH = tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; + ARROW_WIDTH = style().pixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; kdDebug() << "##################### Arrow: " << ARROW_WIDTH << endl; } void KoToolButton::buttonShift( int& dx, int& dy ) { if ( isDown() && !m_arrowPressed ) { - dx += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ); - dy += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ); + dx += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ); + dy += style().pixelMetric( TQStyle::PM_ButtonShiftVertical ); } } diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 14b92ec6..2a2c854e 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -379,48 +379,48 @@ double KoUnitDoubleComboBox::value( void ) const KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *parent, const char *name ) : TQWidget( parent ), m_step( 1.0 ) { - TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); - //tqlayout->setMargin( 2 ); + TQGridLayout *layout = new TQGridLayout( this, 2, 3 ); + //layout->setMargin( 2 ); TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - tqlayout->addWidget( up, 0, 0 ); + layout->addWidget( up, 0, 0 ); connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - tqlayout->addWidget( down, 1, 0 ); + layout->addWidget( down, 1, 0 ); connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name ); connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); - tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *parent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) : TQWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) { - TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); - //tqlayout->setMargin( 2 ); + TQGridLayout *layout = new TQGridLayout( this, 2, 3 ); + //layout->setMargin( 2 ); TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - tqlayout->addWidget( up, 0, 0 ); + layout->addWidget( up, 0, 0 ); connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - tqlayout->addWidget( down, 1, 0 ); + layout->addWidget( down, 1, 0 ); connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name ); connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); - tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } void diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp index cfc21c65..65b4de02 100644 --- a/lib/kofficeui/tkaction.cpp +++ b/lib/kofficeui/tkaction.cpp @@ -128,11 +128,11 @@ TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* children) TQLabel* pixLabel = new TQLabel(base,"pixmap"); children->reparent(base,TQPoint(0,0)); children->setName("widget"); - TQHBoxLayout* tqlayout = new TQHBoxLayout(base,0,3); - tqlayout->setResizeMode(TQLayout::Minimum); - tqlayout->addWidget(textLabel); - tqlayout->addWidget(pixLabel); - tqlayout->addWidget(children,1); + TQHBoxLayout* layout = new TQHBoxLayout(base,0,3); + layout->setResizeMode(TQLayout::Minimum); + layout->addWidget(textLabel); + layout->addWidget(pixLabel); + layout->addWidget(children,1); updateLayout(base); return base; diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp index 1449d0fb..11ddbc7f 100644 --- a/lib/kofficeui/tkcoloractions.cpp +++ b/lib/kofficeui/tkcoloractions.cpp @@ -43,7 +43,7 @@ TKColorPopupMenu::~TKColorPopupMenu() void TKColorPopupMenu::updateItemSize() { - styleChange(tqstyle()); + styleChange(style()); } /****************************************************************************************/ class TKSelectColorActionPrivate diff --git a/lib/kofficeui/tkcombobox.cpp b/lib/kofficeui/tkcombobox.cpp index cd20f790..c7b2a8b2 100644 --- a/lib/kofficeui/tkcombobox.cpp +++ b/lib/kofficeui/tkcombobox.cpp @@ -87,11 +87,11 @@ void TKComboBox::paintEvent(TQPaintEvent*) TQPixmap pixmap(arrow_down); - tqstyle().drawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), colorGroup() ); - tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, TQString() ); + style().drawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), colorGroup() ); + style().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, TQString() ); if ( hasFocus()) { - tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g ); + style().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g ); } if (!editable()) { diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index af2b14c2..8a2798e0 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -353,14 +353,14 @@ void TKToolBarButton::drawButton( TQPainter* p ) #define DRAW_PIXMAP_AND_TEXT \ int x = 3;\ if (pixmap()) {\ - tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), isEnabled(), pixmap(), TQString() );\ + style().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), isEnabled(), pixmap(), TQString() );\ if (d->m_iconMode==TK::IconAndText && !d->m_text.isEmpty()) {\ x += pixmap()->width() + 3;\ }\ }\ if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\ TQFontMetrics fm(KGlobalSettings::toolBarFont());\ - tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\ + style().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\ } const char* arrow[] = { @@ -384,20 +384,20 @@ void TKToolBarButton::drawButton( TQPainter* p ) if (d->m_isRaised) flags |= TQStyle::Style_Raised; if (hasFocus()) flags |= TQStyle::Style_HasFocus; - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, colorGroup(), isEnabled(), &arrow_pix, TQString() ); + style().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); + style().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); + style().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, colorGroup(), isEnabled(), &arrow_pix, TQString() ); if ( d->m_isRaised ) qDrawShadeLine( p, width()-12, 0, width()-12, height(), colorGroup(), true ); DRAW_PIXMAP_AND_TEXT } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : tqpalette().disabled(), f ); + style().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); DRAW_PIXMAP_AND_TEXT int z = f ? 1:0; p->drawPixmap(width()-11+z,(height()-4)/2+z ,arrow_pix); } } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : tqpalette().disabled(), f ); + style().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); DRAW_PIXMAP_AND_TEXT } } diff --git a/lib/kopainter/koIconChooser.cc b/lib/kopainter/koIconChooser.cc index 7fa2f11b..9fd7f877 100644 --- a/lib/kopainter/koIconChooser.cc +++ b/lib/kopainter/koIconChooser.cc @@ -446,7 +446,7 @@ KoPatternChooser::KoPatternChooser( const TQPtrList<KoIconItem> &list, TQWidget for( itr.toFirst(); itr.current(); ++itr ) chooser->addItem( itr.current() ); - TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 1, -1, "main tqlayout" ); + TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 1, -1, "main layout" ); mainLayout->addWidget( chooser, 10 ); } diff --git a/lib/kopalette/kopalette.cc b/lib/kopalette/kopalette.cc index 04774369..dd247877 100644 --- a/lib/kopalette/kopalette.cc +++ b/lib/kopalette/kopalette.cc @@ -54,8 +54,8 @@ KoPalette::KoPalette(TQWidget * parent, const char * name) setHorizontallyStretchable(false); setNewLine(true); - tqlayout() -> setSpacing(0); - tqlayout() -> setMargin(0); + layout() -> setSpacing(0); + layout() -> setMargin(0); resetFont(); } diff --git a/lib/kopalette/kopalettemanager.h b/lib/kopalette/kopalettemanager.h index be9e7126..dd8f1686 100644 --- a/lib/kopalette/kopalettemanager.h +++ b/lib/kopalette/kopalettemanager.h @@ -172,7 +172,7 @@ public slots: void showAllPalettes(bool shown); /** - * Restores the palette configuration to the default tqlayout, i.e, the tqlayout + * Restores the palette configuration to the default layout, i.e, the layout * preferred by each docker. */ virtual void slotReset(); diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index 0a431329..1027d224 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -133,7 +133,7 @@ class GroupWidgetBase : public TQWidget TQRect r(rect()); TQPainter p(this); TQStyle::StyleFlags flags = m_mouseDown ? TQStyle::Style_Down : TQStyle::Style_Default; - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, tqpalette().active(), flags); + kapp->style().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active(), flags); paintListViewExpander(&p, this, r.height()+2, tqpalette().active(), isOpen()); if (!m_miniicon.isNull()) { @@ -143,7 +143,7 @@ class GroupWidgetBase : public TQWidget if (!m_titleStr.isNull()) { int indent = 16 + (m_miniicon.isNull() ? 0 : (m_miniicon.width()+4)); - p.setPen(tqpalette().active().text()); + p.setPen(palette().active().text()); TQFont f = p.font(); f.setBold(true); p.setFont(f); diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp index da3fd994..7791730c 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -46,7 +46,7 @@ BoolEdit::BoolEdit(Property *property, TQWidget *parent, const char *name) m_toggle->setUsesTextLabel(true); m_toggle->setTextPosition(TQToolButton::Right); m_toggle->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - //we're not using tqlayout to because of problems with button size + //we're not using layout to because of problems with button size m_toggle->move(0, 0); m_toggle->resize(width(), height()); setFocusWidget(m_toggle); diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp index f85279ce..a4f4b519 100644 --- a/lib/koproperty/editors/fontedit.cpp +++ b/lib/koproperty/editors/fontedit.cpp @@ -47,7 +47,7 @@ class FontEditRequester : public KFontRequester FontEditRequester(TQWidget* parent) : KFontRequester(parent) { - label()->setPaletteBackgroundColor(tqpalette().active().base()); + label()->setPaletteBackgroundColor(palette().active().base()); label()->setMinimumWidth(0); label()->setFrameShape(TQFrame::Box); label()->setIndent(-1); @@ -55,9 +55,9 @@ class FontEditRequester : public KFontRequester label()->setFocusPolicy(TQ_ClickFocus); KAcceleratorManager::setNoAccel(label()); #endif - tqlayout()->remove(label()); - tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); - delete tqlayout(); + layout()->remove(label()); + layout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); + delete layout(); button()->setText(i18n("...")); TQToolTip::add(button(), i18n("Change font")); button()->setFocusPolicy(TQ_NoFocus); diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index d887a8cd..265ee16d 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -73,7 +73,7 @@ PixmapEdit::PixmapEdit(Property *property, TQWidget *parent, const char *name) m_button->setFocusPolicy(TQ_NoFocus); m_popup = new TQLabel(0, "m_popup", TQt::WStyle_Customize|TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop); - m_popup->setPaletteBackgroundColor(m_popup->tqpalette().active().base()); + m_popup->setPaletteBackgroundColor(m_popup->palette().active().base()); m_popup->setFrameStyle(TQFrame::Plain|TQFrame::Box); m_popup->setMargin(2); m_popup->setLineWidth(1); diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp index c47c854f..7badc4de 100644 --- a/lib/koproperty/editors/pointedit.cpp +++ b/lib/koproperty/editors/pointedit.cpp @@ -41,7 +41,7 @@ PointEdit::PointEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); // m_edit->setBackgroundMode(TQt::PaletteBase); // m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index 3cebfea8..2422eec8 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -39,7 +39,7 @@ RectEdit::RectEdit(Property *property, TQWidget *parent, const char *name) setHasBorders(false); m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); - m_edit->setPaletteBackgroundColor(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); m_edit->setMinimumHeight(5); setEditor(m_edit); diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp index 98075515..3e0213d9 100644 --- a/lib/koproperty/editors/sizeedit.cpp +++ b/lib/koproperty/editors/sizeedit.cpp @@ -41,7 +41,7 @@ SizeEdit::SizeEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(tqpalette().active().base()); + m_edit->setPaletteBackgroundColor(palette().active().base()); // m_edit->setBackgroundMode(TQt::PaletteBase); // m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp index 65a7d951..faaefdb9 100644 --- a/lib/koproperty/editors/symbolcombo.cpp +++ b/lib/koproperty/editors/symbolcombo.cpp @@ -61,7 +61,7 @@ TQVariant SymbolCombo::value() const { if (!(m_edit->text().isNull())) - return m_edit->text().at(0).tqunicode(); + return m_edit->text().at(0).unicode(); else return 0; } diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index 5f61ff6b..9f097c61 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -104,7 +104,7 @@ enum PropertyType { //predefined custom types ValueFromList = 2000 /**<string value from a list*/, - Symbol = 2001 /**<tqunicode symbol code*/, + Symbol = 2001 /**<unicode symbol code*/, FontName /**<font name, e.g. "times new roman"*/, FileURL /**<url of a file*/, PictureFileURL /**<url of a pixmap*/, diff --git a/lib/koproperty/widgetproxy.cpp b/lib/koproperty/widgetproxy.cpp index a4558319..9e6ea602 100644 --- a/lib/koproperty/widgetproxy.cpp +++ b/lib/koproperty/widgetproxy.cpp @@ -30,7 +30,7 @@ class WidgetProxyPrivate { public: WidgetProxyPrivate() - : property(0), widget(0), type(Invalid), tqlayout(0) + : property(0), widget(0), type(Invalid), layout(0) {} ~WidgetProxyPrivate() {} @@ -38,7 +38,7 @@ class WidgetProxyPrivate Widget *widget; PropertyType type; - TQHBoxLayout *tqlayout; + TQHBoxLayout *layout; }; } @@ -49,7 +49,7 @@ WidgetProxy::WidgetProxy(TQWidget *parent, const char *name) { d = new WidgetProxyPrivate(); d->property = new Property(); - d->tqlayout = new TQHBoxLayout(this, 0, 0); + d->layout = new TQHBoxLayout(this, 0, 0); } WidgetProxy::~WidgetProxy() @@ -118,7 +118,7 @@ WidgetProxy::setWidget() if (d->widget) { d->widget->reparent(this, TQPoint(0,0), true); - d->tqlayout->addWidget(d->widget); + d->layout->addWidget(d->widget); } } diff --git a/lib/kotext/DESIGN b/lib/kotext/DESIGN index 4fd1e479..12bc2940 100644 --- a/lib/kotext/DESIGN +++ b/lib/kotext/DESIGN @@ -26,17 +26,17 @@ Zoomed: (aka Normal) Internal: The former two were mostly for objects like frames etc, not for text. Text (the individual - words and characters) are positioned with the tqlayout coordinates. Layout is similar to the + words and characters) are positioned with the layout coordinates. Layout is similar to the Zoomed system, but always uses the same resolution. This resolution is sufficiently high to - do the tqlayout in integers, and not really lose info. + do the layout in integers, and not really lose info. - This is the high-resolution unit in which the text tqlayout is done, + This is the high-resolution unit in which the text layout is done, currently set to 1440 DPI. Everything known the QRT classes will be in this coordinate system (including the QTextFormats). When painting, we apply the current zoom and resolution to find the right font size to use, and we have to catch up with rounding differences. However the position of the words - (i.e. tqlayout) is the one determined previously in tqlayout units. KoZoomHandler - offers methods for converting between tqlayout units and zoom-dependent points + (i.e. layout) is the one determined previously in layout units. KoZoomHandler + offers methods for converting between layout units and zoom-dependent points and pixels. Note that the Internal coordinate system starts at the topleft corner of @@ -73,14 +73,14 @@ Document (pt values, in double, KoPoint, KoRect.) | |--KWTextFrameSet::documentToInternal V -Internal coordinates (the coordinates given to QRT - in "tqlayout units") -Note that there are pixels and pts in the tqlayout unit system too ! +Internal coordinates (the coordinates given to QRT - in "layout units") +Note that there are pixels and pts in the layout unit system too ! There are conversions between LU points and document points, but also direct conversions between LU pixels and view pixels. Font sizes ========== -A 12pt font will lead to a tqlayout font of ptToLayoutUnit(12)=20*12=240pt - +A 12pt font will lead to a layout font of ptToLayoutUnit(12)=20*12=240pt - that's the value stored in the QTextFormat. However font metrics are calculated from the 100%-zoom-level font (e.g. 12pt for a 12pt font) diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index 393488c9..8be2f699 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -473,7 +473,7 @@ void KFontChooser_local::family_chosen_slot(const TQString& family) TQFontDatabase dbase; - TQStringList styles = TQStringList(dbase.tqstyles(currentFamily)); + TQStringList styles = TQStringList(dbase.styles(currentFamily)); styleListBox->clear(); currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { diff --git a/lib/kotext/KoChangeCaseDia.cpp b/lib/kotext/KoChangeCaseDia.cpp index 8f7c2515..cde58f0a 100644 --- a/lib/kotext/KoChangeCaseDia.cpp +++ b/lib/kotext/KoChangeCaseDia.cpp @@ -36,7 +36,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name ) TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Case" ),page ); grp->setRadioButtonExclusive( TRUE ); - grp->tqlayout(); + grp->layout(); m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp ); m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp ); diff --git a/lib/kotext/KoCompletionBase.ui b/lib/kotext/KoCompletionBase.ui index 3156e078..babc467c 100644 --- a/lib/kotext/KoCompletionBase.ui +++ b/lib/kotext/KoCompletionBase.ui @@ -29,7 +29,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout9</cstring> + <cstring>layout9</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout8</cstring> + <cstring>layout8</cstring> </property> <vbox> <property name="name"> @@ -129,7 +129,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout11</cstring> + <cstring>layout11</cstring> </property> <grid> <property name="name"> @@ -254,7 +254,7 @@ This option is most important when Automatically add words to completion list is </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout10</cstring> + <cstring>layout10</cstring> </property> <hbox> <property name="name"> @@ -302,7 +302,7 @@ This option is most important when Automatically add words to completion list is </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kotext/KoCompletionDia.cpp b/lib/kotext/KoCompletionDia.cpp index abe89b56..09e12f0d 100644 --- a/lib/kotext/KoCompletionDia.cpp +++ b/lib/kotext/KoCompletionDia.cpp @@ -40,7 +40,7 @@ KoCompletionDia::KoCompletionDia( TQWidget *parent, const char *name, KoAutoForm { TQVBox *page = makeVBoxMainWidget(); m_widget = new KoCompletion(page, autoFormat); - m_widget->tqlayout()->setMargin(0); + m_widget->layout()->setMargin(0); connect( this, TQT_SIGNAL( user1Clicked() ), m_widget, TQT_SLOT(slotResetConf())); setButtonWhatsThis(Ok,i18n("This will save your options.")); setButtonWhatsThis(Cancel,i18n("This will abort all changes.")); diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 96ff88e1..475f439d 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -72,7 +72,7 @@ static int shapeBufSize = 0; Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on arabic). - Each tqunicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). + Each unicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). transparent joining is not encoded in TQChar::joining(), but applies to all combining marks and format marks. Right join-causing: dual + center @@ -113,7 +113,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos ) { //kdDebug() << "leftChar: pos=" << pos << endl; pos--; - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; while( pos > -1 ) { if( !ch->isMark() ) return ch; @@ -127,7 +127,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos) { pos++; int len = str.length(); - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; while( pos < len ) { //kdDebug() << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << endl; if( !ch->isMark() ) @@ -155,7 +155,7 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos) { // ignores L1 - L3, done in the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: @@ -200,7 +200,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in { // ignores L1 - L3, ligatures are job of the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: @@ -229,7 +229,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in // ------------------------------------------------------------- -// The tqunicode to tqunicode shaping codec. +// The unicode to unicode shaping codec. // does only presentation forms B at the moment, but that should be enough for // simple display static const ushort arabicUnicodeMapping[256][2] = { @@ -561,13 +561,13 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa // we have to ignore NSMs at the beginning and add at the end. int num = uc.length() - from - len; - const TQChar *ch = uc.tqunicode() + from + len; + const TQChar *ch = uc.unicode() + from + len; while ( num > 0 && ch->combiningClass() != 0 ) { ch++; num--; len++; } - ch = uc.tqunicode() + from; + ch = uc.unicode() + from; while ( len > 0 && ch->combiningClass() != 0 ) { ch++; len--; @@ -602,7 +602,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa if ( dir == TQPainter::RTL ) pos = from + len - 1 - i; int shape = glyphVariantLogical( uc, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // take care of lam-alef ligatures (lam right of alef) ushort map; switch ( c ) { @@ -627,7 +627,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( uc, pos )->tqunicode() == 0x0644 ) { + if ( prevChar( uc, pos )->unicode() == 0x0644 ) { // have a lam alef ligature //kdDebug() << " alef of lam-alef ligature" << endl; goto skip; @@ -689,12 +689,12 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) { - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; if ( ch->row() != 0x06 ) return *ch; else { int shape = glyphVariantLogical( str, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // lam aleph ligatures switch ( ch->cell() ) { case 0x44: { // lam @@ -716,7 +716,7 @@ TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFon case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( str, pos )->tqunicode() == 0x0644 ) + if ( prevChar( str, pos )->unicode() == 0x0644 ) // have a lam alef ligature return TQChar(0); default: @@ -842,7 +842,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str default: break; } - //kdDebug() << "char=" << mark.tqunicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; + //kdDebug() << "char=" << mark.unicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; markRect.moveBy( p.x(), p.y() ); p += TQPoint( -baseOffset, 0 ); attachmentRect |= markRect; @@ -864,7 +864,7 @@ static TQChar::Direction basicDirection(const TQString &str, int start = 0) { int len = str.length(); int pos = start > len ? len -1 : start; - const TQChar *uc = str.tqunicode() + pos; + const TQChar *uc = str.unicode() + pos; while( pos < len ) { switch( uc->direction() ) { @@ -1406,8 +1406,8 @@ TQString KoComplexText::bidiReorderString( const TQString &str, TQChar::Directio int len = str.length(); TQString visual; visual.setUnicode( 0, len ); - TQChar *vch = (TQChar *)visual.tqunicode(); - const TQChar *ch = str.tqunicode(); + TQChar *vch = (TQChar *)visual.unicode(); + const TQChar *ch = str.unicode(); while( lineStart < len ) { lineEnd = lineStart; while( *ch != '\n' && lineEnd < len ) { diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 56adc3a2..9810e8b0 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -216,7 +216,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, TQString bulletChar = listStyle.attributeNS( KoXmlNS::text, "bullet-char", TQString() ); if ( !bulletChar.isEmpty() ) { // Reverse engineering, I found those codes: - switch( bulletChar[0].tqunicode() ) { + switch( bulletChar[0].unicode() ) { case 0x2022: // small disc -> circle m_style = STYLE_CIRCLEBULLET; break; @@ -235,7 +235,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_BOXBULLET; break; default: - kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.tqunicode(), 16 ) << endl; + kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.unicode(), 16 ) << endl; // fallback case 0x2794: // arrow case 0x2717: // cross @@ -504,7 +504,7 @@ void KoParagCounter::save( TQDomElement & element ) element.setAttribute( "depth", m_depth ); if ( (Style)m_style == STYLE_CUSTOMBULLET ) { - element.setAttribute( "bullet", m_customBulletChar.tqunicode() ); + element.setAttribute( "bullet", m_customBulletChar.unicode() ); if ( !m_customBulletFont.isEmpty() ) element.setAttribute( "bulletfont", m_customBulletFont ); } @@ -973,7 +973,7 @@ void KoParagCounter::printRTDebug( KoTextParag* parag ) if ( restartCounter() ) additionalInfo = "[restartCounter]"; if ( m_style == STYLE_CUSTOMBULLET ) - additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.tqunicode() ) + additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.unicode() ) + " in font '" + m_customBulletFont + "']"; static const char * const s_numbering[] = { "List", "Chapter", "None", "Footnote" }; kdDebug(32500) << " Counter style=" << style() diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index 1d424b27..0e38c8b5 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -830,7 +830,7 @@ void KoStylePreview::drawContents( TQPainter *painter ) TQRect whiteRect( r.x() + 10, r.y() + 10, r.width() - 20, r.height() - 20 ); - TQColorGroup cg = TQApplication::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().active(); painter->fillRect( whiteRect, cg.brush( TQColorGroup::Base ) ); KoTextParag * parag = m_textdoc->firstParag(); @@ -1605,9 +1605,9 @@ KoParagCounterWidget::KoParagCounterWidget( bool disableAll, TQWidget * parent, gNumbering = new TQButtonGroup( this, "numberingGroup" ); gNumbering->setTitle( i18n( "Numbering" ) ); gNumbering->setColumnLayout(0, Qt::Vertical ); - gNumbering->tqlayout()->setSpacing( 0 ); - gNumbering->tqlayout()->setMargin( 0 ); - TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->tqlayout() ); + gNumbering->layout()->setSpacing( 0 ); + gNumbering->layout()->setMargin( 0 ); + TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->layout() ); numberingGroupLayout->setAlignment( TQt::AlignTop ); numberingGroupLayout->setSpacing( KDialog::spacingHint() ); numberingGroupLayout->setMargin( KDialog::marginHint() ); @@ -1770,9 +1770,9 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram gPosition = new TQGroupBox( this, "gPosition" ); gPosition->setTitle( i18n( "Po&sition" ) ); gPosition->setColumnLayout(0, Qt::Vertical ); - gPosition->tqlayout()->setSpacing( 0 ); - gPosition->tqlayout()->setMargin( 0 ); - TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->tqlayout() ); + gPosition->layout()->setSpacing( 0 ); + gPosition->layout()->setMargin( 0 ); + TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->layout() ); GroupBox2Layout->setAlignment( TQt::AlignTop ); GroupBox2Layout->setSpacing( KDialog::spacingHint() ); GroupBox2Layout->setMargin( KDialog::marginHint() ); @@ -1798,9 +1798,9 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram bgAlign = new TQButtonGroup( this ); bgAlign->setTitle( i18n( "Alignment" ) ); bgAlign->setColumnLayout(0, Qt::Vertical ); - bgAlign->tqlayout()->setSpacing( 0 ); - bgAlign->tqlayout()->setMargin( 0 ); - TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->tqlayout() ); + bgAlign->layout()->setSpacing( 0 ); + bgAlign->layout()->setMargin( 0 ); + TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->layout() ); ButtonGroup1Layout->setAlignment( TQt::AlignTop ); ButtonGroup1Layout->setSpacing( KDialog::spacingHint() ); ButtonGroup1Layout->setMargin( KDialog::marginHint() ); @@ -2159,31 +2159,31 @@ KoParagDia::KoParagDia( TQWidget* parent, const char* name, { TQVBox * page = addVBoxPage( i18n( "Indent && S&pacing" ) ); m_indentSpacingWidget = new KoIndentSpacingWidget( unit,_frameWidth,page, "indent-spacing" ); - m_indentSpacingWidget->tqlayout()->setMargin(0); + m_indentSpacingWidget->layout()->setMargin(0); } if ( m_flags & PD_ALIGN ) { TQVBox * page = addVBoxPage( i18n( "General &Layout" ) ); m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" ); - m_alignWidget->tqlayout()->setMargin(0); + m_alignWidget->layout()->setMargin(0); } if ( m_flags & PD_DECORATION ) { TQVBox * page = addVBoxPage( i18n( "D&ecorations" ) ); m_decorationsWidget = new KoParagDecorationWidget( page, "decorations"); - m_decorationsWidget->tqlayout()->setMargin(0); + m_decorationsWidget->layout()->setMargin(0); } if ( m_flags & PD_NUMBERING ) { TQVBox * page = addVBoxPage( i18n( "B&ullets/Numbers" ) ); m_counterWidget = new KoParagCounterWidget( disableAll , page, "numbers" ); - m_counterWidget->tqlayout()->setMargin(0); + m_counterWidget->layout()->setMargin(0); } if ( m_flags & PD_TABS ) { TQVBox * page = addVBoxPage( i18n( "&Tabulators" ) ); m_tabulatorsWidget = new KoParagTabulatorsWidget( unit,_frameWidth, page, "tabs"); - m_tabulatorsWidget->tqlayout()->setMargin(0); + m_tabulatorsWidget->layout()->setMargin(0); } connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotReset())); diff --git a/lib/kotext/KoParagDia.h b/lib/kotext/KoParagDia.h index 443bb62f..4fd8f784 100644 --- a/lib/kotext/KoParagDia.h +++ b/lib/kotext/KoParagDia.h @@ -95,7 +95,7 @@ public: /** return the (i18n-ed) name of the tab */ virtual TQString tabName() = 0; - // Return the part of the paragtqlayout that this widget cares about + // Return the part of the paraglayout that this widget cares about int flag() const { return m_flag; } private: diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 8e5178a5..37fbbfb5 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -44,72 +44,72 @@ KoParagLayout::KoParagLayout() initialise(); } -void KoParagLayout::operator=( const KoParagLayout &tqlayout ) +void KoParagLayout::operator=( const KoParagLayout &layout ) { - alignment = tqlayout.alignment; + alignment = layout.alignment; for ( int i = 0 ; i < 5 ; ++i ) - margins[i] = tqlayout.margins[i]; - pageBreaking = tqlayout.pageBreaking; - leftBorder = tqlayout.leftBorder; - rightBorder = tqlayout.rightBorder; - topBorder = tqlayout.topBorder; - bottomBorder = tqlayout.bottomBorder; - joinBorder = tqlayout.joinBorder; - backgroundColor = tqlayout.backgroundColor; - if ( tqlayout.counter ) - counter = new KoParagCounter( *tqlayout.counter ); + margins[i] = layout.margins[i]; + pageBreaking = layout.pageBreaking; + leftBorder = layout.leftBorder; + rightBorder = layout.rightBorder; + topBorder = layout.topBorder; + bottomBorder = layout.bottomBorder; + joinBorder = layout.joinBorder; + backgroundColor = layout.backgroundColor; + if ( layout.counter ) + counter = new KoParagCounter( *layout.counter ); else counter = 0L; - lineSpacing = tqlayout.lineSpacing; - lineSpacingType = tqlayout.lineSpacingType; - style = tqlayout.style; - direction = tqlayout.direction; - setTabList( tqlayout.tabList() ); + lineSpacing = layout.lineSpacing; + lineSpacingType = layout.lineSpacingType; + style = layout.style; + direction = layout.direction; + setTabList( layout.tabList() ); } -int KoParagLayout::compare( const KoParagLayout & tqlayout ) const +int KoParagLayout::compare( const KoParagLayout & layout ) const { int flags = 0; - if ( alignment != tqlayout.alignment ) + if ( alignment != layout.alignment ) flags |= Alignment; for ( int i = 0 ; i < 5 ; ++i ) - if ( margins[i] != tqlayout.margins[i] ) + if ( margins[i] != layout.margins[i] ) { flags |= Margins; break; } - if ( pageBreaking != tqlayout.pageBreaking ) + if ( pageBreaking != layout.pageBreaking ) flags |= PageBreaking; - if ( leftBorder != tqlayout.leftBorder - || rightBorder != tqlayout.rightBorder - || topBorder != tqlayout.topBorder - || bottomBorder != tqlayout.bottomBorder - || joinBorder != tqlayout.joinBorder ) + if ( leftBorder != layout.leftBorder + || rightBorder != layout.rightBorder + || topBorder != layout.topBorder + || bottomBorder != layout.bottomBorder + || joinBorder != layout.joinBorder ) flags |= Borders; - if ( tqlayout.counter ) + if ( layout.counter ) { if ( counter ) { - if ( ! ( *tqlayout.counter == *counter ) ) + if ( ! ( *layout.counter == *counter ) ) flags |= BulletNumber; } else - if ( tqlayout.counter->numbering() != KoParagCounter::NUM_NONE ) + if ( layout.counter->numbering() != KoParagCounter::NUM_NONE ) flags |= BulletNumber; } else if ( counter && counter->numbering() != KoParagCounter::NUM_NONE ) flags |= BulletNumber; - if ( lineSpacing != tqlayout.lineSpacing - || lineSpacingType != tqlayout.lineSpacingType ) + if ( lineSpacing != layout.lineSpacing + || lineSpacingType != layout.lineSpacingType ) flags |= LineSpacing; - //if ( style != tqlayout.style ) + //if ( style != layout.style ) // flags |= Style; - if ( m_tabList != tqlayout.m_tabList ) + if ( m_tabList != layout.m_tabList ) flags |= Tabulator; - if ( backgroundColor != tqlayout.backgroundColor) + if ( backgroundColor != layout.backgroundColor) flags |= BackgroundColor; // This method is used for the GUI stuff only, so we don't have a flag @@ -141,13 +141,13 @@ KoParagLayout::~KoParagLayout() delete counter; } -void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion ) +void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion ) { - // tqlayout is an input and output parameter + // layout is an input and output parameter // It can have been initialized already, e.g. by copying from a style // (we don't do that anymore though). - // Load the paragraph tabs - we load into a clean list, not mixing with those already in "tqlayout" + // Load the paragraph tabs - we load into a clean list, not mixing with those already in "layout" // We can't apply the 'default comes from the style' in this case, because // there is no way to differentiate between "I want no tabs in the parag" // and "use default from style". @@ -171,15 +171,15 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } } qHeapSort( tabList ); - tqlayout.setTabList( tabList ); - tqlayout.alignment = TQt::AlignAuto; + layout.setTabList( tabList ); + layout.alignment = TQt::AlignAuto; element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD if ( !flow.isEmpty() ) { - tqlayout.alignment = flow=="right" ? TQt::AlignRight : + layout.alignment = flow=="right" ? TQt::AlignRight : flow=="center" ? TQt::AlignHCenter : flow=="justify" ? TQt::AlignJustify : flow=="left" ? TQt::AlignLeft : TQt::AlignAuto; @@ -187,9 +187,9 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement TQString dir = element.attribute( "dir" ); // KWord-1.2 if ( !dir.isEmpty() ) { if ( dir == "L" ) - tqlayout.direction = TQChar::DirL; + layout.direction = TQChar::DirL; else if ( dir == "R" ) - tqlayout.direction = TQChar::DirR; + layout.direction = TQChar::DirR; else kdWarning() << "Unexpected value for paragraph direction: " << dir << endl; } @@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement flow = element.attribute( "value" ); // KWord-0.8 static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify }; if ( !flow.isEmpty() && flow.toInt() < 4 ) - tqlayout.alignment = flow2align[flow.toInt()]; + layout.alignment = flow2align[flow.toInt()]; } } @@ -205,34 +205,34 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement { element = parentElem.namedItem( "OHEAD" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 ); + layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "OFOOT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 ); + layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "IFIRST" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 ); + layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "ILEFT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 ); + layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 ); } // KWord-1.0 DTD element = parentElem.namedItem( "INDENTS" ).toElement(); if ( !element.isNull() ) { - tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 ); - tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 ); - tqlayout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 ); + layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 ); + layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 ); + layout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 ); } element = parentElem.namedItem( "OFFSETS" ).toElement(); if ( !element.isNull() ) { - tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 ); - tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 ); + layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 ); + layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 ); } if ( docVersion < 2 ) @@ -240,8 +240,8 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement element = parentElem.namedItem( "LINESPACE" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) { - tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; - tqlayout.lineSpacing = getAttribute( element, "pt", 0.0 ); + layout.lineSpacingType = KoParagLayout::LS_CUSTOM; + layout.lineSpacing = getAttribute( element, "pt", 0.0 ); } } @@ -254,18 +254,18 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement TQString value = element.attribute( "value" ); if ( value == "oneandhalf" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; - tqlayout.lineSpacing = 0; + layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + layout.lineSpacing = 0; } else if ( value == "double" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; - tqlayout.lineSpacing = 0; + layout.lineSpacingType = KoParagLayout::LS_DOUBLE; + layout.lineSpacing = 0; } else { - tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; - tqlayout.lineSpacing = value.toDouble(); + layout.lineSpacingType = KoParagLayout::LS_CUSTOM; + layout.lineSpacing = value.toDouble(); } } else @@ -273,36 +273,36 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement TQString type = element.attribute( "type" ); if ( type == "oneandhalf" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; - tqlayout.lineSpacing = 0; + layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + layout.lineSpacing = 0; } else if ( type == "double" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; - tqlayout.lineSpacing = 0; + layout.lineSpacingType = KoParagLayout::LS_DOUBLE; + layout.lineSpacing = 0; } else if ( type == "custom" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; - tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + layout.lineSpacingType = KoParagLayout::LS_CUSTOM; + layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "atleast" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST; - tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + layout.lineSpacingType = KoParagLayout::LS_AT_LEAST; + layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "multiple" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE; - tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + layout.lineSpacingType = KoParagLayout::LS_MULTIPLE; + layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "fixed" ) { - tqlayout.lineSpacingType = KoParagLayout::LS_FIXED; - tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + layout.lineSpacingType = KoParagLayout::LS_FIXED; + layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "single" ) // not used; just in case future versions use it. - tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE; + layout.lineSpacingType = KoParagLayout::LS_SINGLE; } } @@ -323,37 +323,37 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement if ( !element.isNull() ) pageBreaking |= KoParagLayout::HardFrameBreakBefore; } - tqlayout.pageBreaking = pageBreaking; + layout.pageBreaking = pageBreaking; element = parentElem.namedItem( "LEFTBORDER" ).toElement(); if ( !element.isNull() ) - tqlayout.leftBorder = KoBorder::loadBorder( element ); + layout.leftBorder = KoBorder::loadBorder( element ); else - tqlayout.leftBorder.setPenWidth(0); + layout.leftBorder.setPenWidth(0); element = parentElem.namedItem( "RIGHTBORDER" ).toElement(); if ( !element.isNull() ) - tqlayout.rightBorder = KoBorder::loadBorder( element ); + layout.rightBorder = KoBorder::loadBorder( element ); else - tqlayout.rightBorder.setPenWidth(0); + layout.rightBorder.setPenWidth(0); element = parentElem.namedItem( "TOPBORDER" ).toElement(); if ( !element.isNull() ) - tqlayout.topBorder = KoBorder::loadBorder( element ); + layout.topBorder = KoBorder::loadBorder( element ); else - tqlayout.topBorder.setPenWidth(0); + layout.topBorder.setPenWidth(0); element = parentElem.namedItem( "BOTTOMBORDER" ).toElement(); if ( !element.isNull() ) - tqlayout.bottomBorder = KoBorder::loadBorder( element ); + layout.bottomBorder = KoBorder::loadBorder( element ); else - tqlayout.bottomBorder.setPenWidth(0); + layout.bottomBorder.setPenWidth(0); element = parentElem.namedItem( "COUNTER" ).toElement(); if ( !element.isNull() ) { - tqlayout.counter = new KoParagCounter; - tqlayout.counter->load( element ); + layout.counter = new KoParagCounter; + layout.counter->load( element ); } // Compatibility with KOffice-1.2 @@ -434,29 +434,29 @@ TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment ) "start"; // i.e. direction-dependent } -void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context ) +void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context ) { context.styleStack().setTypeProperties( "paragraph" ); - // tqlayout is an input and output parameter + // layout is an input and output parameter // It can have been initialized already, e.g. by copying from a style // code from OoWriterImport::writeLayout if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) { TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1(); - tqlayout.alignment = loadOasisAlignment( align ); + layout.alignment = loadOasisAlignment( align ); } if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode // LTR is lr-tb. RTL is rl-tb TQString writingMode = context.styleStack().attributeNS( KoXmlNS::style, "writing-mode" ); - tqlayout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL; + layout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL; } // Indentation (margins) if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-left" ) || // 3.11.19 context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-right" ) ) { - tqlayout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) ); - tqlayout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) ); + layout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) ); + layout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) ); // *text-indent must always be bound to either margin-left or margin-right double first = 0; if ( context.styleStack().attributeNS( KoXmlNS::style, "auto-text-indent") == "true" ) // style:auto-text-indent takes precedence @@ -467,14 +467,14 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex else if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-indent") ) first = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "text-indent") ); - tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = first; + layout.margins[TQStyleSheetItem::MarginFirstLine] = first; } // Offset before and after paragraph if( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-top") || // 3.11.22 context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-bottom")) { - tqlayout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) ); - tqlayout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) ); + layout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) ); + layout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) ); } // Line spacing @@ -483,23 +483,23 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex TQString value = context.styleStack().attributeNS( KoXmlNS::fo, "line-height" ); if ( value != "normal" ) { if ( value == "100%" ) - tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE; + layout.lineSpacingType = KoParagLayout::LS_SINGLE; else if( value=="150%") - tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; else if( value=="200%") - tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; + layout.lineSpacingType = KoParagLayout::LS_DOUBLE; else if ( value.find('%') > -1 ) { value = value.remove( '%' ); double percent = value.toDouble(); - tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE; - tqlayout.lineSpacing = percent / 100.0; - kdDebug(33001) << "line-height =" << percent << ", " << tqlayout.lineSpacing << ", " << percent/100 << endl; + layout.lineSpacingType = KoParagLayout::LS_MULTIPLE; + layout.lineSpacing = percent / 100.0; + kdDebug(33001) << "line-height =" << percent << ", " << layout.lineSpacing << ", " << percent/100 << endl; } else // fixed value { - tqlayout.lineSpacingType = KoParagLayout::LS_FIXED; - tqlayout.lineSpacing = KoUnit::parseValue( value ); + layout.lineSpacingType = KoParagLayout::LS_FIXED; + layout.lineSpacing = KoUnit::parseValue( value ); } } } @@ -512,8 +512,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex // Did we make the wrong choice in kotext? //kdWarning() << "Unimplemented support for style:line-height-at-least: " << value << endl; // Well let's see if this makes a big difference. - tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST; - tqlayout.lineSpacing = KoUnit::parseValue( value ); + layout.lineSpacingType = KoParagLayout::LS_AT_LEAST; + layout.lineSpacing = KoUnit::parseValue( value ); } // Line-spacing is mutually exclusive with line-height and line-height-at-least else if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "line-spacing") ) // 3.11.3 @@ -521,8 +521,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex double value = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::style, "line-spacing" ) ); if ( value != 0.0 ) { - tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; - tqlayout.lineSpacing = value; + layout.lineSpacingType = KoParagLayout::LS_CUSTOM; + layout.lineSpacing = value; } } @@ -530,7 +530,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex KoTabulatorList tabList; if ( context.styleStack().hasChildNodeNS( KoXmlNS::style, "tab-stops" ) ) { // 3.11.10 TQDomElement tabStops = context.styleStack().childNodeNS( KoXmlNS::style, "tab-stops" ); - //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in tqlayout." << endl; + //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in layout." << endl; TQDomElement tabStop; forEachElement( tabStop, tabStops ) { @@ -540,7 +540,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex KoTabulator tab; tab.ptPos = KoUnit::parseValue( tabStop.attributeNS( KoXmlNS::style, "position", TQString() ) ); // Tab stop positions in the XML are relative to the left-margin - tab.ptPos += tqlayout.margins[TQStyleSheetItem::MarginLeft]; + tab.ptPos += layout.margins[TQStyleSheetItem::MarginLeft]; if ( type == "center" ) tab.type = T_CENTER; else if ( type == "right" ) @@ -573,7 +573,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } else { - // Fallback: convert leaderChar's tqunicode value + // Fallback: convert leaderChar's unicode value TQString leaderChar = tabStop.attributeNS( KoXmlNS::style, "leader-text", TQString() ); if ( !leaderChar.isEmpty() ) { @@ -594,27 +594,27 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } //for } qHeapSort( tabList ); - tqlayout.setTabList( tabList ); + layout.setTabList( tabList ); - tqlayout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" ); + layout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" ); // Borders if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","left") ) - tqlayout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") ); + layout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") ); else - tqlayout.leftBorder.setPenWidth(0); + layout.leftBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","right") ) - tqlayout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") ); + layout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") ); else - tqlayout.rightBorder.setPenWidth(0); + layout.rightBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","top") ) - tqlayout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") ); + layout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") ); else - tqlayout.topBorder.setPenWidth(0); + layout.topBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","bottom") ) - tqlayout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") ); + layout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") ); else - tqlayout.bottomBorder.setPenWidth(0); + layout.bottomBorder.setPenWidth(0); // Page breaking @@ -647,25 +647,25 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex pageBreaking |= KoParagLayout::KeepWithNext; } } - tqlayout.pageBreaking = pageBreaking; + layout.pageBreaking = pageBreaking; // Paragraph background color - fo:background-color // The background color for parts of a paragraph that have no text underneath if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "background-color" ) ) { TQString bgColor = context.styleStack().attributeNS( KoXmlNS::fo, "background-color"); if (bgColor != "transparent") - tqlayout.backgroundColor.setNamedColor( bgColor ); + layout.backgroundColor.setNamedColor( bgColor ); } } void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const { - const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) + const KoParagLayout& layout = *this; // code moved from somewhere else;) TQDomDocument doc = parentElem.ownerDocument(); TQDomElement element = doc.createElement( "NAME" ); parentElem.appendChild( element ); - if ( tqlayout.style ) - element.setAttribute( "value", tqlayout.style->displayName() ); + if ( layout.style ) + element.setAttribute( "value", layout.style->displayName() ); //else // kdWarning() << "KoParagLayout::saveParagLayout: style==0!" << endl; @@ -677,118 +677,118 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) alignment==TQt::AlignJustify ? "justify" : alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. - if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR ) + if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirR ) element.setAttribute( "dir", "R" ); else - if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirL ) + if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirL ) element.setAttribute( "dir", "L" ); - if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 || - tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 || - tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 ) + if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 || + layout.margins[TQStyleSheetItem::MarginLeft] != 0 || + layout.margins[TQStyleSheetItem::MarginRight] != 0 ) { element = doc.createElement( "INDENTS" ); parentElem.appendChild( element ); - if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ) - element.setAttribute( "first", tqlayout.margins[TQStyleSheetItem::MarginFirstLine] ); - if ( tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 ) - element.setAttribute( "left", tqlayout.margins[TQStyleSheetItem::MarginLeft] ); - if ( tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 ) - element.setAttribute( "right", tqlayout.margins[TQStyleSheetItem::MarginRight] ); + if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ) + element.setAttribute( "first", layout.margins[TQStyleSheetItem::MarginFirstLine] ); + if ( layout.margins[TQStyleSheetItem::MarginLeft] != 0 ) + element.setAttribute( "left", layout.margins[TQStyleSheetItem::MarginLeft] ); + if ( layout.margins[TQStyleSheetItem::MarginRight] != 0 ) + element.setAttribute( "right", layout.margins[TQStyleSheetItem::MarginRight] ); } - if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 || - tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) + if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 || + layout.margins[TQStyleSheetItem::MarginBottom] != 0 ) { element = doc.createElement( "OFFSETS" ); parentElem.appendChild( element ); - if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 ) - element.setAttribute( "before", tqlayout.margins[TQStyleSheetItem::MarginTop] ); - if ( tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) - element.setAttribute( "after", tqlayout.margins[TQStyleSheetItem::MarginBottom] ); + if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 ) + element.setAttribute( "before", layout.margins[TQStyleSheetItem::MarginTop] ); + if ( layout.margins[TQStyleSheetItem::MarginBottom] != 0 ) + element.setAttribute( "after", layout.margins[TQStyleSheetItem::MarginBottom] ); } - if ( tqlayout.lineSpacingType != LS_SINGLE ) + if ( layout.lineSpacingType != LS_SINGLE ) { element = doc.createElement( "LINESPACING" ); parentElem.appendChild( element ); - if ( tqlayout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) { + if ( layout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) { element.setAttribute( "type", "oneandhalf" ); element.setAttribute( "value", "oneandhalf" ); //compatibility with koffice 1.2 } - else if ( tqlayout.lineSpacingType == KoParagLayout::LS_DOUBLE ) { + else if ( layout.lineSpacingType == KoParagLayout::LS_DOUBLE ) { element.setAttribute( "type", "double" ); element.setAttribute( "value", "double" ); //compatibility with koffice 1.2 } - else if ( tqlayout.lineSpacingType == KoParagLayout::LS_CUSTOM ) + else if ( layout.lineSpacingType == KoParagLayout::LS_CUSTOM ) { element.setAttribute( "type", "custom" ); - element.setAttribute( "spacingvalue", tqlayout.lineSpacing); - element.setAttribute( "value", tqlayout.lineSpacing ); //compatibility with koffice 1.2 + element.setAttribute( "spacingvalue", layout.lineSpacing); + element.setAttribute( "value", layout.lineSpacing ); //compatibility with koffice 1.2 } - else if ( tqlayout.lineSpacingType == KoParagLayout::LS_AT_LEAST ) + else if ( layout.lineSpacingType == KoParagLayout::LS_AT_LEAST ) { element.setAttribute( "type", "atleast" ); - element.setAttribute( "spacingvalue", tqlayout.lineSpacing); + element.setAttribute( "spacingvalue", layout.lineSpacing); } - else if ( tqlayout.lineSpacingType == KoParagLayout::LS_MULTIPLE ) + else if ( layout.lineSpacingType == KoParagLayout::LS_MULTIPLE ) { element.setAttribute( "type", "multiple" ); - element.setAttribute( "spacingvalue", tqlayout.lineSpacing); + element.setAttribute( "spacingvalue", layout.lineSpacing); } - else if ( tqlayout.lineSpacingType == KoParagLayout::LS_FIXED ) + else if ( layout.lineSpacingType == KoParagLayout::LS_FIXED ) { element.setAttribute( "type", "fixed" ); - element.setAttribute( "spacingvalue", tqlayout.lineSpacing); + element.setAttribute( "spacingvalue", layout.lineSpacing); } else kdDebug()<<" error in lineSpacing Type\n"; } - if ( tqlayout.pageBreaking != 0 ) + if ( layout.pageBreaking != 0 ) { element = doc.createElement( "PAGEBREAKING" ); parentElem.appendChild( element ); - if ( tqlayout.pageBreaking & KoParagLayout::KeepLinesTogether ) + if ( layout.pageBreaking & KoParagLayout::KeepLinesTogether ) element.setAttribute( "linesTogether", "true" ); - if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakBefore ) + if ( layout.pageBreaking & KoParagLayout::HardFrameBreakBefore ) element.setAttribute( "hardFrameBreak", "true" ); - if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakAfter ) + if ( layout.pageBreaking & KoParagLayout::HardFrameBreakAfter ) element.setAttribute( "hardFrameBreakAfter", "true" ); } - if ( tqlayout.leftBorder.penWidth() > 0 ) + if ( layout.leftBorder.penWidth() > 0 ) { element = doc.createElement( "LEFTBORDER" ); parentElem.appendChild( element ); - tqlayout.leftBorder.save( element ); + layout.leftBorder.save( element ); } - if ( tqlayout.rightBorder.penWidth() > 0 ) + if ( layout.rightBorder.penWidth() > 0 ) { element = doc.createElement( "RIGHTBORDER" ); parentElem.appendChild( element ); - tqlayout.rightBorder.save( element ); + layout.rightBorder.save( element ); } - if ( tqlayout.topBorder.penWidth() > 0 ) + if ( layout.topBorder.penWidth() > 0 ) { element = doc.createElement( "TOPBORDER" ); parentElem.appendChild( element ); - tqlayout.topBorder.save( element ); + layout.topBorder.save( element ); } - if ( tqlayout.bottomBorder.penWidth() > 0 ) + if ( layout.bottomBorder.penWidth() > 0 ) { element = doc.createElement( "BOTTOMBORDER" ); parentElem.appendChild( element ); - tqlayout.bottomBorder.save( element ); + layout.bottomBorder.save( element ); } - if ( tqlayout.counter && tqlayout.counter->numbering() != KoParagCounter::NUM_NONE ) + if ( layout.counter && layout.counter->numbering() != KoParagCounter::NUM_NONE ) { element = doc.createElement( "COUNTER" ); parentElem.appendChild( element ); - if ( tqlayout.counter ) - tqlayout.counter->save( element ); + if ( layout.counter ) + layout.counter->save( element ); } - KoTabulatorList tabList = tqlayout.tabList(); + KoTabulatorList tabList = layout.tabList(); KoTabulatorList::ConstIterator it = tabList.begin(); for ( ; it != tabList.end() ; it++ ) { diff --git a/lib/kotext/KoParagLayout.h b/lib/kotext/KoParagLayout.h index c0582b19..975fdaf0 100644 --- a/lib/kotext/KoParagLayout.h +++ b/lib/kotext/KoParagLayout.h @@ -40,7 +40,7 @@ class KOTEXT_EXPORT KoParagLayout { public: KoParagLayout(); - KoParagLayout( const KoParagLayout &tqlayout ) { operator=( tqlayout ); } + KoParagLayout( const KoParagLayout &layout ) { operator=( layout ); } ~KoParagLayout(); @@ -122,29 +122,29 @@ public: const KoTabulatorList& tabList() const { return m_tabList; } //! Assignment operator for KoParagLayout - /** Copy a paragraph tqlayout. + /** Copy a paragraph layout. * * If you're modifying this, you might also need to modify * KoTextParag::setParagLayout */ void operator=( const KoParagLayout & ); - /** Return a set of flags showing the differences between this and 'tqlayout' */ - int compare( const KoParagLayout & tqlayout ) const; + /** Return a set of flags showing the differences between this and 'layout' */ + int compare( const KoParagLayout & layout ) const; - /** Save this parag tqlayout to XML. + /** Save this parag layout to XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ void saveParagLayout( TQDomElement & parentElem, int alignment ) const; - /** Load this parag tqlayout from XML. + /** Load this parag layout from XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ - static void loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion = 2 ); + static void loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion = 2 ); - /// Load this parag tqlayout from Oasis XML - static void loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context ); - /// Save this parag tqlayout to Oasis XML + /// Load this parag layout from Oasis XML + static void loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context ); + /// Save this parag layout to Oasis XML /// @param savingStyle true if this is saved as part of a user style, /// false when saving a paragraph /// @param gs the style where all the properties will be saved to diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp index b09fe90e..fcae882c 100644 --- a/lib/kotext/KoParagStyle.cpp +++ b/lib/kotext/KoParagStyle.cpp @@ -103,12 +103,12 @@ void KoParagStyle::saveStyle( TQDomElement & parentElem ) void KoParagStyle::loadStyle( TQDomElement & parentElem, int docVersion ) { - KoParagLayout tqlayout; - KoParagLayout::loadParagLayout( tqlayout, parentElem, docVersion ); + KoParagLayout layout; + KoParagLayout::loadParagLayout( layout, parentElem, docVersion ); // This way, KoTextParag::setParagLayout also sets the style pointer, to this style - tqlayout.style = this; - m_paragLayout = tqlayout; + layout.style = this; + m_paragLayout = layout; // Load name TQDomElement nameElem = parentElem.namedItem("NAME").toElement(); @@ -138,8 +138,8 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context context.styleStack().save(); context.addStyles( &styleElem, "paragraph" ); // Load all parents - only because we don't support inheritance. - KoParagLayout tqlayout; - KoParagLayout::loadOasisParagLayout( tqlayout, context ); + KoParagLayout layout; + KoParagLayout::loadOasisParagLayout( layout, context ); // loadOasisParagLayout doesn't load the counter. It's modelled differently for parags and for styles. int level = 0; @@ -172,15 +172,15 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context const TQDomElement listStyle = context.listStyleStack().currentListStyle(); // The tag is either text:list-level-style-number or text:list-level-style-bullet const bool ordered = listStyle.localName() == "list-level-style-number"; - Q_ASSERT( !tqlayout.counter ); - tqlayout.counter = new KoParagCounter; - tqlayout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true ); + Q_ASSERT( !layout.counter ); + layout.counter = new KoParagCounter; + layout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true ); context.listStyleStack().pop(); } // This way, KoTextParag::setParagLayout also sets the style pointer, to this style - tqlayout.style = this; - m_paragLayout = tqlayout; + layout.style = this; + m_paragLayout = layout; m_format.load( context ); @@ -269,9 +269,9 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ ) #if 0 if ( paragLayoutFlag == KoParagLayout::All ) { - setDirection( static_cast<TQChar::Direction>(tqlayout.direction) ); + setDirection( static_cast<TQChar::Direction>(layout.direction) ); // Don't call applyStyle from here, it would overwrite any paragraph-specific settings - setStyle( tqlayout.style ); + setStyle( layout.style ); } #endif // TODO a flag for the "is outline" bool? Otherwise we have no way to inherit diff --git a/lib/kotext/KoParagStyle.h b/lib/kotext/KoParagStyle.h index 190ad345..0e396b64 100644 --- a/lib/kotext/KoParagStyle.h +++ b/lib/kotext/KoParagStyle.h @@ -49,7 +49,7 @@ protected: /** * A paragraph style is a combination of a character style - * and paragraph-tqlayout attributes, all grouped under a name. + * and paragraph-layout attributes, all grouped under a name. */ class KOTEXT_EXPORT KoParagStyle : public KoCharStyle { @@ -71,10 +71,10 @@ public: KoParagStyle *followingStyle() const { return m_followingStyle; } void setFollowingStyle( KoParagStyle *fst ); - /// Saves the name, tqlayout, the following style and the outline bool. Not the format. + /// Saves the name, layout, the following style and the outline bool. Not the format. /// @deprecated (1.3 format) void saveStyle( TQDomElement & parentElem ); - /// Loads the name, tqlayout and the outline bool. Not the "following style" nor the format. + /// Loads the name, layout and the outline bool. Not the "following style" nor the format. /// (1.3 format) void loadStyle( TQDomElement & parentElem, int docVersion = 2 ); diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index addbd574..d9d6c1df 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -1332,7 +1332,7 @@ TQString KoTextString::toString( const TQMemArray<KoTextStringChar> &data ) int l = data.size(); s.setUnicode( 0, l ); KoTextStringChar *c = data.data(); - TQChar *uc = (TQChar *)s.tqunicode(); + TQChar *uc = (TQChar *)s.unicode(); while ( l-- ) { *uc = c->c; uc++; @@ -1348,7 +1348,7 @@ TQString KoTextString::toReverseString() const int l = length(); s.setUnicode(0, l); KoTextStringChar *c = data.data() + (l-1); - TQChar *uc = (TQChar *)s.tqunicode(); + TQChar *uc = (TQChar *)s.unicode(); while ( l-- ) { *uc = c->c; uc++; @@ -1505,7 +1505,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para str.setUnicode( 0, last - start + 1 ); // fill string with logically ordered chars. KoTextStringChar *ch = startChar; - TQChar *qch = (TQChar *)str.tqunicode(); + TQChar *qch = (TQChar *)str.unicode(); while ( ch <= lastChar ) { *qch = ch->c; qch++; @@ -1562,7 +1562,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para c->rightToLeft = TRUE; c->startOfRun = FALSE; int ww = 0; - if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { + if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { ww = c->width; } else { ww = c->format()->width( ' ' ); @@ -1589,7 +1589,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para c->rightToLeft = FALSE; c->startOfRun = FALSE; int ww = 0; - if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->isCustom() ) { + if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) { ww = c->width; } else { ww = c->format()->width( ' ' ); diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index f3cf9746..35bb8bd7 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -93,7 +93,7 @@ public: // this is the same struct as in qtextengine_p.h. Don't change! uchar softBreak :1; // Potential linebreak point - uchar whiteSpace :1; // A tqunicode whitespace character, except NBSP, ZWNBSP + uchar whiteSpace :1; // A unicode whitespace character, except NBSP, ZWNBSP uchar charStop :1; // Valid cursor position (for left/right arrow) uchar wordStop :1; // Valid cursor position (for ctrl + left/right arrow) (TODO: use) //uchar nobreak :1; @@ -564,12 +564,12 @@ public: TQString richText() const; - int minimumWidth() const { return tqlayout ? tqlayout->minimumSize().width() : 0; } - int widthHint() const { return ( tqlayout ? tqlayout->sizeHint().width() : 0 ) + 2 * outerborder; } + int minimumWidth() const { return layout ? layout->minimumSize().width() : 0; } + int widthHint() const { return ( layout ? layout->sizeHint().width() : 0 ) + 2 * outerborder; } TQPtrList<KoTextTableCell> tableCells() const { return cells; } - TQRect geometry() const { return tqlayout ? tqlayout->geometry() : TQRect(); } + TQRect geometry() const { return layout ? layout->geometry() : TQRect(); } bool isStretching() const { return stretch; } private: @@ -577,7 +577,7 @@ private: void addCell( KoTextTableCell* cell ); private: - TQGridLayout* tqlayout; + TQGridLayout* layout; TQPtrList<KoTextTableCell> cells; TQPainter* painter; int cachewidth; diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index 8aaab47b..b022eb72 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -605,25 +605,25 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC TQButtonGroup *grpBold = new TQButtonGroup( 1, Qt::Vertical, page ); grpBold->setRadioButtonExclusive( TRUE ); - grpBold->tqlayout(); + grpBold->layout(); m_boldYes=new TQRadioButton( i18n("Yes"), grpBold ); m_boldNo=new TQRadioButton( i18n("No"), grpBold ); TQButtonGroup *grpItalic = new TQButtonGroup( 1, Qt::Vertical, page ); grpItalic->setRadioButtonExclusive( TRUE ); - grpItalic->tqlayout(); + grpItalic->layout(); m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic ); m_italicNo=new TQRadioButton( i18n("No"), grpItalic ); TQButtonGroup *grpShadow = new TQButtonGroup( 1, Qt::Vertical, page ); grpShadow->setRadioButtonExclusive( TRUE ); - grpShadow->tqlayout(); + grpShadow->layout(); m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow ); m_shadowNo=new TQRadioButton( i18n("No"), grpShadow ); TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, Qt::Vertical, page ); grpWordByWord->setRadioButtonExclusive( TRUE ); - grpWordByWord->tqlayout(); + grpWordByWord->layout(); m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord ); m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord ); diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index 2c759282..5a99c38b 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -86,7 +86,7 @@ KoStyleManager::KoStyleManager( TQWidget *_parent, KoUnit::Unit unit, newTab = new KoStyleParagTab( m_tabs ); KoParagLayoutWidget *decorations = new KoParagDecorationWidget( newTab ); - decorations->tqlayout()->setMargin(KDialog::marginHint()); + decorations->layout()->setMargin(KDialog::marginHint()); newTab->setWidget( decorations ); addTab( newTab ); @@ -122,7 +122,7 @@ void KoStyleManager::addTab( KoStyleManagerTab * tab ) { m_tabsList.append( tab ); m_tabs->insertTab( tab, tab->tabName() ); - tab->tqlayout()->activate(); + tab->layout()->activate(); } void KoStyleManager::setupWidget(const KoStyleCollection& styleCollection) diff --git a/lib/kotext/KoStyleManager.h b/lib/kotext/KoStyleManager.h index 84c75349..b562e1f6 100644 --- a/lib/kotext/KoStyleManager.h +++ b/lib/kotext/KoStyleManager.h @@ -137,7 +137,7 @@ protected: KoParagStyle *m_style; }; -// A tab to edit parts of the parag-tqlayout of the style +// A tab to edit parts of the parag-layout of the style // Acts as a wrapper around KoParagLayoutWidget [which doesn't know about styles]. class KOTEXT_EXPORT KoStyleParagTab : public KoStyleManagerTab { diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp index 1b0f1076..875c1e71 100644 --- a/lib/kotext/KoTextCommand.cpp +++ b/lib/kotext/KoTextCommand.cpp @@ -96,7 +96,7 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c ) while ( p ) { if ( lit != m_oldParagLayouts.end() ) { - kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paragtqlayout to parag " << p->paragId() << endl; + kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paraglayout to parag " << p->paragId() << endl; p->setParagLayout( *lit ); } else diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index fe20b049..35adf814 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -729,7 +729,7 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags ) if ( !hasSelection( id ) ) return; - TQApplication::tqclipboard()->setText( selectedText( id ) ); + TQApplication::clipboard()->setText( selectedText( id ) ); #endif }*/ @@ -1217,7 +1217,7 @@ void KoTextDocument::drawWithoutDoubleBuffer( TQPainter *p, const TQRect &cr, co TQRect pr( parag->pixelRect( zoomHandler ) ); pr.setLeft( 0 ); pr.setWidth( TQWIDGETSIZE_MAX ); - // The cliprect is checked in tqlayout units, in KoTextParag::paint + // The cliprect is checked in layout units, in KoTextParag::paint TQRect crect_lu( parag->rect() ); if ( !cr.isNull() && !cr.intersects( pr ) ) { @@ -1350,7 +1350,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, #endif //painter->setBrushOrigin( painter->brushOrigin() + rect.topLeft() - ir.topLeft() ); - // The cliprect is checked in tqlayout units, in KoTextParag::paint + // The cliprect is checked in layout units, in KoTextParag::paint TQRect crect_lu( zoomHandler->pixelToLayoutUnit( crect ) ); #ifdef DEBUG_PAINTING kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG crect_lu=" << crect_lu << endl; diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 9b8e8869..2554d4ee 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -1179,8 +1179,8 @@ TQFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const KoTextStringChar* c, const KoTextParag* parag, int i ) const { - ushort tqunicode = c->c.tqunicode(); - if ( !c->charStop || tqunicode == 0xad || tqunicode == 0x2028 ) + ushort unicode = c->c.unicode(); + if ( !c->charStop || unicode == 0xad || unicode == 0x2028 ) return 0; Q_ASSERT( !c->isCustom() ); // actually it's a bit stupid to call this for custom items if( c->isCustom() ) { @@ -1209,13 +1209,13 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); } else { // Use the m_screenWidths[] array when possible, even faster - Q_ASSERT( tqunicode < 256 ); - pixelww = d->m_screenWidths[ tqunicode ]; + Q_ASSERT( unicode < 256 ); + pixelww = d->m_screenWidths[ unicode ]; // Not in cache yet -> calculate if ( pixelww == 0 ) { pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); Q_ASSERT( pixelww < 65535 ); - d->m_screenWidths[ tqunicode ] = pixelww; + d->m_screenWidths[ unicode ] = pixelww; } } } @@ -1319,7 +1319,7 @@ TQString KoTextFormat::displayedString( const TQString& str )const TQChar KoTextFormat::displayedChar( TQChar c )const { - if ( c.tqunicode() == 0xa0 ) // nbsp + if ( c.unicode() == 0xa0 ) // nbsp return ' '; switch ( m_attributeFont ) { case ATT_NONE: diff --git a/lib/kotext/KoTextFormat.h b/lib/kotext/KoTextFormat.h index 0e7c1a13..4c155b91 100644 --- a/lib/kotext/KoTextFormat.h +++ b/lib/kotext/KoTextFormat.h @@ -75,7 +75,7 @@ public: // caching for speedup when formatting TQFont* m_screenFont; // font to be used when painting (zoom-dependent) TQFontMetrics* m_screenFontMetrics; // font metrics on screen (zoom-dependent) - TQFont* m_refFont; // font to be used when formatting text for tqlayout units + TQFont* m_refFont; // font to be used when formatting text for layout units TQFontMetrics* m_refFontMetrics; // font metrics for m_refFontMetrics int m_refAscent; int m_refDescent; @@ -308,7 +308,7 @@ public: /** * @return the reference font, i.e. with the size specified by the user. - * This is used at text tqlayout time (e.g. kotextformatter) + * This is used at text layout time (e.g. kotextformatter) */ TQFont refFont() const; diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp index d978ba43..552bcf27 100644 --- a/lib/kotext/KoTextFormatter.cpp +++ b/lib/kotext/KoTextFormatter.cpp @@ -196,7 +196,7 @@ bool KoTextFormatterCore::format() // but with counters/margins this might be different). This is why // we call determineCharWidth() again from within the loop. TQPair<int, int> widths = determineCharWidth(); - int ww = widths.first; // width in tqlayout units + int ww = widths.first; // width in layout units #ifndef REF_IS_LU int pixelww = widths.second; // width in pixels #endif @@ -516,11 +516,11 @@ bool KoTextFormatterCore::format() spaceAfterLine -= c->width; //else - if ( c->c.tqunicode() == 0xad || hyphenated ) // soft hyphen or hyphenation + if ( c->c.unicode() == 0xad || hyphenated ) // soft hyphen or hyphenation { // Recalculate its width, the hyphen will appear finally (important for the parag rect) int width = KoTextZoomHandler::ptToLayoutUnitPt( c->format()->refFontMetrics().width( TQChar(0xad) ) ); - if ( c->c.tqunicode() == 0xad ) + if ( c->c.unicode() == 0xad ) c->width = width; spaceAfterLine -= width; } @@ -934,7 +934,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( str.setUnicode( 0, last - start + 1 ); // fill string with logically ordered chars. KoTextStringChar *ch = startChar; - TQChar *qch = (TQChar *)str.tqunicode(); + TQChar *qch = (TQChar *)str.unicode(); while ( ch <= lastChar ) { *qch = ch->c; qch++; diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index 06394275..afd18909 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -564,7 +564,7 @@ void KoTextObject::doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & /*c undoRedoInfo.oldParagLayouts << parag->paragLayout(); } if ( cursor->atParagEnd() ) { - // Get paragtqlayout from next parag (next can't be 0 here) + // Get paraglayout from next parag (next can't be 0 here) KoParagLayout paragLayout = parag->next()->paragLayout(); if ( cursor->remove() ) { diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h index 90693bed..7970a323 100644 --- a/lib/kotext/KoTextObject.h +++ b/lib/kotext/KoTextObject.h @@ -64,11 +64,11 @@ public: */ virtual KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ) = 0; - /** Interface for accessing the current parag tqlayout */ + /** Interface for accessing the current parag layout */ virtual const KoParagLayout * currentParagLayoutFormat() const = 0; - /** Interface for changing the paragraph tqlayout. - * @param newLayout pointer to the new tqlayout to apply + /** Interface for changing the paragraph layout. + * @param newLayout pointer to the new layout to apply * @param flags one of the KoParagLayout flags * @param marginIndex type of margin. Only used if flags==KoParagLayout::Margins */ @@ -345,7 +345,7 @@ public: * @param cursor the current cursor; used if there is no selection. Can be 0L if there is one. * @param style the KoParagStyle to apply * @param selectionId the id of the selection, usually Standard or Temp - * @param paragLayoutFlags which settings from the paragraph tqlayout to apply + * @param paragLayoutFlags which settings from the paragraph layout to apply * @param formatFlags which settings from the text format to apply * @param createUndoRedo if true, an undo/redo command will be created and emitted * @param interactive if true, the text will be reformatted/repainted to show the new style @@ -429,7 +429,7 @@ public: /** * Abort the current formatMore() loop, or prevent the next one from starting. * Use with care. This is e.g. for KWFootNoteVariable, so that it can do - * a frame tqlayout before formatting the main text again. + * a frame layout before formatting the main text again. * It is important to make sure that formatMore will be called again ;) */ void abortFormatting(); diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index aba58abc..cc1aecb9 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -1296,7 +1296,7 @@ int KoTextParag::rightMargin() const return zh->ptToLayoutUnitPixX( m_layout.margins[ TQStyleSheetItem::MarginRight ] + m_layout.rightBorder.width() ) - + cw; /* in tqlayout units already */ + + cw; /* in layout units already */ } int KoTextParag::firstLineMargin() const @@ -1597,7 +1597,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText // we flush before and after tabs flush = flush || ( chr->c == '\t' || nextchr->c == '\t' ); // we flush on soft hypens - flush = flush || ( chr->c.tqunicode() == 0xad ); + flush = flush || ( chr->c.unicode() == 0xad ); // we flush on custom items flush = flush || chr->isCustom(); // we flush before custom items @@ -1847,7 +1847,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s // 3) Paint TQString str( s ); - if ( str[ (int)str.length() - 1 ].tqunicode() == 0xad ) + if ( str[ (int)str.length() - 1 ].unicode() == 0xad ) str.remove( str.length() - 1, 1 ); painter.setPen( TQPen( textColor ) ); painter.setFont( font ); @@ -1877,7 +1877,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s } KoTextParag::drawFontEffects( &painter, format, zh, font, textColor, startX, baseLine, bw, lastY, h, str[start] ); - if ( str[ start ] != '\t' && str[ start ].tqunicode() != 0xad ) { + if ( str[ start ] != '\t' && str[ start ].unicode() != 0xad ) { str = format->displayedString( str ); // #### This converts the whole string, instead of from start to start+len! if ( format->vAlign() == KoTextFormat::AlignNormal ) { int posY = lastY + baseLine; @@ -1965,7 +1965,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s #ifdef DEBUG_PAINT //kdDebug(32500) << "we are drawing the end of line " << line << ". Auto-hyphenated: " << lineHyphenated( line ) << endl; #endif - bool drawHyphen = at( start+len-1 )->c.tqunicode() == 0xad; + bool drawHyphen = at( start+len-1 )->c.unicode() == 0xad; drawHyphen = drawHyphen || lineHyphenated( line ); if ( drawHyphen ) { #ifdef DEBUG_PAINT @@ -2059,7 +2059,7 @@ void KoTextParag::copyParagData( KoTextParag *parag ) //else // kdWarning() << "Paragraph has no style " << paragId() << endl; - // No "following style" setting, or same style -> copy tqlayout & format of previous paragraph + // No "following style" setting, or same style -> copy layout & format of previous paragraph if (!styleApplied) { setParagLayout( parag->paragLayout() ); @@ -2082,7 +2082,7 @@ void KoTextParag::copyParagData( KoTextParag *parag ) // Note: we don't call the original KoTextParag::copyParagData on purpose. // We don't want setListStyle to get called - it ruins our stylesheetitems // And we don't care about copying the stylesheetitems directly, - // applying the parag tqlayout will create them + // applying the parag layout will create them } void KoTextParag::setTabList( const KoTabulatorList &tabList ) @@ -2240,43 +2240,43 @@ void KoTextParag::applyStyle( KoParagStyle *style ) setFormat( newFormat ); } -void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex ) +void KoTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex ) { //kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl; if ( flags & KoParagLayout::Alignment ) - setAlign( tqlayout.alignment ); + setAlign( layout.alignment ); if ( flags & KoParagLayout::Margins ) { if ( marginIndex == -1 ) - setMargins( tqlayout.margins ); + setMargins( layout.margins ); else - setMargin( (TQStyleSheetItem::Margin)marginIndex, tqlayout.margins[marginIndex] ); + setMargin( (TQStyleSheetItem::Margin)marginIndex, layout.margins[marginIndex] ); } if ( flags & KoParagLayout::LineSpacing ) { - setLineSpacingType( tqlayout.lineSpacingType ); - setLineSpacing( tqlayout.lineSpacingValue() ); + setLineSpacingType( layout.lineSpacingType ); + setLineSpacing( layout.lineSpacingValue() ); } if ( flags & KoParagLayout::Borders ) { - setLeftBorder( tqlayout.leftBorder ); - setRightBorder( tqlayout.rightBorder ); - setTopBorder( tqlayout.topBorder ); - setBottomBorder( tqlayout.bottomBorder ); - setJoinBorder( tqlayout.joinBorder ); + setLeftBorder( layout.leftBorder ); + setRightBorder( layout.rightBorder ); + setTopBorder( layout.topBorder ); + setBottomBorder( layout.bottomBorder ); + setJoinBorder( layout.joinBorder ); } if ( flags & KoParagLayout::BackgroundColor ) { - setBackgroundColor( tqlayout.backgroundColor ); + setBackgroundColor( layout.backgroundColor ); } if ( flags & KoParagLayout::BulletNumber ) - setCounter( tqlayout.counter ); + setCounter( layout.counter ); if ( flags & KoParagLayout::Tabulator ) - setTabList( tqlayout.tabList() ); + setTabList( layout.tabList() ); if ( flags == KoParagLayout::All ) { - setDirection( static_cast<TQChar::Direction>(tqlayout.direction) ); + setDirection( static_cast<TQChar::Direction>(layout.direction) ); // Don't call applyStyle from here, it would overwrite any paragraph-specific settings - setStyle( tqlayout.style ); + setStyle( layout.style ); } } @@ -2421,7 +2421,7 @@ void KoTextParag::printRTDebug( int info ) attrs.truncate( attrs.length() - 1 ); kdDebug(32500) << i << ": '" << TQString(ch.c).rightJustify(2) - << "' (" << TQString::number( ch.c.tqunicode() ).rightJustify(3) << ")" + << "' (" << TQString::number( ch.c.unicode() ).rightJustify(3) << ")" << " x(LU)=" << ch.x << " w(LU)=" << ch.width//s->width(i) << " x(PIX)=" << pixelx @@ -2849,7 +2849,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleCollection *styleCollection, bool findStyle ) { - KoParagLayout tqlayout; + KoParagLayout layout; // Only when loading paragraphs, not when loading styles if ( findStyle ) @@ -2877,17 +2877,17 @@ KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleColl style = styleCollection->findStyle( "Standard" ); } Q_ASSERT(style); - tqlayout.style = style; + layout.style = style; } - KoParagLayout::loadOasisParagLayout( tqlayout, context ); + KoParagLayout::loadOasisParagLayout( layout, context ); - return tqlayout; + return layout; } void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos ) { - // First load tqlayout from style + // First load layout from style KoParagLayout paragLayout = loadParagLayout( context, styleCollection, true ); setParagLayout( paragLayout ); @@ -2915,7 +2915,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, { KoGenStyles& mainStyles = context.mainStyles(); - // Write paragtqlayout to styles (with parent == the parag's style) + // Write paraglayout to styles (with parent == the parag's style) TQString parentStyleName; if ( m_layout.style ) parentStyleName = m_layout.style->name(); @@ -2924,11 +2924,11 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, paragFormat()->save( autoStyle, context ); m_layout.saveOasis( autoStyle, context, false ); - // First paragraph is special, it includes page-tqlayout info (for word-processing at least) + // First paragraph is special, it includes page-layout info (for word-processing at least) if ( !prev() ) { if ( context.variableSettings() ) autoStyle.addProperty( "style:page-number", context.variableSettings()->startingPageNumber() ); - // Well we support only one page tqlayout, so the first parag always points to "Standard". + // Well we support only one page layout, so the first parag always points to "Standard". autoStyle.addAttribute( "style:master-page-name", "Standard" ); } @@ -3212,7 +3212,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len, #endif if ( ch.isCustom() ) continue; - if ( (ch.c == ' ' || ch.c.tqunicode() == 0x00a0U) + if ( (ch.c == ' ' || ch.c.unicode() == 0x00a0U) && (whichFormattingChars & FormattingSpace)) { // Don't use ch.pixelwidth here. We want a square with diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h index f42c3285..d8e0c29b 100644 --- a/lib/kotext/KoTextParag.h +++ b/lib/kotext/KoTextParag.h @@ -214,7 +214,7 @@ public: /** Sets all or some parameters from a paragLayout struct. * @param flags selects which settings to apply, see KoParagLayout's enum. */ - virtual void setParagLayout( const KoParagLayout &tqlayout, int flags = KoParagLayout::All, + virtual void setParagLayout( const KoParagLayout &layout, int flags = KoParagLayout::All, int marginIndex = -1 ); const KoParagLayout & paragLayout() { return m_layout; } diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index 6211e1d8..9733e123 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -291,7 +291,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ break; } default: { - //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].tqunicode() << " state=" << e->state() << endl; + //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].unicode() << " state=" << e->state() << endl; if (e->key() == TQt::Key_Tab) { if (doToolTipCompletion(m_cursor, m_cursor->parag(), m_cursor->index() - 1, e->key()) ) @@ -331,7 +331,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ // Bidi support: need to reverse mirrored chars (e.g. parenthesis) KoTextParag *p = m_cursor->parag(); if ( p && p->string() && p->string()->isRightToLeft() ) { - TQChar *c = (TQChar *)text.tqunicode(); + TQChar *c = (TQChar *)text.unicode(); int l = text.length(); while( l-- ) { if ( c->mirrored() ) @@ -643,9 +643,9 @@ KoTextCursor KoTextView::selectParagUnderCursor( const KoTextCursor& cursor, int { textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } return c2; } @@ -808,9 +808,9 @@ void KoTextView::handleMouseReleaseEvent() textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } inDoubleClick = FALSE; @@ -831,9 +831,9 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i *m_cursor = selectWordUnderCursor( *m_cursor ); textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); possibleTripleClick=true; @@ -1450,10 +1450,10 @@ void KoTextView::copyTextOfComment() { KURL::List lst; lst.append( var->note() ); - TQApplication::tqclipboard()->setSelectionMode(true); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::tqclipboard()->setSelectionMode(false); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(true); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(false); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); } } @@ -1476,13 +1476,13 @@ KoParagStyle * KoTextView::createStyleFromSelection(const TQString & name) if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) cursor = textDocument()->selectionStartCursor( KoTextDocument::Standard ); KoParagStyle * style = new KoParagStyle (name); - KoParagLayout tqlayout(cursor.parag()->paragLayout()); - tqlayout.style = style; + KoParagLayout layout(cursor.parag()->paragLayout()); + layout.style = style; style->setFollowingStyle( style ); style->format() = *(cursor.parag()->at(cursor.index())->format()); - style->paragLayout() = tqlayout; - // Select this new style - hmm only the parag tqlayout, we don't want to erase any text-formatting + style->paragLayout() = layout; + // Select this new style - hmm only the parag layout, we don't want to erase any text-formatting cursor.parag()->setParagLayout( style->paragLayout() ); return style; } @@ -1515,10 +1515,10 @@ void KoTextView::copyLink() { KURL::List lst; lst.append( var->url() ); - TQApplication::tqclipboard()->setSelectionMode(true); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::tqclipboard()->setSelectionMode(false); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(true); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(false); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); } } diff --git a/lib/kotext/KoTextZoomHandler.h b/lib/kotext/KoTextZoomHandler.h index f8c2ef12..d1bc6025 100644 --- a/lib/kotext/KoTextZoomHandler.h +++ b/lib/kotext/KoTextZoomHandler.h @@ -33,7 +33,7 @@ public: //// Support for WYSIWYG text layouting ///// - /** The "[zoomed] view pixel" -> "tqlayout unit pixel" conversions. */ + /** The "[zoomed] view pixel" -> "layout unit pixel" conversions. */ int pixelToLayoutUnitX( int x ) const; int pixelToLayoutUnitY( int y ) const; TQPoint pixelToLayoutUnit( const TQPoint &p ) const @@ -43,7 +43,7 @@ public: { return TQRect( pixelToLayoutUnit( r.topLeft() ), pixelToLayoutUnit( r.bottomRight() ) ); } - /** The "tqlayout unit pixel" -> "[zoomed] view pixel" conversions. */ + /** The "layout unit pixel" -> "[zoomed] view pixel" conversions. */ int layoutUnitToPixelX( int lupix ) const; int layoutUnitToPixelY( int lupix ) const; @@ -89,26 +89,26 @@ public: } /** - * Given the font size for the font in tqlayout units, in pt (use pointSize()) + * Given the font size for the font in layout units, in pt (use pointSize()) * this returns the font size to use on screen the current zoom, in pt (use setPointSizeFloat()), */ double layoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const; - // Note: For converting fontsizes from/to tqlayout units and zoom-independent + // Note: For converting fontsizes from/to layout units and zoom-independent // pt sizes (like the one the user sees, e.g. 12pt), // use ptToLayoutUnit and layoutUnitToPt, not layoutToFontSize. - // The conversions below convert between an internal text tqlayout resolution of + // The conversions below convert between an internal text layout resolution of // ~1440 DPI (by default) and the point-size for the fonts (those known by the user). // Those conversions don't depend on the zoom level. /** Change the factor that converts between pointsizes - * and tqlayout units (by default 20 - for 1440 DPI at 72 DPI) */ + * and layout units (by default 20 - for 1440 DPI at 72 DPI) */ static void setPtToLayoutUnitFactor( int factor ) { m_layoutUnitFactor = factor; } /** Not zoom dependent. Simply convert a pt value (e.g. a frame) - * to high-resolution tqlayout unit coordinates (in pt). */ + * to high-resolution layout unit coordinates (in pt). */ static double ptToLayoutUnitPt( double pt ) { return pt * static_cast<double>( m_layoutUnitFactor ); } /** Same thing for integer values, e.g. a font size in pt */ diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index 70eab87e..489752f0 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -123,7 +123,7 @@ void KoVariableSettings::saveOasis( KoXmlWriter &settingsWriter ) const settingsWriter.addConfigItem( "displayfieldcode", m_displayFieldCode); // m_startingPageNumber isn't saved to OASIS. Applications must use either // style:page-number in the first parag of a page (see KoTextParag), or - // style:first-page-number in style:page-tqlayout, for spreadsheets etc. + // style:first-page-number in style:page-layout, for spreadsheets etc. if ( d->m_lastPrintingDate.isValid()) settingsWriter.addConfigItem("lastPrintingDate", d->m_lastPrintingDate.toString(Qt::ISODate)); @@ -978,7 +978,7 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int //p->drawText( x, posY, str ); // We can't just drawText, it wouldn't use the same kerning as the one // that resize() planned for [which is zoom-independent]. - // We need to do the tqlayout using tqlayout units instead, so for simplicity + // We need to do the layout using layout units instead, so for simplicity // I just draw every char individually (whereas KoTextFormatter/KoTextParag // detect runs of text that can be drawn together) const int len = str.length(); @@ -988,9 +988,9 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int { const TQChar ch = str[i]; p->drawText( x, posY, TQString(ch) ); - // Do like KoTextFormatter: do the tqlayout in tqlayout units. + // Do like KoTextFormatter: do the layout in layout units. xLU += KoTextZoomHandler::ptToLayoutUnitPt( fm.width( ch ) ); - // And then compute the X position in pixels from the tqlayout unit X. + // And then compute the X position in pixels from the layout unit X. x = zh->layoutUnitToPixelX( xLU ); } diff --git a/lib/kotext/kolayouttabbase.ui b/lib/kotext/kolayouttabbase.ui index e7e03d58..646bc795 100644 --- a/lib/kotext/kolayouttabbase.ui +++ b/lib/kotext/kolayouttabbase.ui @@ -40,7 +40,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <vbox> <property name="name"> @@ -103,7 +103,7 @@ </spacer> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <grid> <property name="name"> diff --git a/lib/kotext/timedateformatwidget.ui b/lib/kotext/timedateformatwidget.ui index 77a261ea..ded1c906 100644 --- a/lib/kotext/timedateformatwidget.ui +++ b/lib/kotext/timedateformatwidget.ui @@ -38,7 +38,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <vbox> <property name="name"> @@ -59,7 +59,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <hbox> <property name="name"> @@ -113,7 +113,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kross/main/wdgscriptsmanagerbase.ui b/lib/kross/main/wdgscriptsmanagerbase.ui index d04223a4..1140e848 100644 --- a/lib/kross/main/wdgscriptsmanagerbase.ui +++ b/lib/kross/main/wdgscriptsmanagerbase.ui @@ -56,7 +56,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <hbox> <property name="name"> diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.hxx index 3aa790e6..41648320 100644 --- a/lib/kross/python/cxx/Objects.hxx +++ b/lib/kross/python/cxx/Objects.hxx @@ -1470,8 +1470,8 @@ namespace Py // Python strings return strings as individual elements. // I'll try having a class Char which is a String of length 1 // - typedef std::basic_string<Py_UNICODE> tqunicodestring; - extern Py_UNICODE tqunicode_null_string[1]; + typedef std::basic_string<Py_UNICODE> unicodestring; + extern Py_UNICODE unicode_null_string[1]; class Char: public Object { @@ -1535,7 +1535,7 @@ namespace Py return *this; } - Char& operator= (const tqunicodestring& v) + Char& operator= (const unicodestring& v) { set(PyUnicode_FromUnicode (const_cast<Py_UNICODE*>(v.data()),1), true); return *this; @@ -1650,7 +1650,7 @@ namespace Py static_cast<int>( v.length() ) ), true ); return *this; } - String& operator= (const tqunicodestring& v) + String& operator= (const unicodestring& v) { set( PyUnicode_FromUnicode( const_cast<Py_UNICODE*>( v.data() ), static_cast<int>( v.length() ) ), true ); @@ -1706,16 +1706,16 @@ namespace Py } } - tqunicodestring as_tqunicodestring() const + unicodestring as_unicodestring() const { if( isUnicode() ) { - return tqunicodestring( PyUnicode_AS_UNICODE( ptr() ), + return unicodestring( PyUnicode_AS_UNICODE( ptr() ), static_cast<size_type>( PyUnicode_GET_SIZE( ptr() ) ) ); } else { - throw TypeError("can only return tqunicodestring from Unicode object"); + throw TypeError("can only return unicodestring from Unicode object"); } } }; diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html index e162e601..46d065bb 100644 --- a/lib/kross/python/cxx/PyCXX.html +++ b/lib/kross/python/cxx/PyCXX.html @@ -62,7 +62,7 @@ integrates Python with C++ in these ways: </p> <p>Download PyCXX from <a href="http://sourceforge.net/projects/cxx/">http://sourceforge.net/projects/cxx/</a>.</p> -<p>The distribution tqlayout is:</p> +<p>The distribution layout is:</p> <table> <tr><th>Directory</th><th>Description</th></tr> <tr><td class=code>.</td><td>Makefile for Unix and Windows, Release documentation</td> @@ -1188,8 +1188,8 @@ sequence.</p> <td class=code>as_std_string() const</td> </tr> <tr> - <td class=code>tqunicodestring</td> - <td class=code>as_tqunicodestring() const</td> + <td class=code>unicodestring</td> + <td class=code>as_unicodestring() const</td> </tr> </table> diff --git a/lib/kross/python/cxx/cxxsupport.cxx b/lib/kross/python/cxx/cxxsupport.cxx index b7bcaa0a..61329b60 100644 --- a/lib/kross/python/cxx/cxxsupport.cxx +++ b/lib/kross/python/cxx/cxxsupport.cxx @@ -6,7 +6,7 @@ #include "Objects.hxx" namespace Py { -Py_UNICODE tqunicode_null_string[1] = { 0 }; +Py_UNICODE unicode_null_string[1] = { 0 }; Type Object::type () const { diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp index 9d8c3ece..dbbe9bf6 100644 --- a/lib/kross/python/pythonextension.cpp +++ b/lib/kross/python/pythonextension.cpp @@ -206,7 +206,7 @@ Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object) #ifdef Py_USING_UNICODE /* TODO if(type == &PyUnicode_Type) { - Py::tqunicodestring u = Py::String(object).as_tqunicodestring(); + Py::unicodestring u = Py::String(object).as_unicodestring(); std::string s; std::copy(u.begin(), u.end(), std::back_inserter(s)); return new Kross::Api::Variant(s.c_str()); diff --git a/lib/kross/python/scripts/RestrictedPython/Guards.py b/lib/kross/python/scripts/RestrictedPython/Guards.py index 295ba791..4fbdcad1 100644 --- a/lib/kross/python/scripts/RestrictedPython/Guards.py +++ b/lib/kross/python/scripts/RestrictedPython/Guards.py @@ -24,7 +24,7 @@ for name in ['False', 'None', 'True', 'abs', 'basestring', 'bool', 'callable', 'chr', 'cmp', 'complex', 'divmod', 'float', 'hash', 'hex', 'id', 'int', 'isinstance', 'issubclass', 'len', 'long', 'oct', 'ord', 'pow', 'range', 'repr', 'round', - 'str', 'tuple', 'unichr', 'tqunicode', 'xrange', 'zip']: + 'str', 'tuple', 'unichr', 'unicode', 'xrange', 'zip']: safe_builtins[name] = __builtins__[name] diff --git a/lib/kross/python/scripts/gui.py b/lib/kross/python/scripts/gui.py index 7461447a..9b8e0f8c 100755 --- a/lib/kross/python/scripts/gui.py +++ b/lib/kross/python/scripts/gui.py @@ -190,9 +190,9 @@ class QtDialog: def __init__(self, parent = None, name = None, modal = 0, fl = 0): qt.QDialog.__init__(self, parent, name, modal, fl) qt.QDialog.accept = self.accept - self.tqlayout = qt.QVBoxLayout(self) - self.tqlayout.setSpacing(6) - self.tqlayout.setMargin(11) + self.layout = qt.QVBoxLayout(self) + self.layout.setSpacing(6) + self.layout.setMargin(11) class Label(qt.QLabel): def __init__(self, dialog, parent, caption): @@ -323,7 +323,7 @@ class QtDialog: self.widget = qt.QVBox(self.dialog) self.widget.setSpacing(6) - self.dialog.tqlayout.addWidget(self.widget) + self.dialog.layout.addWidget(self.widget) self.Frame = Frame self.Label = Label diff --git a/lib/kross/test/testcase.py b/lib/kross/test/testcase.py index 9fa58bc2..f1540201 100644 --- a/lib/kross/test/testcase.py +++ b/lib/kross/test/testcase.py @@ -79,8 +79,8 @@ class TestPlugin(unittest.TestCase): self.assert_( self.pluginobject1.stringfunc(" Another \n\r Test! $%&\"") == " Another \n\r Test! $%&\"" ) #TODO - #self.assert_( self.pluginobject1.stringfunc( tqunicode(" Unicode test ") ) == " Unicode test " ) - #self.assert_( self.pluginobject1.stringfunc(tqunicode(" Another Test! ")) == tqunicode(" Another Test! ") ) + #self.assert_( self.pluginobject1.stringfunc( unicode(" Unicode test ") ) == " Unicode test " ) + #self.assert_( self.pluginobject1.stringfunc(unicode(" Another Test! ")) == unicode(" Another Test! ") ) self.assert_( self.pluginobject1.stringstringfunc("MyString1", "MyString2") == "MyString1" ) self.assert_( self.pluginobject1.uintdoublestringfunc(8529,285.246,"String") == 8529 ) diff --git a/lib/kross/test/testgui.py b/lib/kross/test/testgui.py index 6a629c66..22b6f04b 100644 --- a/lib/kross/test/testgui.py +++ b/lib/kross/test/testgui.py @@ -89,27 +89,27 @@ class QtTest: qt.QDialog.__init__(self, parent, name, modal, fl) qt.QDialog.accept = self.accept self.setCaption("Export to HTML") - #self.tqlayout() + #self.layout() - self.tqlayout = qt.QVBoxLayout(self) - self.tqlayout.setSpacing(6) - self.tqlayout.setMargin(11) + self.layout = qt.QVBoxLayout(self) + self.layout.setSpacing(6) + self.layout.setMargin(11) infolabel = qt.QLabel("Export the data of a table or a query to a HTML-file.", self) - self.tqlayout.addWidget(infolabel) + self.layout.addWidget(infolabel) source = ComboBox(self, "Datasource:") - self.tqlayout.addWidget(source) + self.layout.addWidget(source) self.exporttype = ComboBox(self, "Style:", ["Plain","Paper","Desert","Blues"]) - self.tqlayout.addWidget(self.exporttype) + self.layout.addWidget(self.exporttype) self.filechooser = FileChooser(self) - self.tqlayout.addWidget(self.filechooser) + self.layout.addWidget(self.filechooser) buttonbox = qt.QHBox(self) buttonbox.setSpacing(6) - self.tqlayout.addWidget(buttonbox) + self.layout.addWidget(buttonbox) savebutton = Button("Save", buttonbox) qt.QObject.connect(savebutton, qt.SIGNAL("clicked()"), self, qt.SLOT("accept()")) diff --git a/lib/kwmf/kowmfstruct.h b/lib/kwmf/kowmfstruct.h index d94a9d79..84281f4e 100644 --- a/lib/kwmf/kowmfstruct.h +++ b/lib/kwmf/kowmfstruct.h @@ -57,7 +57,7 @@ struct WmfEnhMetaHeader TQ_UINT16 numHandles; // Number of handles in the handle table // Handle index zero is reserved. TQ_UINT16 reserved; // always 0 - TQ_UINT32 sizeOfDescription; // Number of chars in the tqunicode description string + TQ_UINT32 sizeOfDescription; // Number of chars in the unicode description string // This is 0 if there is no description string TQ_UINT32 offsetOfDescription; // Offset to the metafile description record. // This is 0 if there is no description string diff --git a/lib/kwmf/kwmf.cc b/lib/kwmf/kwmf.cc index d8965537..38d520db 100644 --- a/lib/kwmf/kwmf.cc +++ b/lib/kwmf/kwmf.cc @@ -400,7 +400,7 @@ bool KWmf::parse( S16 nHandles; // Number of handles in the handle table // Handle index zero is reserved. S16 sReserved; // Reserved. Must be zero. - S32 nDescription; // Number of chars in the tqunicode description string + S32 nDescription; // Number of chars in the unicode description string // This is 0 if there is no description string S32 offDescription; // Offset to the metafile description record. // This is 0 if there is no description string diff --git a/lib/kwmf/wmfstruct.h b/lib/kwmf/wmfstruct.h index 33a4a67c..7400e896 100644 --- a/lib/kwmf/wmfstruct.h +++ b/lib/kwmf/wmfstruct.h @@ -53,7 +53,7 @@ struct WmfEnhMetaHeader WORD nHandles; // Number of handles in the handle table // Handle index zero is reserved. WORD sReserved; // Reserved. Must be zero. - DWORD nDescription; // Number of chars in the tqunicode description string + DWORD nDescription; // Number of chars in the unicode description string // This is 0 if there is no description string DWORD offDescription; // Offset to the metafile description record. // This is 0 if there is no description string diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp index 5fff1e83..6c3459f4 100644 --- a/lib/store/KoXmlWriter.cpp +++ b/lib/store/KoXmlWriter.cpp @@ -387,7 +387,7 @@ void KoXmlWriter::addTextSpan( const TQString& text, const TQMap<int, int>& tabC nrSpaces = 0; leadingSpace = false; } - switch ( ch.tqunicode() ) { + switch ( ch.unicode() ) { case '\t': if ( !str.isEmpty() ) addTextNode( str ); diff --git a/lib/store/tests/storedroptest.cpp b/lib/store/tests/storedroptest.cpp index fccb27c0..7845a393 100644 --- a/lib/store/tests/storedroptest.cpp +++ b/lib/store/tests/storedroptest.cpp @@ -65,7 +65,7 @@ void StoreDropTest::keyPressEvent( TQKeyEvent * e ) void StoreDropTest::paste() { qDebug( "paste" ); - TQMimeSource* m = TQApplication::tqclipboard()->data(); + TQMimeSource* m = TQApplication::clipboard()->data(); if ( !m ) return; processMimeSource( m ); |