Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/29/head
Michele Calgaro 6 months ago
parent a6f77b2087
commit 818c8f1cd1
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -411,7 +411,7 @@ You need to add to the <emphasis>editor/widgetfactory.cpp</emphasis> as well:
#include "mywidget.h" #include "mywidget.h"
... ...
TQWidget *WidgetFactory::createWidget( const TQString &amp;className, TQWidget *parent, const char *name, bool init, TQWidget *WidgetFactory::createWidget( const TQString &amp;className, TQWidget *parent, const char *name, bool init,
const QRect *r, Qt::Orientation orient ) const QRect *r, TQt::Orientation orient )
{ {
... ...
else if (className == "MyWidgetName") else if (className == "MyWidgetName")

@ -262,7 +262,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
} }
if ( currentAction==None ) { if ( currentAction==None ) {
if (e->button()==Qt::RightButton) if (e->button()==TQt::RightButton)
{ {
if ( (currentArea=imageMapEditor->onArea(drawStart)) ) if ( (currentArea=imageMapEditor->onArea(drawStart)) )
{ {
@ -278,7 +278,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
} }
else else
if (e->button()==Qt::MidButton) { if (e->button()==TQt::MidButton) {
contentsMouseDoubleClickEvent(e); contentsMouseDoubleClickEvent(e);
} }
else // LeftClick on selectionpoint else // LeftClick on selectionpoint
@ -420,7 +420,7 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
// the right Button was pressed the Polygon is finished // the right Button was pressed the Polygon is finished
if ((currentArea->selectionPoints()->count()>2) if ((currentArea->selectionPoints()->count()>2)
&& (currentArea->selectionPoints()->first()->contains(drawEnd) && (currentArea->selectionPoints()->first()->contains(drawEnd)
|| (e->button()==Qt::RightButton))) || (e->button()==TQt::RightButton)))
{ {
currentArea->setFinished(true); currentArea->setFinished(true);
currentAction=None; currentAction=None;
@ -849,7 +849,7 @@ void DrawZone::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph
{ {
TQPen pen = TQPen(TQColor("white"),1); TQPen pen = TQPen(TQColor("white"),1);
p2.setRasterOp(TQt::XorROP); p2.setRasterOp(TQt::XorROP);
pen.setStyle(Qt::DotLine); pen.setStyle(TQt::DotLine);
p2.setPen(pen); p2.setPen(pen);
TQRect r( drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y()); TQRect r( drawStart.x(),drawStart.y(),drawCurrent.x()-drawStart.x(),drawCurrent.y()-drawStart.y());

@ -72,19 +72,19 @@ void QDesignerAction::remove()
widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
} }
QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent, QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent,
const char* name ) const char* name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)), connect( parent, TQT_SIGNAL(orientationChanged(TQt::Orientation)),
this, TQT_SLOT(setOrientation(Qt::Orientation)) ); this, TQT_SLOT(setOrientation(TQt::Orientation)) );
setOrientation( o ); setOrientation( o );
setBackgroundMode( parent->backgroundMode() ); setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin ); setBackgroundOrigin( ParentOrigin );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
} }
void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) void QDesignerToolBarSeparator::setOrientation( TQt::Orientation o )
{ {
orient = o; orient = o;
} }
@ -98,7 +98,7 @@ TQSize QDesignerToolBarSeparator::sizeHint() const
{ {
int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
this ); this );
if ( orient ==Qt::Horizontal ) if ( orient ==TQt::Horizontal )
return TQSize( extent, 0 ); return TQSize( extent, 0 );
else else
return TQSize( 0, extent ); return TQSize( 0, extent );
@ -109,7 +109,7 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
TQPainter p( this ); TQPainter p( this );
TQStyle::SFlags flags = TQStyle::Style_Default; TQStyle::SFlags flags = TQStyle::Style_Default;
if ( orientation() ==Qt::Horizontal ) if ( orientation() ==TQt::Horizontal )
flags |= TQStyle::Style_Horizontal; flags |= TQStyle::Style_Horizontal;
style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
@ -226,7 +226,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
return TQToolBar::eventFilter( o, e ); return TQToolBar::eventFilter( o, e );
if ( o == this && e->type() == TQEvent::MouseButtonPress && if ( o == this && e->type() == TQEvent::MouseButtonPress &&
( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) { ( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e ); mousePressEvent( (TQMouseEvent*)e );
return true; return true;
} }
@ -304,7 +304,7 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{ {
widgetInserting = false; widgetInserting = false;
if ( e->button() == Qt::LeftButton && if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) { MainWindow::self->currentTool() != ORDER_TOOL ) {
@ -391,10 +391,10 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{ {
widgetInserting = false; widgetInserting = false;
if ( e->button() == Qt::MidButton ) if ( e->button() == TQt::MidButton )
return; return;
if ( e->button() == Qt::LeftButton && if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) { MainWindow::self->currentTool() != ORDER_TOOL ) {
@ -430,7 +430,7 @@ void QDesignerToolBar::removeWidget( TQWidget *w )
void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
{ {
if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) if ( widgetInserting || ( e->state() & TQt::LeftButton ) == 0 )
return; return;
if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return; return;
@ -583,7 +583,7 @@ void QDesignerToolBar::actionRemoved()
TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
{ {
if ( orientation() ==Qt::Horizontal ) { if ( orientation() ==TQt::Horizontal ) {
TQPoint pnt( width() - 2, 0 ); TQPoint pnt( width() - 2, 0 );
insertAnchor = 0; insertAnchor = 0;
afterAnchor = true; afterAnchor = true;
@ -637,7 +637,7 @@ void QDesignerToolBar::drawIndicator( const TQPoint &pos )
if ( lastIndicatorPos == pos ) if ( lastIndicatorPos == pos )
return; return;
bool wasVsisible = indicator->isVisible(); bool wasVsisible = indicator->isVisible();
if ( orientation() ==Qt::Horizontal ) { if ( orientation() ==TQt::Horizontal ) {
indicator->resize( 3, height() ); indicator->resize( 3, height() );
if ( pos != TQPoint( -1, -1 ) ) if ( pos != TQPoint( -1, -1 ) )
indicator->move( pos.x() - 1, 0 ); indicator->move( pos.x() - 1, 0 );
@ -769,7 +769,7 @@ void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
lastIndicatorPos = TQPoint( -1, -1 ); lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1; insertAt = -1;
mousePressed = true; mousePressed = true;
if ( e->button() == Qt::MidButton || e->button() == Qt::RightButton ) if ( e->button() == TQt::MidButton || e->button() == TQt::RightButton )
return; return;
dragStartPos = e->pos(); dragStartPos = e->pos();
@ -778,7 +778,7 @@ void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e ) void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
{ {
if ( !mousePressed || e->state() == Qt::NoButton ) { if ( !mousePressed || e->state() == TQt::NoButton ) {
TQMenuBar::mouseMoveEvent( e ); TQMenuBar::mouseMoveEvent( e );
return; return;
} }
@ -847,12 +847,12 @@ void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
e->provides( "application/x-designer-actiongroup" ) || e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) ) { e->provides( "application/x-designer-separator" ) ) {
int item = itemAtPos( e->pos() ); int item = itemAtPos( e->pos() );
bool uieffect = TQApplication::isEffectEnabled( Qt::UI_AnimateMenu ); bool uieffect = TQApplication::isEffectEnabled( TQt::UI_AnimateMenu );
TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, false ); TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, false );
if ( !tqApp->activePopupWidget() ) if ( !tqApp->activePopupWidget() )
actItem = -1; actItem = -1;
activateItemAt( item ); activateItemAt( item );
TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, uieffect ); TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, uieffect );
if ( item == -1 ) if ( item == -1 )
hidePopups(); hidePopups();
} else { } else {
@ -977,7 +977,7 @@ void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
{ {
#if defined( TQ_WS_MAC ) //the mac needs us to use context menu rather than right click #if defined( TQ_WS_MAC ) //the mac needs us to use context menu rather than right click
e->accept(); e->accept();
TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), Qt::RightButton, Qt::RightButton ); TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), TQt::RightButton, TQt::RightButton );
mousePressEvent(&me); mousePressEvent(&me);
#else #else
Q_UNUSED( e ); Q_UNUSED( e );
@ -986,10 +986,10 @@ void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e ) void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::MidButton ) if ( e->button() == TQt::MidButton )
return; return;
if ( e->button() == Qt::RightButton ) { if ( e->button() == TQt::RightButton ) {
// A popup for a popup, we only need one, so make sure that // A popup for a popup, we only need one, so make sure that
// we don't create multiple. The timer keeps the event loop sane. // we don't create multiple. The timer keeps the event loop sane.
popupPos = e->globalPos(); popupPos = e->globalPos();
@ -1054,7 +1054,7 @@ void QDesignerPopupMenu::createPopupMenu()
void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e ) void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
{ {
if ( !mousePressed || e->state() == Qt::NoButton ) { if ( !mousePressed || e->state() == TQt::NoButton ) {
TQPopupMenu::mouseMoveEvent( e ); TQPopupMenu::mouseMoveEvent( e );
return; return;
} }

@ -295,7 +295,7 @@ void FormWindow::insertWidget()
return; return;
bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2); bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2);
Qt::Orientation orient =Qt::Horizontal; TQt::Orientation orient =TQt::Horizontal;
TQString n = WidgetDatabase::className(currTool); TQString n = WidgetDatabase::className(currTool);
if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) { if (useSizeHint && (n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar")) {
TQPopupMenu m(mainWindow()); TQPopupMenu m(mainWindow());
@ -303,7 +303,7 @@ void FormWindow::insertWidget()
int ver = m.insertItem(i18n("&Vertical")); int ver = m.insertItem(i18n("&Vertical"));
int r = m.exec(TQCursor::pos()); int r = m.exec(TQCursor::pos());
if (r == ver) if (r == ver)
orient =Qt::Vertical; orient =TQt::Vertical;
} }
TQWidget *w = WidgetFactory::create(currTool, insertParent, 0, true, &currRect, orient); TQWidget *w = WidgetFactory::create(currTool, insertParent, 0, true, &currRect, orient);
@ -540,7 +540,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
tqApp->processEvents(); tqApp->processEvents();
} }
if (((e->state() & ControlButton) || (e->state() & ShiftButton)) && if (((e->state() & ControlButton) || (e->state() & ShiftButton)) &&
sel && e->button() == Qt::LeftButton) sel && e->button() == TQt::LeftButton)
{ // control pressed and selected, unselect widget { // control pressed and selected, unselect widget
selectWidget(TQT_TQOBJECT(w), false); selectWidget(TQT_TQOBJECT(w), false);
break; break;
@ -555,7 +555,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
|| !insertedWidgets.find(w))) || !insertedWidgets.find(w)))
w = w->parentWidget(); w = w->parentWidget();
if (e->button() == Qt::LeftButton) if (e->button() == TQt::LeftButton)
{ // left button: store original geometry and more as the widget might start moving { // left button: store original geometry and more as the widget might start moving
widgetPressed = true; widgetPressed = true;
widgetGeom = TQRect(w->pos(), w->size()); widgetGeom = TQRect(w->pos(), w->size());
@ -574,7 +574,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
} }
else else
{ // press was on the formwindow { // press was on the formwindow
if (e->button() == Qt::LeftButton) if (e->button() == TQt::LeftButton)
{ // left button: start rubber selection and show formwindow properties { // left button: start rubber selection and show formwindow properties
drawRubber = true; drawRubber = true;
if (!((e->state() & ControlButton) || (e->state() & ShiftButton))) if (!((e->state() & ControlButton) || (e->state() & ShiftButton)))
@ -591,7 +591,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
} }
break; break;
case CONNECT_TOOL: case CONNECT_TOOL:
if (e->button() != Qt::LeftButton) if (e->button() != TQt::LeftButton)
break; break;
saveBackground(); saveBackground();
mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name())); mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name()));
@ -625,7 +625,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
} }
break; break;
default: // any insert widget tool default: // any insert widget tool
if (e->button() == Qt::LeftButton) if (e->button() == TQt::LeftButton)
{ {
insertParent = WidgetFactory::containerOfWidget(mainContainer()); insertParent = WidgetFactory::containerOfWidget(mainContainer());
// default parent for new widget is the formwindow // default parent for new widget is the formwindow
@ -685,7 +685,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w) void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{ {
if ((e->state() & Qt::LeftButton) != Qt::LeftButton) if ((e->state() & TQt::LeftButton) != TQt::LeftButton)
return; return;
TQWidget *newReceiver = (TQWidget*)connectReceiver, *oldReceiver = (TQWidget*)connectReceiver, *wid; TQWidget *newReceiver = (TQWidget*)connectReceiver, *oldReceiver = (TQWidget*)connectReceiver, *wid;
@ -822,7 +822,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w) void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{ {
if (e->button() != Qt::LeftButton) if (e->button() != TQt::LeftButton)
return; return;
switch (currTool) switch (currTool)

@ -320,7 +320,7 @@ void HorizontalLayout::doLayout()
} }
if ( layoutBase->inherits( "TQSplitter" ) ) if ( layoutBase->inherits( "TQSplitter" ) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal );
finishLayout( needMove, layout ); finishLayout( needMove, layout );
} }
@ -384,7 +384,7 @@ void VerticalLayout::doLayout()
} }
if ( layoutBase->inherits( "TQSplitter" ) ) if ( layoutBase->inherits( "TQSplitter" ) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical );
finishLayout( needMove, layout ); finishLayout( needMove, layout );
} }
@ -803,7 +803,7 @@ void GridLayout::buildGrid()
Spacer::Spacer( TQWidget *parent, const char *name ) Spacer::Spacer( TQWidget *parent, const char *name )
: TQWidget( parent, name, WMouseNoMask ), : TQWidget( parent, name, WMouseNoMask ),
orient(Qt::Vertical ), interactive(true), sh( TQSize(20,20) ) orient(TQt::Vertical ), interactive(true), sh( TQSize(20,20) )
{ {
setSizeType( Expanding ); setSizeType( Expanding );
setAutoMask( true ); setAutoMask( true );
@ -814,7 +814,7 @@ void Spacer::paintEvent( TQPaintEvent * )
TQPainter p( this ); TQPainter p( this );
p.setPen( TQt::blue ); p.setPen( TQt::blue );
if ( orient ==Qt::Horizontal ) { if ( orient ==TQt::Horizontal ) {
const int dist = 3; const int dist = 3;
const int amplitude = TQMIN( 3, height() / 3 ); const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2; const int base = height() / 2;
@ -853,7 +853,7 @@ void Spacer::resizeEvent( TQResizeEvent* e)
void Spacer::updateMask() void Spacer::updateMask()
{ {
TQRegion r( rect() ); TQRegion r( rect() );
if ( orient ==Qt::Horizontal ) { if ( orient ==TQt::Horizontal ) {
const int amplitude = TQMIN( 3, height() / 3 ); const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2; const int base = height() / 2;
r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) ); r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) );
@ -870,7 +870,7 @@ void Spacer::updateMask()
void Spacer::setSizeType( SizeType t ) void Spacer::setSizeType( SizeType t )
{ {
TQSizePolicy sizeP; TQSizePolicy sizeP;
if ( orient ==Qt::Vertical ) if ( orient ==TQt::Vertical )
sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t ); sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t );
else else
sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum ); sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum );
@ -880,14 +880,14 @@ void Spacer::setSizeType( SizeType t )
Spacer::SizeType Spacer::sizeType() const Spacer::SizeType Spacer::sizeType() const
{ {
if ( orient ==Qt::Vertical ) if ( orient ==TQt::Vertical )
return (SizeType)sizePolicy().verData(); return (SizeType)sizePolicy().verData();
return (SizeType)sizePolicy().horData(); return (SizeType)sizePolicy().horData();
} }
int Spacer::alignment() const int Spacer::alignment() const
{ {
if ( orient ==Qt::Vertical ) if ( orient ==TQt::Vertical )
return AlignHCenter; return AlignHCenter;
return AlignVCenter; return AlignVCenter;
} }
@ -901,7 +901,7 @@ TQSize Spacer::sizeHint() const
{ {
TQSize s = sh.expandedTo( TQSize(0,0) ); TQSize s = sh.expandedTo( TQSize(0,0) );
if ( sizeType() == Expanding ) if ( sizeType() == Expanding )
if ( orient ==Qt::Horizontal ) if ( orient ==TQt::Horizontal )
s.rheight() = 0; s.rheight() = 0;
else else
s.rwidth() = 0; s.rwidth() = 0;
@ -917,12 +917,12 @@ void Spacer::setSizeHint( const TQSize &s )
updateGeometry(); updateGeometry();
} }
Qt::Orientation Spacer::orientation() const TQt::Orientation Spacer::orientation() const
{ {
return orient; return orient;
} }
void Spacer::setOrientation( Qt::Orientation o ) void Spacer::setOrientation( TQt::Orientation o )
{ {
if ( orient == o ) if ( orient == o )
return; return;

@ -561,7 +561,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
} }
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
if (((TQMouseEvent*)e)->button() == Qt::MidButton && dynamic_cast<KommanderWidget *>(o)) if (((TQMouseEvent*)e)->button() == TQt::MidButton && dynamic_cast<KommanderWidget *>(o))
{ {
AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager, AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager,
this, "AssocTextEditor", false); //deletes itself! this, "AssocTextEditor", false); //deletes itself!

@ -891,13 +891,13 @@ void PropertyDateItem::setValue( const TQVariant &v )
lined()->setDate( v.toDate() ); lined()->setDate( v.toDate() );
lined()->blockSignals( false ); lined()->blockSignals( false );
} }
setText( 1, v.toDate().toString( ::Qt::ISODate ) ); setText( 1, v.toDate().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v ); PropertyItem::setValue( v );
} }
void PropertyDateItem::setValue() void PropertyDateItem::setValue()
{ {
setText( 1, lined()->date().toString( ::Qt::ISODate ) ); setText( 1, lined()->date().toString( ::TQt::ISODate ) );
TQVariant v; TQVariant v;
v = lined()->date(); v = lined()->date();
PropertyItem::setValue( v ); PropertyItem::setValue( v );
@ -966,13 +966,13 @@ void PropertyTimeItem::setValue( const TQVariant &v )
lined()->setTime( v.toTime() ); lined()->setTime( v.toTime() );
lined()->blockSignals( false ); lined()->blockSignals( false );
} }
setText( 1, v.toTime().toString( ::Qt::ISODate ) ); setText( 1, v.toTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v ); PropertyItem::setValue( v );
} }
void PropertyTimeItem::setValue() void PropertyTimeItem::setValue()
{ {
setText( 1, lined()->time().toString( ::Qt::ISODate ) ); setText( 1, lined()->time().toString( ::TQt::ISODate ) );
TQVariant v; TQVariant v;
v = lined()->time(); v = lined()->time();
PropertyItem::setValue( v ); PropertyItem::setValue( v );
@ -1041,13 +1041,13 @@ void PropertyDateTimeItem::setValue( const TQVariant &v )
lined()->setDateTime( v.toDateTime() ); lined()->setDateTime( v.toDateTime() );
lined()->blockSignals( false ); lined()->blockSignals( false );
} }
setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); setText( 1, v.toDateTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v ); PropertyItem::setValue( v );
} }
void PropertyDateTimeItem::setValue() void PropertyDateTimeItem::setValue()
{ {
setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); setText( 1, lined()->dateTime().toString( ::TQt::ISODate ) );
TQVariant v; TQVariant v;
v = lined()->dateTime(); v = lined()->dateTime();
PropertyItem::setValue( v ); PropertyItem::setValue( v );
@ -2957,7 +2957,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
break; break;
case TQEvent::MouseMove: case TQEvent::MouseMove:
me = (TQMouseEvent*)e; me = (TQMouseEvent*)e;
if ( me && me->state() & Qt::LeftButton && mousePressed) { if ( me && me->state() & TQt::LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() ); i = (PropertyListItem*) itemAt( me->pos() );
if( i && i == pressItem ) { if( i && i == pressItem ) {

@ -538,7 +538,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
w->move( x, y ); w->move( x, y );
formwindow->selectWidget( TQT_TQOBJECT(w) ); formwindow->selectWidget( TQT_TQOBJECT(w) );
} else if ( firstWidget.tagName() == "spacer" ) { } else if ( firstWidget.tagName() == "spacer" ) {
TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal );
if ( !w ) if ( !w )
continue; continue;
widgets.append( w ); widgets.append( w );
@ -1370,7 +1370,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
while ( !n.isNull() ) { while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) { if ( n.tagName() == "spacer" ) {
createSpacer( n, w, layout, Qt::Horizontal ); createSpacer( n, w, layout, TQt::Horizontal );
} else if ( n.tagName() == "widget" ) { } else if ( n.tagName() == "widget" ) {
createObject( n, w, layout ); createObject( n, w, layout );
} else if ( n.tagName() == "hbox" ) { } else if ( n.tagName() == "hbox" ) {
@ -1596,7 +1596,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} }
} }
TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, TQt::Orientation o )
{ {
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt(); int row = e.attribute( "row" ).toInt();

@ -102,7 +102,7 @@ void SizeHandle::paintEvent( TQPaintEvent * )
void SizeHandle::mousePressEvent( TQMouseEvent *e ) void SizeHandle::mousePressEvent( TQMouseEvent *e )
{ {
if ( !widget || e->button() != Qt::LeftButton || !active ) if ( !widget || e->button() != TQt::LeftButton || !active )
return; return;
oldPressPos = e->pos(); oldPressPos = e->pos();
geom = origGeom = TQRect( widget->pos(), widget->size() ); geom = origGeom = TQRect( widget->pos(), widget->size() );
@ -110,7 +110,7 @@ void SizeHandle::mousePressEvent( TQMouseEvent *e )
void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
{ {
if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active ) if ( !widget || ( e->state() & TQt::LeftButton ) != TQt::LeftButton || !active )
return; return;
TQPoint rp = mapFromGlobal( e->globalPos() ); TQPoint rp = mapFromGlobal( e->globalPos() );
TQPoint d = oldPressPos - rp; TQPoint d = oldPressPos - rp;
@ -222,7 +222,7 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
{ {
if ( e->button() != Qt::LeftButton || !active ) if ( e->button() != TQt::LeftButton || !active )
return; return;
formWindow->sizePreview()->hide(); formWindow->sizePreview()->hide();

@ -640,7 +640,7 @@ int EditorToolBox::count() const
created. created.
*/ */
TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, TQt::Orientation orient )
{ {
TQString n = WidgetDatabase::className(id); TQString n = WidgetDatabase::className(id);
//tqDebug("Trying to create '%s'", n.latin1()); //tqDebug("Trying to create '%s'", n.latin1());
@ -705,7 +705,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget; TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical ); gb->setColumnLayout( 0, TQt::Vertical );
gb->layout()->setMargin( 0 ); gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 ); gb->layout()->setSpacing( 0 );
TQLayout *l; TQLayout *l;
@ -834,7 +834,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
*/ */
TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
const TQRect *r, Qt::Orientation orient ) const TQRect *r, TQt::Orientation orient )
{ {
if (className == "TQPushButton") if (className == "TQPushButton")
{ {
@ -1030,9 +1030,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2) if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient); s->setOrientation(orient);
else if (r->width() < r->height()) else if (r->width() < r->height())
s->setOrientation(Qt::Vertical); s->setOrientation(TQt::Vertical);
else else
s->setOrientation(Qt::Horizontal); s->setOrientation(TQt::Horizontal);
return s; return s;
} else if (className == "TQLCDNumber") } else if (className == "TQLCDNumber")
return new TQLCDNumber(parent, name); return new TQLCDNumber(parent, name);
@ -1052,7 +1052,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2) if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient); s->setOrientation(orient);
else if (r->width() > r->height()) else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal); s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s)); MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true); MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s; return s;
@ -1064,7 +1064,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2) if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient); s->setOrientation(orient);
else if (r->width() > r->height()) else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal); s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s)); MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true); MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s; return s;
@ -1087,7 +1087,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2) if (!r->isValid() || r->width() < 2 && r->height() < 2)
l->setOrientation(orient); l->setOrientation(orient);
else if (r->width() < r->height()) else if (r->width() < r->height())
l->setOrientation(Qt::Vertical); l->setOrientation(TQt::Vertical);
return l; return l;
} else if (className == "TQMainWindow") } else if (className == "TQMainWindow")
{ {
@ -1248,7 +1248,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2) if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient); s->setOrientation(orient);
else if (r->width() > r->height()) else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal); s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s)); MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true); MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s; return s;
@ -1282,7 +1282,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
w = ((TQWidgetStack*)w)->visibleWidget(); w = ((TQWidgetStack*)w)->visibleWidget();
if ( w && w->inherits( "TQSplitter" ) ) if ( w && w->inherits( "TQSplitter" ) )
return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; return ( (TQSplitter*)w )->orientation() ==TQt::Horizontal ? HBox : VBox;
if ( !w || !w->layout() ) if ( !w || !w->layout() )
return NoLayout; return NoLayout;

