diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:24:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:24:43 -0600 |
commit | b0f531735b0175ba112ceb87d01731a7b2334772 (patch) | |
tree | 373f53c0f57c1f6c5a866781241be07edaf4840c /kommander | |
parent | 84c989c19db5daab602a67f47ca0f5fd7a2b53d2 (diff) | |
download | tdewebdev-b0f531735b0175ba112ceb87d01731a7b2334772.tar.gz tdewebdev-b0f531735b0175ba112ceb87d01731a7b2334772.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'kommander')
30 files changed, 272 insertions, 272 deletions
diff --git a/kommander/Kommander-TODO.kno b/kommander/Kommander-TODO.kno index 52ab92a5..9f5f352c 100644 --- a/kommander/Kommander-TODO.kno +++ b/kommander/Kommander-TODO.kno @@ -16,10 +16,10 @@ \NewEntry 1 Editor <html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans Serif"> <p><span style="font-weight:600">Layout of Edit Kommander Text dialog<br /><br />Old ideas:</span></p> -<ul type="disc"><li>better tqlayout</li> +<ul type="disc"><li>better layout</li> <li>replace list of widgets with tree of widgets</li> <li>replace widget class with widget pixmap in combos</li> -<li>redesign tqlayout</li> +<li>redesign layout</li> <li>cleanup Connections, not it is unusable, may be obsolete</li> <li>find in scripts</li> <li>list of non-empty scripts for current dialog</li> @@ -37,7 +37,7 @@ <li>use KDE dialogs, not Qt ones if possible</li> <li>some widget information on mouseover</li> <li>review of event model</li> -<li>add more tqlayout-handling commands (center selected widgets horizontally/vertically, fit to window width/height)</li> +<li>add more layout-handling commands (center selected widgets horizontally/vertically, fit to window width/height)</li> <li>handle middle click</li> <li>carefully check defaults, choose most useful ones</li> <li>add wizards? (replace current New dialogs with Kommander-based ones?)</li> @@ -85,7 +85,7 @@ <ul type="disc"><li>Charset is sometimes incorrectly converted from/to local charset</li> <li>SubDialog crashes now</li> <li>Labels do not show up unless you edit their text</li> -<li>toolbox editing is ugly after group tqlayout is applied. Goes back to normal if the dialog is reloaded.</li> +<li>toolbox editing is ugly after group layout is applied. Goes back to normal if the dialog is reloaded.</li> <div></div></ul> </body></html> diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp index 3910b4cf..ae25449c 100644 --- a/kommander/editor/actiondnd.cpp +++ b/kommander/editor/actiondnd.cpp @@ -96,7 +96,7 @@ void QDesignerToolBarSeparator::styleChange( TQStyle& ) TQSize QDesignerToolBarSeparator::sizeHint() const { - int extent = tqstyle().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, + int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); if ( orient ==Qt::Horizontal ) return TQSize( extent, 0 ); @@ -112,7 +112,7 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) if ( orientation() ==Qt::Horizontal ) flags |= TQStyle::Style_Horizontal; - tqstyle().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), + style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), colorGroup(), flags ); } @@ -746,9 +746,9 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e ) idAt( itm ), itm, item->text() ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - // #### need to do a proper invalidate and re-tqlayout - parentWidget()->tqlayout()->invalidate(); - parentWidget()->tqlayout()->activate(); + // #### need to do a proper invalidate and re-layout + parentWidget()->layout()->invalidate(); + parentWidget()->layout()->activate(); } else if ( res == 2 ) { bool ok; TQString old = text( idAt( itm ) ); diff --git a/kommander/editor/assoctexteditor.ui b/kommander/editor/assoctexteditor.ui index 6ce23a0e..9fa637c3 100644 --- a/kommander/editor/assoctexteditor.ui +++ b/kommander/editor/assoctexteditor.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <hbox> <property name="name"> diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp index e41f9a29..8498b96f 100644 --- a/kommander/editor/assoctexteditorimpl.cpp +++ b/kommander/editor/assoctexteditorimpl.cpp @@ -90,9 +90,9 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form, } doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(a_parent), "KTextEditor::Document"); - TQGridLayout *tqlayout = new TQGridLayout(editorFrame, 1, 1); + TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1); view = doc->createView(editorFrame); - tqlayout->addWidget(view, 1,1); + layout->addWidget(view, 1,1); partManager->addPart(doc, true); //trick to import all the KatePart actions into the dialog diff --git a/kommander/editor/choosewidget.ui b/kommander/editor/choosewidget.ui index 5966cdf7..64970e5a 100644 --- a/kommander/editor/choosewidget.ui +++ b/kommander/editor/choosewidget.ui @@ -24,7 +24,7 @@ </property> <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>tqlayout2</cstring> + <cstring>layout2</cstring> </property> <hbox> <property name="name"> @@ -104,7 +104,7 @@ </widget> <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <hbox> <property name="name"> diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index dba41040..231537b9 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -630,21 +630,21 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) { } void LayoutHorizontalCommand::execute() { formWindow()->clearSelection( false ); - tqlayout.doLayout(); + layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalCommand::unexecute() { formWindow()->clearSelection( false ); - tqlayout.undoLayout(); + layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -653,21 +653,21 @@ void LayoutHorizontalCommand::unexecute() LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, true, true ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } void LayoutHorizontalSplitCommand::execute() { formWindow()->clearSelection( false ); - tqlayout.doLayout(); + layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalSplitCommand::unexecute() { formWindow()->clearSelection( false ); - tqlayout.undoLayout(); + layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -676,21 +676,21 @@ void LayoutHorizontalSplitCommand::unexecute() LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) { } void LayoutVerticalCommand::execute() { formWindow()->clearSelection( false ); - tqlayout.doLayout(); + layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalCommand::unexecute() { formWindow()->clearSelection( false ); - tqlayout.undoLayout(); + layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -699,21 +699,21 @@ void LayoutVerticalCommand::unexecute() LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, true, true ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } void LayoutVerticalSplitCommand::execute() { formWindow()->clearSelection( false ); - tqlayout.doLayout(); + layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalSplitCommand::unexecute() { formWindow()->clearSelection( false ); - tqlayout.undoLayout(); + layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -722,21 +722,21 @@ void LayoutVerticalSplitCommand::unexecute() LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl, int xres, int yres ) - : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) { } void LayoutGridCommand::execute() { formWindow()->clearSelection( false ); - tqlayout.doLayout(); + layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutGridCommand::unexecute() { formWindow()->clearSelection( false ); - tqlayout.undoLayout(); + layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -749,21 +749,21 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); - tqlayout = 0; + layout = 0; if ( lay == WidgetFactory::HBox ) - tqlayout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::VBox ) - tqlayout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::Grid ) - tqlayout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false ); + layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false ); } void BreakLayoutCommand::execute() { - if ( !tqlayout ) + if ( !layout ) return; formWindow()->clearSelection( false ); - tqlayout->breakLayout(); + layout->breakLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); @@ -771,10 +771,10 @@ void BreakLayoutCommand::execute() void BreakLayoutCommand::unexecute() { - if ( !tqlayout ) + if ( !layout ) return; formWindow()->clearSelection( false ); - tqlayout->doLayout(); + layout->doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); diff --git a/kommander/editor/command.h b/kommander/editor/command.h index 5c84271e..398e733d 100644 --- a/kommander/editor/command.h +++ b/kommander/editor/command.h @@ -263,7 +263,7 @@ public: Type type() const { return LayoutHorizontal; } private: - HorizontalLayout tqlayout; + HorizontalLayout layout; }; @@ -279,7 +279,7 @@ public: Type type() const { return LayoutHorizontalSplitter; } private: - HorizontalLayout tqlayout; + HorizontalLayout layout; }; @@ -295,7 +295,7 @@ public: Type type() const { return LayoutVertical; } private: - VerticalLayout tqlayout; + VerticalLayout layout; }; @@ -311,7 +311,7 @@ public: Type type() const { return LayoutVerticalSplitter; } private: - VerticalLayout tqlayout; + VerticalLayout layout; }; @@ -327,7 +327,7 @@ public: Type type() const { return LayoutGrid; } private: - GridLayout tqlayout; + GridLayout layout; }; @@ -342,7 +342,7 @@ public: Type type() const { return BreakLayout; } private: - Layout *tqlayout; + Layout *layout; int spacing; int margin; TQWidget *lb; diff --git a/kommander/editor/connectioneditor.ui b/kommander/editor/connectioneditor.ui index 8ff884a2..1fc5c679 100644 --- a/kommander/editor/connectioneditor.ui +++ b/kommander/editor/connectioneditor.ui @@ -129,7 +129,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <hbox> <property name="name"> @@ -203,7 +203,7 @@ </widget> <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <hbox> <property name="name"> @@ -304,7 +304,7 @@ </widget> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>tqlayout8</cstring> + <cstring>layout8</cstring> </property> <hbox> <property name="name"> diff --git a/kommander/editor/filechooser.cpp b/kommander/editor/filechooser.cpp index 39b3d9ca..6dfb84ec 100644 --- a/kommander/editor/filechooser.cpp +++ b/kommander/editor/filechooser.cpp @@ -7,18 +7,18 @@ FileChooser::FileChooser( TQWidget *parent, const char *name ) : TQWidget( parent, name ), md( File ) { - TQHBoxLayout *tqlayout = new TQHBoxLayout( this ); - tqlayout->setMargin( 0 ); + TQHBoxLayout *layout = new TQHBoxLayout( this ); + layout->setMargin( 0 ); lineEdit = new TQLineEdit( this, "filechooser_lineedit" ); - tqlayout->addWidget( lineEdit ); + layout->addWidget( lineEdit ); connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) ); button = new TQPushButton( "...", this, "filechooser_button" ); button->setFixedWidth( button->fontMetrics().width( " ... " ) ); - tqlayout->addWidget( button ); + layout->addWidget( button ); connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( chooseFile() ) ); diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index d81bc0c3..e88dccd0 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -502,7 +502,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) case POINTER_TOOL: if (!isMainContainer(TQT_TQOBJECT(w)) && qstrcmp(w->name(), "central widget") != 0) { // press on a child widget - // if the clicked widget is not in a tqlayout, raise it + // if the clicked widget is not in a layout, raise it if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout) w->raise(); if ((e->state() & ControlButton)) @@ -520,7 +520,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w) clearSelection(false); else { // ...widget selected - // only if widget has a tqlayout (it is a tqlayout meta widget or a laid out container!), + // only if widget has a layout (it is a layout meta widget or a laid out container!), // unselect its childs if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout) { @@ -861,16 +861,16 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) if (wa == ((TQWidget *) it.key())->parentWidget()) goto make_move_command; - // break tqlayout if necessary + // break layout if necessary if (WidgetFactory::layoutType(wa) != WidgetFactory::NoLayout) { if (KMessageBox::questionYesNo(mainWindow(), i18n("You tried to insert a widget into the " - "tqlayout Container Widget '%1'.\n" + "layout Container Widget '%1'.\n" "This is not possible. " - "In order to insert the widget, the tqlayout of '%1'\n" + "In order to insert the widget, the layout of '%1'\n" "must first be broken.\n" - "Break the tqlayout or cancel the operation?"). + "Break the layout or cancel the operation?"). arg(wa->name()).arg(wa->name()), i18n("Inserting Widget"), i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::No) goto make_move_command; // cancel @@ -955,11 +955,11 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) { if (KMessageBox::questionYesNo(mainWindow(), i18n("You tried to insert a widget into the " - "tqlayout Container Widget '%1'.\n" + "layout Container Widget '%1'.\n" "This is not possible. " - "In order to insert the widget, the tqlayout of '%1'\n" + "In order to insert the widget, the layout of '%1'\n" "must first be broken.\n" - "Break the tqlayout or cancel the operation?"). + "Break the layout or cancel the operation?"). arg(insertParent->name()). arg(insertParent->name()), i18n("Inserting Widget"), i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::Yes) @@ -2502,7 +2502,7 @@ void FormWindow::setMainContainer(TQWidget *w) delete mContainer; mContainer = w; insertedWidgets.insert(mContainer, mContainer); - delete tqlayout(); + delete layout(); TQHBoxLayout *l = new TQHBoxLayout(this); l->addWidget(w); if (resetPropertyWidget) diff --git a/kommander/editor/functions.ui b/kommander/editor/functions.ui index 31068b7a..5930b06b 100644 --- a/kommander/editor/functions.ui +++ b/kommander/editor/functions.ui @@ -24,7 +24,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="2"> <property name="name"> - <cstring>tqlayout7_2</cstring> + <cstring>layout7_2</cstring> </property> <vbox> <property name="name"> @@ -53,7 +53,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <vbox> <property name="name"> @@ -213,7 +213,7 @@ </widget> <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>tqlayout11</cstring> + <cstring>layout11</cstring> </property> <hbox> <property name="name"> @@ -265,7 +265,7 @@ </widget> <widget class="TQLayoutWidget" row="5" column="0"> <property name="name"> - <cstring>tqlayout12</cstring> + <cstring>layout12</cstring> </property> <hbox> <property name="name"> @@ -312,7 +312,7 @@ </widget> <widget class="TQLayoutWidget" row="7" column="0"> <property name="name"> - <cstring>tqlayout13</cstring> + <cstring>layout13</cstring> </property> <hbox> <property name="name"> @@ -364,7 +364,7 @@ </widget> <widget class="TQLayoutWidget" row="9" column="0"> <property name="name"> - <cstring>tqlayout14</cstring> + <cstring>layout14</cstring> </property> <hbox> <property name="name"> @@ -408,7 +408,7 @@ </widget> <widget class="TQLayoutWidget" row="11" column="0"> <property name="name"> - <cstring>tqlayout15</cstring> + <cstring>layout15</cstring> </property> <hbox> <property name="name"> @@ -452,7 +452,7 @@ </widget> <widget class="TQLayoutWidget" row="13" column="0"> <property name="name"> - <cstring>tqlayout16</cstring> + <cstring>layout16</cstring> </property> <hbox> <property name="name"> @@ -514,7 +514,7 @@ </widget> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>tqlayout6</cstring> + <cstring>layout6</cstring> </property> <hbox> <property name="name"> @@ -589,7 +589,7 @@ </widget> <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>tqlayout12</cstring> + <cstring>layout12</cstring> </property> <hbox> <property name="name"> @@ -597,7 +597,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout11</cstring> + <cstring>layout11</cstring> </property> <hbox> <property name="name"> diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp index 25ad2872..f7855b8d 100644 --- a/kommander/editor/hierarchyview.cpp +++ b/kommander/editor/hierarchyview.cpp @@ -413,7 +413,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( !parent ) item->setPixmap( 0, PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) ); else if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING) ) - item->setPixmap( 0, PixmapChooser::loadPixmap( "tqlayout.xpm", PixmapChooser::Small ) ); + item->setPixmap( 0, PixmapChooser::loadPixmap( "layout.xpm", PixmapChooser::Small ) ); else item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). pixmap( TQIconSet::Small, TQIconSet::Normal ) ); diff --git a/kommander/editor/kommander.xml b/kommander/editor/kommander.xml index 21b667a6..ee10455b 100644 --- a/kommander/editor/kommander.xml +++ b/kommander/editor/kommander.xml @@ -341,8 +341,8 @@ <item> true </item> <item> umount </item> <item> uname </item> - <item> tqunicode_start </item> - <item> tqunicode_stop </item> + <item> unicode_start </item> + <item> unicode_stop </item> <item> unlink </item> <item> utmpdump </item> <item> uuidgen </item> diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp index 0d3e4cc1..ea827bd4 100644 --- a/kommander/editor/layout.cpp +++ b/kommander/editor/layout.cpp @@ -77,7 +77,7 @@ void Layout::setup() TQWidget *w = 0; // Go through all widgets of the list we got. As we can only - // tqlayout widgets which have the same parent, we first do some + // layout widgets which have the same parent, we first do some // sorting which means create a list for each parent containing // its child here. After that we keep working on the list of // childs which has the most entries. @@ -112,7 +112,7 @@ void Layout::setup() } // If we found no list (because no widget did fit at all) or the - // best list has only one entry and we do not tqlayout a container, + // best list has only one entry and we do not layout a container, // we leave here. if ( !lastList || ( lastList->count() < 2 && ( !layoutBase || @@ -125,11 +125,11 @@ void Layout::setup() } // Now we have a new and clean widget list, which makes sense - // to tqlayout + // to layout widgets = *lastList; // Also use the only correct parent later, so store it parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() ); - // Now calculate the position where the tqlayout-meta-widget should + // Now calculate the position where the layout-meta-widget should // be placed and connect to widgetDestroyed() signals of the // widgets to get informed if one gets deleted to be able to // handle that and do not crash in this case @@ -141,7 +141,7 @@ void Layout::setup() geometries.insert( w, TQRect( w->pos(), w->size() ) ); // Change the Z-order, as saving/loading uses the Z-order for // writing/creating widgets and this has to be the same as in - // the tqlayout. Else saving + loading will give different results + // the layout. Else saving + loading will give different results w->raise(); } } @@ -174,7 +174,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) return true; } -void Layout::finishLayout( bool needMove, TQLayout *tqlayout ) +void Layout::finishLayout( bool needMove, TQLayout *layout ) { if ( needMove ) layoutBase->move( startPoint ); @@ -185,7 +185,7 @@ void Layout::finishLayout( bool needMove, TQLayout *tqlayout ) layoutBase->setGeometry( oldGeometry ); oldGeometry = g; layoutBase->show(); - tqlayout->activate(); + layout->activate(); formWindow->insertWidget( layoutBase ); formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); TQString n = layoutBase->name(); @@ -303,16 +303,16 @@ void HorizontalLayout::doLayout() if ( !prepareLayout( needMove, needReparent ) ) return; - TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); + TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) - tqlayout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); + layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else - tqlayout->addWidget( w ); + layout->addWidget( w ); if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } @@ -322,7 +322,7 @@ void HorizontalLayout::doLayout() if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); - finishLayout( needMove, tqlayout ); + finishLayout( needMove, layout ); } @@ -367,16 +367,16 @@ void VerticalLayout::doLayout() if ( !prepareLayout( needMove, needReparent ) ) return; - TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); + TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) - tqlayout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); + layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else - tqlayout->addWidget( w ); + layout->addWidget( w ); if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } @@ -386,7 +386,7 @@ void VerticalLayout::doLayout() if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); - finishLayout( needMove, tqlayout ); + finishLayout( needMove, layout ); } @@ -733,7 +733,7 @@ void GridLayout::doLayout() if ( !prepareLayout( needMove, needReparent ) ) return; - QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid ); + QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid ); if ( !grid ) buildGrid(); @@ -745,18 +745,18 @@ void GridLayout::doLayout() if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( rs * cs == 1 ) { - tqlayout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 ); } else { - tqlayout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 ); } if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); w->show(); } else { - qWarning("ooops, widget '%s' does not fit in tqlayout", w->name() ); + qWarning("ooops, widget '%s' does not fit in layout", w->name() ); } } - finishLayout( needMove, tqlayout ); + finishLayout( needMove, layout ); } void GridLayout::setup() diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h index b6d6d71e..f85dc270 100644 --- a/kommander/editor/layout.h +++ b/kommander/editor/layout.h @@ -44,7 +44,7 @@ public: virtual void undoLayout(); virtual void breakLayout(); virtual bool prepareLayout( bool &needMove, bool &needReparent ); - virtual void finishLayout( bool needMove, TQLayout *tqlayout ); + virtual void finishLayout( bool needMove, TQLayout *layout ); protected: TQWidgetList widgets; diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index 3d41fc6a..599807c3 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -848,7 +848,7 @@ void MainWindow::insertFormWindow(FormWindow *fw) { if (fw) TQWhatsThis::add(fw, i18n("<b>The Form Window</b>" - "<p>Use the various tools to add widgets or to change the tqlayout " + "<p>Use the various tools to add widgets or to change the layout " "and behavior of the components in the form. Select one or multiple " "widgets to move them or lay them out. If a single widget is chosen it can " "be resized using the resize handles.</p>" diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp index 571296e0..c44b4910 100644 --- a/kommander/editor/mainwindowactions.cpp +++ b/kommander/editor/mainwindowactions.cpp @@ -207,13 +207,13 @@ void MainWindow::setupLayoutActions() actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size")); actionEditAdjustSize->setEnabled(false); - actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithtqlayout.xpm"), + actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithlayout.xpm"), CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h"); actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally")); actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally")); actionEditHLayout->setEnabled(false); - actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvtqlayout.xpm"), + actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvlayout.xpm"), CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v"); actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically")); actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically")); @@ -241,7 +241,7 @@ void MainWindow::setupLayoutActions() actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"), CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout"); - actionEditBreakLayout->setToolTip(i18n("Breaks the selected tqlayout")); + actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout")); actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout")); int id = WidgetDatabase::idFromClassName("Spacer"); @@ -907,7 +907,7 @@ void MainWindow::editPaste() } else { KMessageBox::information(this, i18n("Cannot paste widgets. Designer could not find a container\n" - "to paste into which does not contain a tqlayout. Break the tqlayout\n" + "to paste into which does not contain a layout. Break the layout\n" "of the container you want to paste into and select this container\n" "and then paste again."), i18n("Paste Error")); } diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp index 88dd6a21..be309d2e 100644 --- a/kommander/editor/messagelog.cpp +++ b/kommander/editor/messagelog.cpp @@ -108,12 +108,12 @@ void MessageLog::clearContent() void MessageLog::copyLine() { if (m_lists[currentPageIndex()]->count()) - kapp->tqclipboard()->setText(m_lists[currentPageIndex()]->currentText(), TQClipboard::Clipboard); + kapp->clipboard()->setText(m_lists[currentPageIndex()]->currentText(), TQClipboard::Clipboard); } void MessageLog::copyContent() { - kapp->tqclipboard()->setText(content(), TQClipboard::Clipboard); + kapp->clipboard()->setText(content(), TQClipboard::Clipboard); } void MessageLog::saveToFile() diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index beb19164..2bdbe844 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -269,10 +269,10 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing ) } r->spacing = spacing; - TQLayout * tqlayout = 0; - WidgetFactory::layoutType( (TQWidget*)o, tqlayout ); - if ( tqlayout ) - tqlayout->setSpacing( spacing ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); + if ( layout ) + layout->setSpacing( spacing ); } int MetaDataBase::spacing( TQObject *o ) @@ -305,12 +305,12 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) } r->margin = margin; - TQLayout * tqlayout = 0; - WidgetFactory::layoutType( (TQWidget*)o, tqlayout ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); if ( margin < 1 ) margin = 1; - if ( tqlayout ) - tqlayout->setMargin( margin ); + if ( layout ) + layout->setMargin( margin ); } int MetaDataBase::margin( TQObject *o ) diff --git a/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp index e5480379..e7880b19 100644 --- a/kommander/editor/paletteeditoradvancedimpl.cpp +++ b/kommander/editor/paletteeditoradvancedimpl.cpp @@ -244,15 +244,15 @@ void PaletteEditorAdvanced::onCentral( int item ) case 0: default: c = editPalette.active().color( centralFromItem(item) ); - p = editPalette.active().tqbrush( centralFromItem(item) ).pixmap(); + p = editPalette.active().brush( centralFromItem(item) ).pixmap(); break; case 1: c = editPalette.inactive().color( centralFromItem(item) ); - p = editPalette.inactive().tqbrush( centralFromItem(item) ).pixmap(); + p = editPalette.inactive().brush( centralFromItem(item) ).pixmap(); break; case 2: c = editPalette.disabled().color( centralFromItem(item) ); - p = editPalette.disabled().tqbrush( centralFromItem(item) ).pixmap(); + p = editPalette.disabled().brush( centralFromItem(item) ).pixmap(); break; } @@ -508,17 +508,17 @@ void PaletteEditorAdvanced::updateStyledButtons() default: central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) ); effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.active().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); break; case 1: central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) ); effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.inactive().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); break; case 2: central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) ); effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) ); - pm = editPalette.disabled().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); + pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap(); break; } diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h index 57997088..8a7bd3a2 100644 --- a/kommander/editor/pics/images.h +++ b/kommander/editor/pics/images.h @@ -10857,7 +10857,7 @@ static struct Embed { { 1483, small_form_xpm_data, "small/form.xpm" }, { 3981, small_home_xpm_data, "small/home.xpm" }, { 5406, small_image_xpm_data, "small/image.xpm" }, - { 3179, small_layout_xpm_data, "small/tqlayout.xpm" }, + { 3179, small_layout_xpm_data, "small/layout.xpm" }, { 3621, small_left_xpm_data, "small/left.xpm" }, { 1131, small_newform_xpm_data, "small/newform.xpm" }, { 2434, small_print_xpm_data, "small/print.xpm" }, @@ -10877,11 +10877,11 @@ static struct Embed { { 485, small_editcopy_png_data, "small/editcopy.png" }, { 649, small_editcut_png_data, "small/editcut.png" }, { 520, small_editgrid_png_data, "small/editgrid.png" }, - { 706, small_edithlayout_png_data, "small/edithtqlayout.png" }, + { 706, small_edithlayout_png_data, "small/edithlayout.png" }, { 809, small_edithlayoutsplit_png_data, "small/edithlayoutsplit.png" }, { 902, small_editpaste_png_data, "small/editpaste.png" }, { 690, small_editslots_png_data, "small/editslots.png" }, - { 289, small_editvlayout_png_data, "small/editvtqlayout.png" }, + { 289, small_editvlayout_png_data, "small/editvlayout.png" }, { 355, small_editvlayoutsplit_png_data, "small/editvlayoutsplit.png" }, { 1408, small_exec_png_data, "small/exec.png" }, { 313, small_filenew_png_data, "small/filenew.png" }, @@ -10925,7 +10925,7 @@ static struct Embed { { 572, small_undo_png_data, "small/undo.png" }, { 733, small_disabled_editcut_xpm_data, "small/disabled/editcut.xpm" }, { 899, small_disabled_editslots_xpm_data, "small/disabled/editslots.xpm" }, - { 931, small_disabled_layout_xpm_data, "small/disabled/tqlayout.xpm" }, + { 931, small_disabled_layout_xpm_data, "small/disabled/layout.xpm" }, { 733, small_disabled_left_xpm_data, "small/disabled/left.xpm" }, { 733, small_disabled_right_xpm_data, "small/disabled/right.xpm" }, { 659, small_disabled_adjustsize_png_data, "small/disabled/adjustsize.png" }, @@ -10933,10 +10933,10 @@ static struct Embed { { 1126, small_disabled_editbreaklayout_png_data, "small/disabled/editbreaklayout.png" }, { 931, small_disabled_editcopy_png_data, "small/disabled/editcopy.png" }, { 735, small_disabled_editgrid_png_data, "small/disabled/editgrid.png" }, - { 601, small_disabled_edithlayout_png_data, "small/disabled/edithtqlayout.png" }, + { 601, small_disabled_edithlayout_png_data, "small/disabled/edithlayout.png" }, { 754, small_disabled_edithlayoutsplit_png_data, "small/disabled/edithlayoutsplit.png" }, { 901, small_disabled_editpaste_png_data, "small/disabled/editpaste.png" }, - { 617, small_disabled_editvlayout_png_data, "small/disabled/editvtqlayout.png" }, + { 617, small_disabled_editvlayout_png_data, "small/disabled/editvlayout.png" }, { 752, small_disabled_editvlayoutsplit_png_data, "small/disabled/editvlayoutsplit.png" }, { 587, small_disabled_filesave_png_data, "small/disabled/filesave.png" }, { 531, small_disabled_redo_png_data, "small/disabled/redo.png" }, diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp index 8c68ed5e..fdc3a8dc 100644 --- a/kommander/editor/propertyeditor.cpp +++ b/kommander/editor/propertyeditor.cpp @@ -282,7 +282,7 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->save(); - TQApplication::tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, TQStyle::Style_Sunken, TQStyleOption(1,1) ); p->restore(); } @@ -398,7 +398,7 @@ void PropertyItem::createResetButton() resetButton = new TQPushButton( hbox ); resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) ); resetButton->setFixedWidth( resetButton->sizeHint().width() ); - hbox->tqlayout()->setAlignment( TQt::AlignRight ); + hbox->layout()->setAlignment( TQt::AlignRight ); listview->addChild( hbox ); hbox->hide(); TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp index 8a804858..386e807a 100644 --- a/kommander/editor/resource.cpp +++ b/kommander/editor/resource.cpp @@ -401,8 +401,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev ) if ( formwindow ) { formwindow->killAccels( TQT_TQOBJECT(formwindow) ); - if ( formwindow->tqlayout() ) - formwindow->tqlayout()->activate(); + if ( formwindow->layout() ) + formwindow->layout()->activate(); if ( hadGeometry ) formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). expandedTo( formwindow->minimumSizeHint() ) ) ); @@ -934,14 +934,14 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) return; // no children to save TQString closeTag; - // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer - TQLayout *tqlayout = 0; + // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer + TQLayout *layout = 0; QDesignerGridLayout* grid = 0; if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && - WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ); + WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); switch ( lay ) { case WidgetFactory::HBox: closeTag = makeIndent( indent ) + "</hbox>"; @@ -957,15 +957,15 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) closeTag = makeIndent( indent ) + "</grid>"; ts << makeIndent( indent ) << "<grid>" << endl; ++indent; - grid = (QDesignerGridLayout*) tqlayout; + grid = (QDesignerGridLayout*) layout; break; default: break; } - // save properties of tqlayout + // save properties of layout if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(tqlayout), ts, indent ); + saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); } @@ -1303,7 +1303,7 @@ void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); indent--; ts << makeIndent( indent ) << "</color>" << endl; - TQPixmap* pm = cg.tqbrush( (TQColorGroup::ColorRole)r ).pixmap(); + TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); if ( pm && !pm->isNull() ) savePixmap( *pm, ts, indent ); } @@ -1316,7 +1316,7 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl; } -TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout ) +TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) { lastItem = 0; TQDomElement n = e.firstChild().toElement(); @@ -1346,16 +1346,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay w = (TQWidget*)obj; if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) w = ( (TQMainWindow*)w )->centralWidget(); - if ( tqlayout ) { - switch ( WidgetFactory::layoutType( tqlayout ) ) { + if ( layout ) { + switch ( WidgetFactory::layoutType( layout ) ) { case WidgetFactory::HBox: - ( (TQHBoxLayout*)tqlayout )->addWidget( w ); + ( (TQHBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::VBox: - ( (TQVBoxLayout*)tqlayout )->addWidget( w ); + ( (TQVBoxLayout*)layout )->addWidget( w ); break; case WidgetFactory::Grid: - ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -1365,7 +1365,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( !toplevel ) toplevel = w; - tqlayout = 0; + layout = 0; if ( w && formwindow ) { if ( !parent || ( !parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) @@ -1379,22 +1379,22 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay while ( !n.isNull() ) { if ( n.tagName() == "spacer" ) { - createSpacer( n, w, tqlayout, Qt::Horizontal ); + createSpacer( n, w, layout, Qt::Horizontal ); } else if ( n.tagName() == "widget" ) { - createObject( n, w, tqlayout ); + createObject( n, w, layout ); } else if ( n.tagName() == "hbox" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "grid" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "vbox" ) { - tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1605,7 +1605,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } } -TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *tqlayout, Qt::Orientation o ) +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) { TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); @@ -1629,11 +1629,11 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( true ); if ( formwindow ) formwindow->insertWidget( spacer, pasting ); - if ( tqlayout ) { - if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->alignment() ); + if ( layout ) { + if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else - ( (QDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, spacer->alignment() ); } return spacer; diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h index e35bd6b2..c3304acc 100644 --- a/kommander/editor/resource.h +++ b/kommander/editor/resource.h @@ -103,8 +103,8 @@ private: // void saveFormCode(); #endif - TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout = 0 ); - TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *tqlayout, Qt::Orientation o ); + TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 ); + TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ); void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); void createColumn( const TQDomElement &e, TQWidget *widget ); void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e); diff --git a/kommander/editor/styledbutton.cpp b/kommander/editor/styledbutton.cpp index 189a3ef2..55c8945f 100644 --- a/kommander/editor/styledbutton.cpp +++ b/kommander/editor/styledbutton.cpp @@ -145,21 +145,21 @@ void StyledButton::resizeEvent( TQResizeEvent* e ) void StyledButton::drawButton( TQPainter *paint ) { - tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), + style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); drawButtonLabel(paint); if (hasFocus()) - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, - tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, this), + style().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, + style().subRect(TQStyle::SR_PushButtonFocusRect, this), colorGroup(), TQStyle::Style_Default); } void StyledButton::drawButtonLabel( TQPainter *paint ) { TQColor pen = isEnabled() ? - hasFocus() ? tqpalette().active().buttonText() : tqpalette().inactive().buttonText() - : tqpalette().disabled().buttonText(); + hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText() + : palette().disabled().buttonText(); paint->setPen( pen ); if(!isEnabled()) { @@ -178,7 +178,7 @@ void StyledButton::onEditor() { switch (edit) { case ColorEditor: { - TQColor c = tqpalette().active().background(); + TQColor c = palette().active().background(); if ( KColorDialog::getColor( c, this ) == TQDialog::Accepted ) { setColor( c ); emit changed(); diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp index 815c9f89..9e7f14a8 100644 --- a/kommander/editor/widgetfactory.cpp +++ b/kommander/editor/widgetfactory.cpp @@ -668,11 +668,11 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo return w; } -/*! Creates a tqlayout on the widget \a widget of the type \a type +/*! Creates a layout on the widget \a widget of the type \a type which can be \c HBox, \c VBox or \c Grid. */ -TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, LayoutType type ) +TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) { int spacing = MainWindow::self->currentLayoutDefaultSpacing(); int margin = 0; @@ -682,46 +682,46 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); - if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) widget = ((TQToolBox*)widget)->currentItem(); - if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !tqlayout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); - if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { + if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, Qt::Vertical ); - gb->tqlayout()->setMargin( 0 ); - gb->tqlayout()->setSpacing( 0 ); + gb->layout()->setMargin( 0 ); + gb->layout()->setSpacing( 0 ); TQLayout *l; switch ( type ) { case HBox: - l = new TQHBoxLayout( gb->tqlayout() ); + l = new TQHBoxLayout( gb->layout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); l->setAlignment( AlignTop ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case VBox: - l = new TQVBoxLayout( gb->tqlayout(), spacing ); + l = new TQVBoxLayout( gb->layout(), spacing ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); l->setAlignment( AlignTop ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: - l = new QDesignerGridLayout( gb->tqlayout() ); + l = new QDesignerGridLayout( gb->layout() ); MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin ); MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing ); l->setAlignment( AlignTop ); @@ -731,25 +731,25 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay return 0; } } else { - if ( tqlayout ) { + if ( layout ) { TQLayout *l; switch ( type ) { case HBox: - l = new TQHBoxLayout( tqlayout ); + l = new TQHBoxLayout( layout ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); l->setSpacing( spacing ); l->setMargin( margin ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case VBox: - l = new TQVBoxLayout( tqlayout ); + l = new TQVBoxLayout( layout ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); l->setSpacing( spacing ); l->setMargin( margin ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); return l; case Grid: { - l = new QDesignerGridLayout( tqlayout ); + l = new QDesignerGridLayout( layout ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); l->setSpacing( spacing ); l->setMargin( margin ); @@ -819,7 +819,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) widget = ((TQMainWindow*)widget)->centralWidget(); if ( widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - delete widget->tqlayout(); + delete widget->layout(); } /*! Factory functions for creating a widget of the type \a className @@ -1257,14 +1257,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare -/*! Find out which type the tqlayout of the widget is. Returns \c HBox, - \c VBox, \c Grid or \c NoLayout. \a tqlayout points to this - TQWidget::tqlayout() of \a w or to 0 after the function call. +/*! Find out which type the layout of the widget is. Returns \c HBox, + \c VBox, \c Grid or \c NoLayout. \a layout points to this + TQWidget::layout() of \a w or to 0 after the function call. */ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&tqlayout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout ) { - tqlayout = 0; + layout = 0; if ( w && w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) w = ((TQTabWidget*)w)->currentPage(); @@ -1280,9 +1280,9 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&tql if ( w && w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; - if ( !w || !w->tqlayout() ) + if ( !w || !w->layout() ) return NoLayout; - TQLayout *lay = w->tqlayout(); + TQLayout *lay = w->layout(); if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); @@ -1290,7 +1290,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&tql lay = (TQLayout*)l->first(); delete l; } - tqlayout = lay; + layout = lay; if ( lay->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) return HBox; @@ -1304,13 +1304,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&tql /*! \overload */ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *tqlayout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) return HBox; - else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) return VBox; - else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) return Grid; return NoLayout; } @@ -1325,9 +1325,9 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) } -TQWidget *WidgetFactory::layoutParent( TQLayout *tqlayout ) +TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) { - TQObject *o = TQT_TQOBJECT(tqlayout); + TQObject *o = TQT_TQOBJECT(layout); while ( o ) { if ( o->isWidgetType() ) return (TQWidget*)o; @@ -1793,7 +1793,7 @@ bool TQLayoutWidget::event( TQEvent *e ) /* This function must be called on TQLayoutWidget creation and whenever - the TQLayoutWidget's parent tqlayout changes (e.g., from a TQHBoxLayout + the TQLayoutWidget's parent layout changes (e.g., from a TQHBoxLayout to a TQVBoxLayout), because of the (illogical) way layouting works. */ void TQLayoutWidget::updateSizePolicy() @@ -1817,14 +1817,14 @@ void TQLayoutWidget::updateSizePolicy() int ht = (int) TQSizePolicy::Preferred; int vt = (int) TQSizePolicy::Preferred; - if ( tqlayout() ) { + if ( layout() ) { /* - parentLayout is set to the parent tqlayout if there is one and if it is + parentLayout is set to the parent layout if there is one and if it is top level, in which case layouting is illogical. */ TQLayout *parentLayout = 0; if ( parent() && parent()->isWidgetType() ) { - parentLayout = ((TQWidget *)parent())->tqlayout(); + parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && parentLayout->mainWidget()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) ) parentLayout = 0; } @@ -1832,7 +1832,7 @@ void TQLayoutWidget::updateSizePolicy() TQObjectListIt it( childrenListObject() ); TQObject *o; - if ( tqlayout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) { + if ( layout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) { if ( parentLayout && parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) vt = TQSizePolicy::Minimum; else @@ -1853,7 +1853,7 @@ void TQLayoutWidget::updateSizePolicy() if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } - } else if ( tqlayout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) { + } else if ( layout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) { if ( parentLayout && parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) ht = TQSizePolicy::Minimum; else @@ -1874,7 +1874,7 @@ void TQLayoutWidget::updateSizePolicy() if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } - } else if ( tqlayout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + } else if ( layout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; if ( parentLayout ) { @@ -1901,18 +1901,18 @@ void TQLayoutWidget::updateSizePolicy() } } #ifdef USE_QT4 - if ( tqlayout()->expanding() & TQSizePolicy::Horizontally ) + if ( layout()->expanding() & TQSizePolicy::Horizontally ) ht = TQSizePolicy::Expanding; - if ( tqlayout()->expanding() & TQSizePolicy::Vertically ) + if ( layout()->expanding() & TQSizePolicy::Vertically ) vt = TQSizePolicy::Expanding; #else // USE_QT4 - if ( tqlayout()->expanding() & TQSizePolicy::Horizontally ) + if ( layout()->expanding() & TQSizePolicy::Horizontally ) ht = TQSizePolicy::Expanding; - if ( tqlayout()->expanding() & TQSizePolicy::Vertically ) + if ( layout()->expanding() & TQSizePolicy::Vertically ) vt = TQSizePolicy::Expanding; #endif // USE_QT4 - tqlayout()->invalidate(); + layout()->invalidate(); } sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h index 0480e5ae..90e88235 100644 --- a/kommander/editor/widgetfactory.h +++ b/kommander/editor/widgetfactory.h @@ -72,13 +72,13 @@ public: static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE, const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal ); - static TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type ); + static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); static void deleteLayout( TQWidget *widget ); static LayoutType layoutType( TQWidget *w ); - static LayoutType layoutType( TQWidget *w, TQLayout *&tqlayout ); - static LayoutType layoutType( TQLayout *tqlayout ); - static TQWidget *layoutParent( TQLayout *tqlayout ); + static LayoutType layoutType( TQWidget *w, TQLayout *&layout ); + static LayoutType layoutType( TQLayout *layout ); + static TQWidget *layoutParent( TQLayout *layout ); static TQWidget* containerOfWidget( TQWidget *w ); static TQWidget* widgetOfContainer( TQWidget *w ); diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp index 03b82473..a1e45f06 100644 --- a/kommander/factory/kommanderfactory.cpp +++ b/kommander/factory/kommanderfactory.cpp @@ -497,7 +497,7 @@ FeatureList KommanderFactory::featureList() //iterate through widgetPlugins, appending KommanderPlugin::widgets() to features } -TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout, const TQString &classNameArg ) +TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ) { lastItem = 0; TQDomElement n = e.firstChild().toElement(); @@ -515,10 +515,10 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge if ( colspan < 1 ) colspan = 1; if ( !className.isEmpty() ) { - if ( !tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) className = TQWIDGET_OBJECT_NAME_STRING; - if ( tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - // hide tqlayout widgets + if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + // hide layout widgets w = parent; } else { obj = TQT_TQOBJECT(KommanderFactory::createWidget( className, parent, 0 )); @@ -531,16 +531,16 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge toplevel = w; if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) w = ( (TQMainWindow*)w )->centralWidget(); - if ( tqlayout ) { - switch( layoutType( tqlayout ) ) { + if ( layout ) { + switch( layoutType( layout ) ) { case HBox: - ( (TQHBoxLayout*)tqlayout )->addWidget( w ); + ( (TQHBoxLayout*)layout )->addWidget( w ); break; case VBox: - ( (TQVBoxLayout*)tqlayout )->addWidget( w ); + ( (TQVBoxLayout*)layout )->addWidget( w ); break; case Grid: - ( (TQGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1, + ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, col, col + colspan - 1 ); break; default: @@ -548,7 +548,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge } } - tqlayout = 0; + layout = 0; } } if (className == "Dialog") @@ -556,43 +556,43 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge while ( !n.isNull() ) { if ( n.tagName() == "spacer" ) { - createSpacer( n, tqlayout ); + createSpacer( n, layout ); } else if ( n.tagName() == "widget" ) { TQMap< TQString, TQString> *oldDbControls = dbControls; - createWidgetInternal( n, w, tqlayout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); dbControls = oldDbControls; } else if ( n.tagName() == "hbox" ) { - TQLayout *parentLayout = tqlayout; - if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - tqlayout = createLayout( 0, 0, KommanderFactory::HBox ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, KommanderFactory::HBox ); else - tqlayout = createLayout( w, tqlayout, KommanderFactory::HBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = createLayout( w, layout, KommanderFactory::HBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "grid" ) { - TQLayout *parentLayout = tqlayout; - if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - tqlayout = createLayout( 0, 0, KommanderFactory::Grid ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, KommanderFactory::Grid ); else - tqlayout = createLayout( w, tqlayout, KommanderFactory::Grid ); - obj = TQT_TQOBJECT(tqlayout); + layout = createLayout( w, layout, KommanderFactory::Grid ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "vbox" ) { - TQLayout *parentLayout = tqlayout; - if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - tqlayout = createLayout( 0, 0, KommanderFactory::VBox ); + TQLayout *parentLayout = layout; + if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + layout = createLayout( 0, 0, KommanderFactory::VBox ); else - tqlayout = createLayout( w, tqlayout, KommanderFactory::VBox ); - obj = TQT_TQOBJECT(tqlayout); + layout = createLayout( w, layout, KommanderFactory::VBox ); + obj = TQT_TQOBJECT(layout); n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "property" && obj ) { setProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); @@ -622,60 +622,60 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge return w; } -TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type ) +TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ) { int spacing = defSpacing; int margin = defMargin; - if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) widget = ((TQToolBox*)widget)->currentItem(); - if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { + if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, Qt::Vertical ); - gb->tqlayout()->setMargin( 0 ); - gb->tqlayout()->setSpacing( 0 ); + gb->layout()->setMargin( 0 ); + gb->layout()->setSpacing( 0 ); TQLayout *l; switch ( type ) { case HBox: - l = new TQHBoxLayout( gb->tqlayout() ); + l = new TQHBoxLayout( gb->layout() ); l->setAlignment( TQt::AlignTop ); return l; case VBox: - l = new TQVBoxLayout( gb->tqlayout(), spacing ); + l = new TQVBoxLayout( gb->layout(), spacing ); l->setAlignment( TQt::AlignTop ); return l; case Grid: - l = new TQGridLayout( gb->tqlayout() ); + l = new TQGridLayout( gb->layout() ); l->setAlignment( TQt::AlignTop ); return l; default: return 0; } } else { - if ( tqlayout ) { + if ( layout ) { TQLayout *l; switch ( type ) { case HBox: - l = new TQHBoxLayout( tqlayout ); + l = new TQHBoxLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; case VBox: - l = new TQVBoxLayout( tqlayout ); + l = new TQVBoxLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; case Grid: { - l = new TQGridLayout( tqlayout ); + l = new TQGridLayout( layout ); l->setSpacing( spacing ); l->setMargin( margin ); return l; @@ -715,13 +715,13 @@ TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* tqlayout, } } -KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *tqlayout ) const +KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) const { - if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) return HBox; - else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) return VBox; - else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) return Grid; return NoLayout; } @@ -840,7 +840,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T obj->setProperty( prop, v ); } -void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *tqlayout ) +void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) { TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); @@ -886,11 +886,11 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *tqlayout ) colspan = 1; TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); - if ( tqlayout ) { - if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQBoxLayout*)tqlayout )->addItem( item ); + if ( layout ) { + if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQBoxLayout*)layout )->addItem( item ); else - ( (TQGridLayout*)tqlayout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, + ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter ); } } diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h index 9b38ae9e..609d0a73 100644 --- a/kommander/factory/kommanderfactory.h +++ b/kommander/factory/kommanderfactory.h @@ -74,11 +74,11 @@ private: void loadImageCollection( const TQDomElement &e ); void loadConnections( const TQDomElement &e, TQObject *connector ); void loadTabOrder( const TQDomElement &e ); - TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* tqlayout, const TQString &classNameArg ); - TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type ); + TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ); + TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); LayoutType layoutType( TQLayout *l ) const; void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); - void createSpacer( const TQDomElement &e, TQLayout *tqlayout ); + void createSpacer( const TQDomElement &e, TQLayout *layout ); TQImage loadFromCollection( const TQString &name ); TQPixmap loadPixmap( const TQDomElement &e ); TQColorGroup loadColorGroup( const TQDomElement &e ); diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp index 1faa12b4..daafcdab 100644 --- a/kommander/widgets/richtexteditor.cpp +++ b/kommander/widgets/richtexteditor.cpp @@ -61,11 +61,11 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name) m_textedit = new TQTextEdit(this, "editor"); m_textedit->setTextFormat(RichText); - // tqlayout the widgets - TQVBoxLayout *tqlayout = new TQVBoxLayout(this); - tqlayout->addWidget(m_toolbar); - tqlayout->addWidget(m_textedit); - tqlayout->setSpacing(1); + // layout the widgets + TQVBoxLayout *layout = new TQVBoxLayout(this); + layout->addWidget(m_toolbar); + layout->addWidget(m_textedit); + layout->setSpacing(1); // setup buttons TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar); |