@ -583,7 +583,7 @@ void Workspace::itemDoubleClicked( TQListViewItem *i )
void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
{ {
if ( !i || button != Qt::LeftButton ) if ( !i || button != TQt::LeftButton )
return; return;
closeAutoOpenItems(); closeAutoOpenItems();
@ -699,7 +699,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break; break;
#endif #endif
case OPEN_SOURCE: case OPEN_SOURCE:
itemClicked( Qt::LeftButton, i, pos ); itemClicked( TQt::LeftButton, i, pos );
break; break;
#ifndef KOMMANDER #ifndef KOMMANDER
case REMOVE_FORM: // FIXME case REMOVE_FORM: // FIXME
@ -707,10 +707,10 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break; break;
#endif #endif
case OPEN_FORM: case OPEN_FORM:
itemClicked( Qt::LeftButton, i, pos ); itemClicked( TQt::LeftButton, i, pos );
break; break;
case OPEN_FORM_SOURCE: case OPEN_FORM_SOURCE:
itemClicked( Qt::LeftButton, i, pos ); itemClicked( TQt::LeftButton, i, pos );
break; break;
default: default:
break; break;
@ -764,7 +764,7 @@ void Workspace::bufferChosen( const TQString &buffer )
TQListViewItemIterator it( this ); TQListViewItemIterator it( this );
while ( it.current() ) { while ( it.current() ) {
if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
itemClicked( Qt::LeftButton, it.current(), TQPoint() ); itemClicked( TQt::LeftButton, it.current(), TQPoint() );
break; break;
} }
++it; ++it;

@ -636,7 +636,7 @@ TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, L
if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget; TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical ); gb->setColumnLayout( 0, TQt::Vertical );
gb->layout()->setMargin( 0 ); gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 ); gb->layout()->setSpacing( 0 );
TQLayout *l; TQLayout *l;
@ -844,7 +844,7 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
int rowspan = e.attribute( "rowspan" ).toInt(); int rowspan = e.attribute( "rowspan" ).toInt();
int colspan = e.attribute( "colspan" ).toInt(); int colspan = e.attribute( "colspan" ).toInt();
Qt::Orientation orient = Qt::Horizontal; TQt::Orientation orient = TQt::Horizontal;
int w = 0, h = 0; int w = 0, h = 0;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) { while ( !n.isNull() ) {
@ -852,9 +852,9 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
TQString prop = n.attribute( "name" ); TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) { if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" ) if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
orient = Qt::Horizontal; orient = TQt::Horizontal;
else else
orient = Qt::Vertical; orient = TQt::Vertical;
} else if ( prop == "sizeType" ) { } else if ( prop == "sizeType" ) {
if ( n.firstChild().firstChild().toText().data() == "Fixed" ) if ( n.firstChild().firstChild().toText().data() == "Fixed" )
sizeType = TQSizePolicy::Fixed; sizeType = TQSizePolicy::Fixed;
@ -880,14 +880,14 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
rowspan = 1; rowspan = 1;
if ( colspan < 1 ) if ( colspan < 1 )
colspan = 1; colspan = 1;
TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, TQSpacerItem *item = new TQSpacerItem( w, h, orient == TQt::Horizontal ? sizeType : TQSizePolicy::Minimum,
orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); orient == TQt::Vertical ? sizeType : TQSizePolicy::Minimum );
if ( layout ) { if ( layout ) {
if ( layout->inherits( "TQBoxLayout" ) ) if ( layout->inherits( "TQBoxLayout" ) )
( (TQBoxLayout*)layout )->addItem( item ); ( (TQBoxLayout*)layout )->addItem( item );
else else
( (TQGridLayout*)layout )->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 ); orient == TQt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
} }
} }

@ -76,13 +76,13 @@ void DatePicker::populate()
void DatePicker::setWidgetText(const TQString& a_text) void DatePicker::setWidgetText(const TQString& a_text)
{ {
setDate(TQDate::fromString(a_text, Qt::ISODate)); setDate(TQDate::fromString(a_text, TQt::ISODate));
emit widgetTextChanged(a_text); emit widgetTextChanged(a_text);
} }
TQString DatePicker::widgetText() const TQString DatePicker::widgetText() const
{ {
return date().toString(Qt::ISODate); return date().toString(TQt::ISODate);
} }
@ -108,9 +108,9 @@ TQString DatePicker::handleDCOP(int function, const TQStringList& args)
{ {
switch (function) { switch (function) {
case DCOP::text: case DCOP::text:
return date().toString(Qt::ISODate); return date().toString(TQt::ISODate);
case DCOP::setText: case DCOP::setText:
setDate(TQDate::fromString(args[0], Qt::ISODate)); setDate(TQDate::fromString(args[0], TQt::ISODate));
break; break;
case DCOP::geometry: case DCOP::geometry:
{ {

@ -94,7 +94,7 @@ KXsldbgPart::KXsldbgPart( TQWidget *parentWidget, const char * /*widgetName*/,
newEvaluate = new TQLineEdit(h); newEvaluate = new TQLineEdit(h);
evaluateBtn = new TQPushButton(i18n("Evaluate"), h); evaluateBtn = new TQPushButton(i18n("Evaluate"), h);
TQSplitter *splitter = new TQSplitter(Qt::Vertical, frame); TQSplitter *splitter = new TQSplitter(TQt::Vertical, frame);
mainView = new TQWidgetStack(splitter); mainView = new TQWidgetStack(splitter);
mainView->setMinimumHeight(400); //## TODO don't use a magic number mainView->setMinimumHeight(400); //## TODO don't use a magic number
outputview = new XsldbgOutputView(splitter); outputview = new XsldbgOutputView(splitter);

@ -925,7 +925,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
{ {
if (!parent()) return 0; if (!parent()) return 0;
if (!parent()->inherits("KDockSplitter")) return 0; if (!parent()->inherits("KDockSplitter")) return 0;
Qt::Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ?Qt::Vertical:Qt::Horizontal; TQt::Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ?TQt::Vertical:TQt::Horizontal;
if (((KDockSplitter*)(parent()))->orientation()==orientation) if (((KDockSplitter*)(parent()))->orientation()==orientation)
{ {
KDockWidget *neighbor= KDockWidget *neighbor=
@ -1146,8 +1146,8 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
// if to dock not to the center of the target dockwidget, // if to dock not to the center of the target dockwidget,
// dock to newDock // dock to newDock
KDockSplitter* panner = 0L; KDockSplitter* panner = 0L;
if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_",Qt::Horizontal, spliPos, manager->splitterHighResolution() ); if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_",TQt::Horizontal, spliPos, manager->splitterHighResolution() );
if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_",Qt::Vertical , spliPos, manager->splitterHighResolution() ); if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_",TQt::Vertical , spliPos, manager->splitterHighResolution() );
newDock->setWidget( panner ); newDock->setWidget( panner );
panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setOpaqueResize(manager->splitterOpaqueResize());
@ -1331,13 +1331,13 @@ void KDockWidget::undock()
split->deactivate(); split->deactivate();
if ( split->getFirst() == parentOfTab ){ if ( split->getFirst() == parentOfTab ){
split->activate( lastTab ); split->activate( lastTab );
if ( ((KDockWidget*)split->parent())->splitterOrientation ==Qt::Vertical ) if ( ((KDockWidget*)split->parent())->splitterOrientation ==TQt::Vertical )
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft ); emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft );
else else
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop ); emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop );
} else { } else {
split->activate( 0L, lastTab ); split->activate( 0L, lastTab );
if ( ((KDockWidget*)split->parent())->splitterOrientation ==Qt::Vertical ) if ( ((KDockWidget*)split->parent())->splitterOrientation ==TQt::Vertical )
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight ); emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight );
else else
emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom ); emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom );
@ -1703,7 +1703,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( ((TQMouseEvent*)event)->button() == TQt::LeftButton ){
if ( curdw->eDocking != (int)KDockWidget::DockNone ){ if ( curdw->eDocking != (int)KDockWidget::DockNone ){
dropCancel = true; dropCancel = true;
curdw->setFocus(); curdw->setFocus();
@ -1728,7 +1728,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
} }
break; break;
case TQEvent::MouseButtonRelease: case TQEvent::MouseButtonRelease:
if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ if ( ((TQMouseEvent*)event)->button() == TQt::LeftButton ){
if ( dragging ){ if ( dragging ){
if ( !dropCancel ) if ( !dropCancel )
drop(); drop();
@ -1806,7 +1806,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event )
if (d->readyToDrag) { if (d->readyToDrag) {
d->readyToDrag = false; d->readyToDrag = false;
} }
if ( (((TQMouseEvent*)event)->state() == Qt::LeftButton) && if ( (((TQMouseEvent*)event)->state() == TQt::LeftButton) &&
(curdw->eDocking != (int)KDockWidget::DockNone) ) { (curdw->eDocking != (int)KDockWidget::DockNone) ) {
startDrag( curdw); startDrag( curdw);
} }
@ -2350,7 +2350,7 @@ void KDockManager::readConfig(TQDomElement &base)
KDockWidget *second = getDockWidgetFromName(secondName); KDockWidget *second = getDockWidgetFromName(secondName);
if (first && second) { if (first && second) {
obj = first->manualDock(second, obj = first->manualDock(second,
(orientation == (int)Qt::Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop, (orientation == (int)TQt::Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop,
separatorPos); separatorPos);
if (obj) if (obj)
obj->setName(name.latin1()); obj->setName(name.latin1());
@ -2705,9 +2705,9 @@ void KDockManager::readConfig( TDEConfig* c, TQString group )
KDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) ); KDockWidget* last = getDockWidgetFromName( c->readEntry( oname + ":last_name" ) );
int sepPos = c->readNumEntry( oname + ":sepPos" ); int sepPos = c->readNumEntry( oname + ":sepPos" );
Qt::Orientation p = (Qt::Orientation)c->readNumEntry( oname + ":orientation" ); TQt::Orientation p = (TQt::Orientation)c->readNumEntry( oname + ":orientation" );
if ( first && last ){ if ( first && last ){
obj = first->manualDock( last, ( p ==Qt::Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos ); obj = first->manualDock( last, ( p ==TQt::Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos );
if (obj){ if (obj){
obj->setName( oname.latin1() ); obj->setName( oname.latin1() );
} }

@ -26,7 +26,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tqapplication.h> #include <tqapplication.h>
KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, Qt::Orientation orient, int pos, bool highResolution) KDockSplitter::KDockSplitter(TQWidget *parent, const char *name, TQt::Orientation orient, int pos, bool highResolution)
: TQWidget(parent, name) : TQWidget(parent, name)
{ {
m_dontRecalc=false; m_dontRecalc=false;
@ -59,7 +59,7 @@ void KDockSplitter::activate(TQWidget *c0, TQWidget *c1)
divider->setLineWidth(1); divider->setLineWidth(1);
divider->raise(); divider->raise();
if (m_orientation ==Qt::Horizontal) if (m_orientation ==TQt::Horizontal)
divider->setCursor(TQCursor(sizeVerCursor)); divider->setCursor(TQCursor(sizeVerCursor));
else else
divider->setCursor(TQCursor(sizeHorCursor)); divider->setCursor(TQCursor(sizeHorCursor));
@ -179,7 +179,7 @@ void KDockSplitter::setupMinMaxSize()
{ {
// Set the minimum and maximum sizes // Set the minimum and maximum sizes
int minx, maxx, miny, maxy; int minx, maxx, miny, maxy;
if (m_orientation ==Qt::Horizontal) { if (m_orientation ==TQt::Horizontal) {
miny = child0->minimumSize().height() + child1->minimumSize().height()+4; miny = child0->minimumSize().height() + child1->minimumSize().height()+4;
maxy = child0->maximumSize().height() + child1->maximumSize().height()+4; maxy = child0->maximumSize().height() + child1->maximumSize().height()+4;
minx = (child0->minimumSize().width() > child1->minimumSize().width()) ? child0->minimumSize().width() : child1->minimumSize().width(); minx = (child0->minimumSize().width() > child1->minimumSize().width()) ? child0->minimumSize().width() : child1->minimumSize().width();
@ -238,11 +238,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
double factor = (mHighResolution)? 10000.0:100.0; double factor = (mHighResolution)? 10000.0:100.0;
// real resize event, recalculate xpos // real resize event, recalculate xpos
if (ev && mKeepSize && isVisible()) { if (ev && mKeepSize && isVisible()) {
// kdDebug(282)<<"mKeepSize : "<< ((m_orientation ==Qt::Horizontal) ? "Horizontal":"Vertical") <<endl; // kdDebug(282)<<"mKeepSize : "<< ((m_orientation ==TQt::Horizontal) ? "Horizontal":"Vertical") <<endl;
if (ev->oldSize().width() != ev->size().width()) if (ev->oldSize().width() != ev->size().width())
{ {
if (m_orientation ==Qt::Horizontal) { if (m_orientation ==TQt::Horizontal) {
xpos = tqRound(factor * checkValue( child0->height()+1 ) / height()); xpos = tqRound(factor * checkValue( child0->height()+1 ) / height());
} else { } else {
xpos = tqRound(factor * checkValue( child0->width()+1 ) / width()); xpos = tqRound(factor * checkValue( child0->width()+1 ) / width());
@ -252,9 +252,9 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
} }
else else
{ {
// kdDebug(282)<<"!mKeepSize : "<< ((m_orientation ==Qt::Horizontal) ? "Horizontal":"Vertical") <<endl; // kdDebug(282)<<"!mKeepSize : "<< ((m_orientation ==TQt::Horizontal) ? "Horizontal":"Vertical") <<endl;
if (/*ev &&*/ isVisible()) { if (/*ev &&*/ isVisible()) {
if (m_orientation ==Qt::Horizontal) { if (m_orientation ==TQt::Horizontal) {
/* if (ev->oldSize().height() != ev->size().height())*/ /* if (ev->oldSize().height() != ev->size().height())*/
{ {
if (fixedHeight0!=-1) if (fixedHeight0!=-1)
@ -287,15 +287,15 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
KDockWidget *c0=(KDockWidget*)child0; KDockWidget *c0=(KDockWidget*)child0;
KDockWidget *c1=(KDockWidget*)child1; KDockWidget *c1=(KDockWidget*)child1;
bool stdHandling=false; bool stdHandling=false;
if ( ( (m_orientation==Qt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) || if ( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) ||
( (m_orientation==Qt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) { ( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) {
if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget())) if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget()))
&& (dc->m_overlapMode)) { && (dc->m_overlapMode)) {
int position= tqRound((m_orientation ==Qt::Vertical ? width() : height()) * xpos/factor); int position= tqRound((m_orientation ==TQt::Vertical ? width() : height()) * xpos/factor);
position=checkValueOverlapped(position,child0); position=checkValueOverlapped(position,child0);
child0->raise(); child0->raise();
divider->raise(); divider->raise();
if (m_orientation ==Qt::Horizontal){ if (m_orientation ==TQt::Horizontal){
child0->setGeometry(0, 0, width(), position); child0->setGeometry(0, 0, width(), position);
child1->setGeometry(0, dc->m_nonOverlapSize+4, width(), child1->setGeometry(0, dc->m_nonOverlapSize+4, width(),
height()-dc->m_nonOverlapSize-4); height()-dc->m_nonOverlapSize-4);
@ -309,11 +309,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
} else { } else {
if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget())) if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))
&& (dc->m_overlapMode)) { && (dc->m_overlapMode)) {
int position= tqRound((m_orientation ==Qt::Vertical ? width() : height()) * xpos/factor); int position= tqRound((m_orientation ==TQt::Vertical ? width() : height()) * xpos/factor);
position=checkValueOverlapped(position,child1); position=checkValueOverlapped(position,child1);
child1->raise(); child1->raise();
divider->raise(); divider->raise();
if (m_orientation ==Qt::Horizontal){ if (m_orientation ==TQt::Horizontal){
child0->setGeometry(0, 0, width(), height()-dc->m_nonOverlapSize-4); child0->setGeometry(0, 0, width(), height()-dc->m_nonOverlapSize-4);
child1->setGeometry(0, position+4, width(), child1->setGeometry(0, position+4, width(),
height()-position-4); height()-position-4);
@ -331,8 +331,8 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
else stdHandling=true; else stdHandling=true;
if (stdHandling) { if (stdHandling) {
int position = checkValue( tqRound((m_orientation ==Qt::Vertical ? width() : height()) * xpos/factor) ); int position = checkValue( tqRound((m_orientation ==TQt::Vertical ? width() : height()) * xpos/factor) );
if (m_orientation ==Qt::Horizontal){ if (m_orientation ==TQt::Horizontal){
child0->setGeometry(0, 0, width(), position); child0->setGeometry(0, 0, width(), position);
child1->setGeometry(0, position+4, width(), height()-position-4); child1->setGeometry(0, position+4, width(), height()-position-4);
divider->setGeometry(0, position, width(), 4); divider->setGeometry(0, position, width(), 4);
@ -349,7 +349,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const { int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const {
if (initialised) { if (initialised) {
if (m_orientation ==Qt::Vertical) { if (m_orientation ==TQt::Vertical) {
if (child0==overlappingWidget) { if (child0==overlappingWidget) {
if (position<(child0->minimumSize().width())) if (position<(child0->minimumSize().width()))
position=child0->minimumSize().width(); position=child0->minimumSize().width();
@ -358,7 +358,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge
position=width()-(child1->minimumSize().width())-4; position=width()-(child1->minimumSize().width())-4;
if (position<0) position=0; if (position<0) position=0;
} }
} else {// orientation ==Qt::Horizontal } else {// orientation ==TQt::Horizontal
if (child0==overlappingWidget) { if (child0==overlappingWidget) {
if (position<(child0->minimumSize().height())) if (position<(child0->minimumSize().height()))
position=child0->minimumSize().height(); position=child0->minimumSize().height();
@ -377,7 +377,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge
int KDockSplitter::checkValue( int position ) const int KDockSplitter::checkValue( int position ) const
{ {
if (initialised){ if (initialised){
if (m_orientation ==Qt::Vertical){ if (m_orientation ==TQt::Vertical){
if (position < (child0->minimumSize().width())) if (position < (child0->minimumSize().width()))
position = child0->minimumSize().width(); position = child0->minimumSize().width();
if ((width()-4-position) < (child1->minimumSize().width())) if ((width()-4-position) < (child1->minimumSize().width()))
@ -392,9 +392,9 @@ int KDockSplitter::checkValue( int position ) const
if (position < 0) position = 0; if (position < 0) position = 0;
if ((m_orientation ==Qt::Vertical) && (position > width())) if ((m_orientation ==TQt::Vertical) && (position > width()))
position = width(); position = width();
if ((m_orientation ==Qt::Horizontal) && (position > height())) if ((m_orientation ==TQt::Horizontal) && (position > height()))
position = height(); position = height();
return position; return position;
@ -411,7 +411,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
mev= (TQMouseEvent*)e; mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize); child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize);
if (m_orientation ==Qt::Horizontal) { if (m_orientation ==TQt::Horizontal) {
if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{ {
handled=true; break; handled=true; break;
@ -445,7 +445,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e)
child0->setUpdatesEnabled(true); child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true); child1->setUpdatesEnabled(true);
mev= (TQMouseEvent*)e; mev= (TQMouseEvent*)e;
if (m_orientation ==Qt::Horizontal){ if (m_orientation ==TQt::Horizontal){
if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) if ((fixedHeight0!=-1) || (fixedHeight1!=-1))
{ {
handled=true; break; handled=true; break;

@ -87,7 +87,7 @@ void KTabBar::setTabEnabled( int id, bool enabled )
void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e ) void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e )
{ {
if( e->button() != Qt::LeftButton ) if( e->button() != TQt::LeftButton )
return; return;
TQTab *tab = selectTab( e->pos() ); TQTab *tab = selectTab( e->pos() );
@ -100,11 +100,11 @@ void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e )
void KTabBar::mousePressEvent( TQMouseEvent *e ) void KTabBar::mousePressEvent( TQMouseEvent *e )
{ {
if( e->button() == Qt::LeftButton ) { if( e->button() == TQt::LeftButton ) {
mEnableCloseButtonTimer->stop(); mEnableCloseButtonTimer->stop();
mDragStart = e->pos(); mDragStart = e->pos();
} }
else if( e->button() == Qt::RightButton ) { else if( e->button() == TQt::RightButton ) {
TQTab *tab = selectTab( e->pos() ); TQTab *tab = selectTab( e->pos() );
if( tab ) { if( tab ) {
emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) ); emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) );
@ -116,7 +116,7 @@ void KTabBar::mousePressEvent( TQMouseEvent *e )
void KTabBar::mouseMoveEvent( TQMouseEvent *e ) void KTabBar::mouseMoveEvent( TQMouseEvent *e )
{ {
if ( e->state() == Qt::LeftButton ) { if ( e->state() == TQt::LeftButton ) {
TQTab *tab = selectTab( e->pos() ); TQTab *tab = selectTab( e->pos() );
if ( mDragSwitchTab && tab != mDragSwitchTab ) { if ( mDragSwitchTab && tab != mDragSwitchTab ) {
mActivateDragSwitchTabTimer->stop(); mActivateDragSwitchTabTimer->stop();
@ -134,7 +134,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e )
} }
} }
} }
else if ( e->state() == Qt::MidButton ) { else if ( e->state() == TQt::MidButton ) {
if (mReorderStartTab==-1) { if (mReorderStartTab==-1) {
int delay = TDEGlobalSettings::dndEventDelay(); int delay = TDEGlobalSettings::dndEventDelay();
TQPoint newPos = e->pos(); TQPoint newPos = e->pos();
@ -229,7 +229,7 @@ void KTabBar::activateDragSwitchTab()
void KTabBar::mouseReleaseEvent( TQMouseEvent *e ) void KTabBar::mouseReleaseEvent( TQMouseEvent *e )
{ {
if( e->button() == Qt::MidButton ) { if( e->button() == TQt::MidButton ) {
if ( mReorderStartTab==-1 ) { if ( mReorderStartTab==-1 ) {
TQTab *tab = selectTab( e->pos() ); TQTab *tab = selectTab( e->pos() );
if( tab ) { if( tab ) {
@ -281,7 +281,7 @@ void KTabBar::dropEvent( TQDropEvent *e )
#ifndef TQT_NO_WHEELEVENT #ifndef TQT_NO_WHEELEVENT
void KTabBar::wheelEvent( TQWheelEvent *e ) void KTabBar::wheelEvent( TQWheelEvent *e )
{ {
if ( e->orientation() ==Qt::Horizontal ) if ( e->orientation() ==TQt::Horizontal )
return; return;
emit( wheelDelta( e->delta() ) ); emit( wheelDelta( e->delta() ) );

@ -316,7 +316,7 @@ void KTabWidget::dropEvent( TQDropEvent *e )
#ifndef TQT_NO_WHEELEVENT #ifndef TQT_NO_WHEELEVENT
void KTabWidget::wheelEvent( TQWheelEvent *e ) void KTabWidget::wheelEvent( TQWheelEvent *e )
{ {
if ( e->orientation() ==Qt::Horizontal ) if ( e->orientation() ==TQt::Horizontal )
return; return;
if ( isEmptyTabbarSpace( e->pos() ) ) if ( isEmptyTabbarSpace( e->pos() ) )
@ -344,7 +344,7 @@ void KTabWidget::wheelDelta( int delta )
void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e ) void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
{ {
if( e->button() != Qt::LeftButton ) if( e->button() != TQt::LeftButton )
return; return;
if ( isEmptyTabbarSpace( e->pos() ) ) { if ( isEmptyTabbarSpace( e->pos() ) ) {
@ -356,12 +356,12 @@ void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e )
void KTabWidget::mousePressEvent( TQMouseEvent *e ) void KTabWidget::mousePressEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::RightButton ) { if ( e->button() == TQt::RightButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) { if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( contextMenu( mapToGlobal( e->pos() ) ) ); emit( contextMenu( mapToGlobal( e->pos() ) ) );
return; return;
} }
} else if ( e->button() == Qt::MidButton ) { } else if ( e->button() == TQt::MidButton ) {
if ( isEmptyTabbarSpace( e->pos() ) ) { if ( isEmptyTabbarSpace( e->pos() ) ) {
emit( mouseMiddleClick() ); emit( mouseMiddleClick() );
return; return;

@ -249,7 +249,7 @@ void KMdiChildArea::resizeEvent( TQResizeEvent* e )
void KMdiChildArea::mousePressEvent( TQMouseEvent *e ) void KMdiChildArea::mousePressEvent( TQMouseEvent *e )
{ {
//Popup the window menu //Popup the window menu
if ( e->button() & Qt::RightButton ) if ( e->button() & TQt::RightButton )
emit popupWindowMenu( mapToGlobal( e->pos() ) ); emit popupWindowMenu( mapToGlobal( e->pos() ) );
} }

@ -283,7 +283,7 @@ void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e )
if ( m_bResizing ) if ( m_bResizing )
{ {
if ( !( e->state() & Qt::RightButton ) && !( e->state() & Qt::MidButton ) ) if ( !( e->state() & TQt::RightButton ) && !( e->state() & TQt::MidButton ) )
{ {
// same as: if no button or left button pressed // same as: if no button or left button pressed
TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() ); TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() );

@ -85,7 +85,7 @@ KMdiChildFrmCaption::~KMdiChildFrmCaption()
void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e ) void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::LeftButton ) if ( e->button() == TQt::LeftButton )
{ {
setMouseTracking( false ); setMouseTracking( false );
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
@ -95,7 +95,7 @@ void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
m_pParent->m_bDragging = true; m_pParent->m_bDragging = true;
m_offset = mapToParent( e->pos() ); m_offset = mapToParent( e->pos() );
} }
else if ( e->button() == Qt::RightButton ) else if ( e->button() == TQt::RightButton )
{ {
m_pParent->systemMenu()->popup( mapToGlobal( e->pos() ) ); m_pParent->systemMenu()->popup( mapToGlobal( e->pos() ) );
} }
@ -105,7 +105,7 @@ void KMdiChildFrmCaption::mousePressEvent( TQMouseEvent *e )
void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e ) void KMdiChildFrmCaption::mouseReleaseEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::LeftButton ) if ( e->button() == TQt::LeftButton )
{ {
if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look ) if ( KMdiMainFrm::frameDecorOfAttachedViews() != KMdi::Win95Look )
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();

@ -73,10 +73,10 @@ void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e )
{ {
switch ( e->button() ) switch ( e->button() )
{ {
case Qt::LeftButton: case TQt::LeftButton:
emit leftMouseButtonClicked( m_pWindow ); emit leftMouseButtonClicked( m_pWindow );
break; break;
case Qt::RightButton: case TQt::RightButton:
emit rightMouseButtonClicked( m_pWindow ); emit rightMouseButtonClicked( m_pWindow );
break; break;
default: default:
@ -359,7 +359,7 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
newButtonWidth = buttonAreaWidth / buttonCount; newButtonWidth = buttonAreaWidth / buttonCount;
else else
newButtonWidth = 0; newButtonWidth = 0;
if ( orientation() == Qt::Vertical ) if ( orientation() == TQt::Vertical )
newButtonWidth = 80; newButtonWidth = 80;
if ( newButtonWidth > 0 ) if ( newButtonWidth > 0 )
for ( b = m_pButtonList->first();b;b = m_pButtonList->next() ) for ( b = m_pButtonList->first();b;b = m_pButtonList->next() )

@ -43,9 +43,9 @@ colorSlider::colorSlider(const TQString& fn,const TQString& l,const TQString& c,
leftLabel->setTextFormat (TQt::RichText ) ; leftLabel->setTextFormat (TQt::RichText ) ;
centerLabel->setTextFormat ( TQt::RichText ) ; centerLabel->setTextFormat ( TQt::RichText ) ;
rightLabel->setTextFormat (TQt::RichText ) ; rightLabel->setTextFormat (TQt::RichText ) ;
m_leftValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); m_leftValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , leftBox);
m_centerValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); m_centerValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , centerBox);
m_rightValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox); m_rightValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , rightBox);
setSpacing(10); setSpacing(10);
connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(int))); connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(int)));
connect(m_centerValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertCenterValue(int))); connect(m_centerValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertCenterValue(int)));

@ -289,8 +289,8 @@ void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* parent){
TQSplitter *splitter = new TQSplitter(parent,splitterName.ascii()); TQSplitter *splitter = new TQSplitter(parent,splitterName.ascii());
if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] );
switch( n->splitType() ){ switch( n->splitType() ){
case VERTICAL : splitter->setOrientation(Qt::Horizontal);break; case VERTICAL : splitter->setOrientation(TQt::Horizontal);break;
case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break; case HORIZONTAL : splitter->setOrientation(TQt::Vertical);break;
default:break; default:break;
} }
n->firstChild(); n->firstChild();

@ -657,7 +657,7 @@ bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
kdDebug(25001) << "KafkaWidget::eventFilter() Text - " << kdDebug(25001) << "KafkaWidget::eventFilter() Text - " <<
keyevent->text() << endl; keyevent->text() << endl;
#endif #endif
//if(( keyevent->state() & TQt::ShiftButton) || ( keyevent->state() == Qt::NoButton)) //if(( keyevent->state() & TQt::ShiftButton) || ( keyevent->state() == TQt::NoButton))
if( keyevent->text().length() && if( keyevent->text().length() &&
( !( keyevent->state() & ControlButton ) && ( !( keyevent->state() & ControlButton ) &&
!( keyevent->state() & AltButton ) && !( keyevent->state() & AltButton ) &&
@ -2263,7 +2263,7 @@ void KafkaWidget::applyQueuedToggableTagActions()
{ {
if(tag_action->name() == *it) if(tag_action->name() == *it)
{ {
tag_action->slotActionActivated(TDEAction::EmulatedActivation, Qt::NoButton); tag_action->slotActionActivated(TDEAction::EmulatedActivation, TQt::NoButton);
break; break;
} }
} }

@ -262,7 +262,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true; m_parserEnabled = true;
cursorLine = 0; cursorLine = 0;
cursorCol = 0; cursorCol = 0;
emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString()); emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(TQt::ISODate), TQString());
setAcceptDrops(true); setAcceptDrops(true);
tabWidget()->installEventFilter(this); tabWidget()->installEventFilter(this);
} }
@ -4145,7 +4145,7 @@ bool QuantaApp::queryClose()
{ {
saveOptions(); saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl; // kdDebug(24000) << "Quanta will exit" << endl;
emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString()); emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(TQt::ISODate), TQString());
} else } else
slotFileNew(); slotFileNew();
return canExit; return canExit;

@ -98,7 +98,7 @@ QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &capti
m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus ); m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus );
//create a splitter to separate the VPL and document area //create a splitter to separate the VPL and document area
m_splitter = new TQSplitter(Qt::Vertical, this); m_splitter = new TQSplitter(TQt::Vertical, this);
//place the widgets in a grid //place the widgets in a grid
m_viewLayout = new TQGridLayout(this, 2, 0); m_viewLayout = new TQGridLayout(this, 2, 0);
m_viewLayout->setRowStretch(0, 0); m_viewLayout->setRowStretch(0, 0);

@ -489,7 +489,7 @@ void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQ
setSelected(item, true); setSelected(item, true);
if (button == Qt::RightButton) if (button == TQt::RightButton)
{ {
if (dynamic_cast<StructTreeTag*>(item)) if (dynamic_cast<StructTreeTag*>(item))
{ {
@ -499,7 +499,7 @@ void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQ
return; return;
} }
if (button == Qt::LeftButton) if (button == TQt::LeftButton)
{ {
if (handleLBM == i18n("Find Tag && Open Tree")) if (handleLBM == i18n("Find Tag && Open Tree"))
setOpen(item, !isOpen(item)); setOpen(item, !isOpen(item));
@ -516,7 +516,7 @@ void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQ
slotGotoTag(item); slotGotoTag(item);
} }
if (button == Qt::MidButton) if (button == TQt::MidButton)
{ {
if (handleMBM == i18n("nothing")) if (handleMBM == i18n("nothing"))
return; return;
@ -537,7 +537,7 @@ void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQ
setSelected(item, true); setSelected(item, true);
} }
} else } else
if (button == Qt::RightButton) if (button == TQt::RightButton)
emptyAreaMenu->popup(point); emptyAreaMenu->popup(point);
} }
@ -866,7 +866,7 @@ void StructTreeView::startDrag()
void StructTreeView::contentsMousePressEvent(TQMouseEvent* e) void StructTreeView::contentsMousePressEvent(TQMouseEvent* e)
{ {
if(e->button() == Qt::LeftButton) if(e->button() == TQt::LeftButton)
{ {
TQPoint p = contentsToViewport(e->pos()); TQPoint p = contentsToViewport(e->pos());
m_draggedItem = itemAt(p); m_draggedItem = itemAt(p);

@ -294,7 +294,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
TQTextStream stream(&file); TQTextStream stream(&file);
stream.setEncoding(TQTextStream::UnicodeUTF8); stream.setEncoding(TQTextStream::UnicodeUTF8);
//Note: the log text should not be translated. //Note: the log text should not be translated.
TQString s = TQDateTime::currentDateTime().toString(Qt::ISODate) + ": "; TQString s = TQDateTime::currentDateTime().toString(TQt::ISODate) + ": ";
s.append( "Event : " + m_eventName + " : "); s.append( "Event : " + m_eventName + " : ");
s.append( "Action: " + ev.action + " : "); s.append( "Action: " + ev.action + " : ");
if (ev.arguments[1] == "full") if (ev.arguments[1] == "full")

@ -157,7 +157,7 @@ void ToolbarTabWidget::slotEditToolbar()
void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e ) void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
{ {
if (e->button() == Qt::RightButton) if (e->button() == TQt::RightButton)
{ {
TQPoint p = e->globalPos(); TQPoint p = e->globalPos();
TQTab *tab = 0L; TQTab *tab = 0L;
@ -296,7 +296,7 @@ void QuantaToolBar::slotIconTextChanged(int id)
void QuantaToolBar::mousePressEvent(TQMouseEvent *e) void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
{ {
if (e->button() == Qt::RightButton) if (e->button() == TQt::RightButton)
{ {
m_popupMenu->clear(); m_popupMenu->clear();
TQPoint p = e->globalPos(); TQPoint p = e->globalPos();

Loading…
Cancel
Save