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"
...
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")

@ -262,7 +262,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
}
if ( currentAction==None ) {
if (e->button()==Qt::RightButton)
if (e->button()==TQt::RightButton)
{
if ( (currentArea=imageMapEditor->onArea(drawStart)) )
{
@ -278,7 +278,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
}
else
if (e->button()==Qt::MidButton) {
if (e->button()==TQt::MidButton) {
contentsMouseDoubleClickEvent(e);
}
else // LeftClick on selectionpoint
@ -420,7 +420,7 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
// the right Button was pressed the Polygon is finished
if ((currentArea->selectionPoints()->count()>2)
&& (currentArea->selectionPoints()->first()->contains(drawEnd)
|| (e->button()==Qt::RightButton)))
|| (e->button()==TQt::RightButton)))
{
currentArea->setFinished(true);
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);
p2.setRasterOp(TQt::XorROP);
pen.setStyle(Qt::DotLine);
pen.setStyle(TQt::DotLine);
p2.setPen(pen);
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 );
}
QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent,
QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent,
const char* name )
: TQWidget( parent, name )
{
connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)),
this, TQT_SLOT(setOrientation(Qt::Orientation)) );
connect( parent, TQT_SIGNAL(orientationChanged(TQt::Orientation)),
this, TQT_SLOT(setOrientation(TQt::Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
}
void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o )
void QDesignerToolBarSeparator::setOrientation( TQt::Orientation o )
{
orient = o;
}
@ -98,7 +98,7 @@ TQSize QDesignerToolBarSeparator::sizeHint() const
{
int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
this );
if ( orient ==Qt::Horizontal )
if ( orient ==TQt::Horizontal )
return TQSize( extent, 0 );
else
return TQSize( 0, extent );
@ -109,7 +109,7 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
TQPainter p( this );
TQStyle::SFlags flags = TQStyle::Style_Default;
if ( orientation() ==Qt::Horizontal )
if ( orientation() ==TQt::Horizontal )
flags |= TQStyle::Style_Horizontal;
style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
@ -226,7 +226,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
return TQToolBar::eventFilter( o, e );
if ( o == this && e->type() == TQEvent::MouseButtonPress &&
( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) {
( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
return true;
}
@ -304,7 +304,7 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
widgetInserting = false;
if ( e->button() == Qt::LeftButton &&
if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) {
@ -391,10 +391,10 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
widgetInserting = false;
if ( e->button() == Qt::MidButton )
if ( e->button() == TQt::MidButton )
return;
if ( e->button() == Qt::LeftButton &&
if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) {
@ -430,7 +430,7 @@ void QDesignerToolBar::removeWidget( TQWidget *w )
void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
{
if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 )
if ( widgetInserting || ( e->state() & TQt::LeftButton ) == 0 )
return;
if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
@ -583,7 +583,7 @@ void QDesignerToolBar::actionRemoved()
TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
{
if ( orientation() ==Qt::Horizontal ) {
if ( orientation() ==TQt::Horizontal ) {
TQPoint pnt( width() - 2, 0 );
insertAnchor = 0;
afterAnchor = true;
@ -637,7 +637,7 @@ void QDesignerToolBar::drawIndicator( const TQPoint &pos )
if ( lastIndicatorPos == pos )
return;
bool wasVsisible = indicator->isVisible();
if ( orientation() ==Qt::Horizontal ) {
if ( orientation() ==TQt::Horizontal ) {
indicator->resize( 3, height() );
if ( pos != TQPoint( -1, -1 ) )
indicator->move( pos.x() - 1, 0 );
@ -769,7 +769,7 @@ void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
mousePressed = true;
if ( e->button() == Qt::MidButton || e->button() == Qt::RightButton )
if ( e->button() == TQt::MidButton || e->button() == TQt::RightButton )
return;
dragStartPos = e->pos();
@ -778,7 +778,7 @@ void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( !mousePressed || e->state() == Qt::NoButton ) {
if ( !mousePressed || e->state() == TQt::NoButton ) {
TQMenuBar::mouseMoveEvent( e );
return;
}
@ -847,12 +847,12 @@ void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) ) {
int item = itemAtPos( e->pos() );
bool uieffect = TQApplication::isEffectEnabled( Qt::UI_AnimateMenu );
TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, false );
bool uieffect = TQApplication::isEffectEnabled( TQt::UI_AnimateMenu );
TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, false );
if ( !tqApp->activePopupWidget() )
actItem = -1;
activateItemAt( item );
TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, uieffect );
TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, uieffect );
if ( item == -1 )
hidePopups();
} 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
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);
#else
Q_UNUSED( e );
@ -986,10 +986,10 @@ void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == Qt::MidButton )
if ( e->button() == TQt::MidButton )
return;
if ( e->button() == Qt::RightButton ) {
if ( e->button() == TQt::RightButton ) {
// 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.
popupPos = e->globalPos();
@ -1054,7 +1054,7 @@ void QDesignerPopupMenu::createPopupMenu()
void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
{
if ( !mousePressed || e->state() == Qt::NoButton ) {
if ( !mousePressed || e->state() == TQt::NoButton ) {
TQPopupMenu::mouseMoveEvent( e );
return;
}

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

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

@ -561,7 +561,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
}
break;
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,
this, "AssocTextEditor", false); //deletes itself!

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

@ -538,7 +538,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
w->move( x, y );
formwindow->selectWidget( TQT_TQOBJECT(w) );
} 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 )
continue;
widgets.append( w );
@ -1370,7 +1370,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
createSpacer( n, w, layout, Qt::Horizontal );
createSpacer( n, w, layout, TQt::Horizontal );
} else if ( n.tagName() == "widget" ) {
createObject( n, w, layout );
} 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();
int row = e.attribute( "row" ).toInt();

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

@ -640,7 +640,7 @@ int EditorToolBox::count() const
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);
//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" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
gb->setColumnLayout( 0, TQt::Vertical );
gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 );
TQLayout *l;
@ -834,7 +834,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
*/
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")
{
@ -1030,9 +1030,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() < r->height())
s->setOrientation(Qt::Vertical);
s->setOrientation(TQt::Vertical);
else
s->setOrientation(Qt::Horizontal);
s->setOrientation(TQt::Horizontal);
return s;
} else if (className == "TQLCDNumber")
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)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
@ -1064,7 +1064,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
@ -1087,7 +1087,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if (!r->isValid() || r->width() < 2 && r->height() < 2)
l->setOrientation(orient);
else if (r->width() < r->height())
l->setOrientation(Qt::Vertical);
l->setOrientation(TQt::Vertical);
return l;
} 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)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
s->setOrientation(TQt::Horizontal);
MetaDataBase::addEntry(TQT_TQOBJECT(s));
MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
@ -1282,7 +1282,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
w = ((TQWidgetStack*)w)->visibleWidget();
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() )
return NoLayout;

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

@ -636,7 +636,7 @@ TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, L
if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
gb->setColumnLayout( 0, TQt::Vertical );
gb->layout()->setMargin( 0 );
gb->layout()->setSpacing( 0 );
TQLayout *l;
@ -844,7 +844,7 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
int rowspan = e.attribute( "rowspan" ).toInt();
int colspan = e.attribute( "colspan" ).toInt();
Qt::Orientation orient = Qt::Horizontal;
TQt::Orientation orient = TQt::Horizontal;
int w = 0, h = 0;
TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred;
while ( !n.isNull() ) {
@ -852,9 +852,9 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
TQString prop = n.attribute( "name" );
if ( prop == "orientation" ) {
if ( n.firstChild().firstChild().toText().data() == "Horizontal" )
orient = Qt::Horizontal;
orient = TQt::Horizontal;
else
orient = Qt::Vertical;
orient = TQt::Vertical;
} else if ( prop == "sizeType" ) {
if ( n.firstChild().firstChild().toText().data() == "Fixed" )
sizeType = TQSizePolicy::Fixed;
@ -880,14 +880,14 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
rowspan = 1;
if ( colspan < 1 )
colspan = 1;
TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
TQSpacerItem *item = new TQSpacerItem( w, h, orient == TQt::Horizontal ? sizeType : TQSizePolicy::Minimum,
orient == TQt::Vertical ? sizeType : TQSizePolicy::Minimum );
if ( layout ) {
if ( layout->inherits( "TQBoxLayout" ) )
( (TQBoxLayout*)layout )->addItem( item );
else
( (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)
{
setDate(TQDate::fromString(a_text, Qt::ISODate));
setDate(TQDate::fromString(a_text, TQt::ISODate));
emit widgetTextChanged(a_text);
}
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) {
case DCOP::text:
return date().toString(Qt::ISODate);
return date().toString(TQt::ISODate);
case DCOP::setText:
setDate(TQDate::fromString(args[0], Qt::ISODate));
setDate(TQDate::fromString(args[0], TQt::ISODate));
break;
case DCOP::geometry:
{

@ -94,7 +94,7 @@ KXsldbgPart::KXsldbgPart( TQWidget *parentWidget, const char * /*widgetName*/,
newEvaluate = new TQLineEdit(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->setMinimumHeight(400); //## TODO don't use a magic number
outputview = new XsldbgOutputView(splitter);

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

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

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

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

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

@ -283,7 +283,7 @@ void KMdiChildFrm::mouseMoveEvent( TQMouseEvent *e )
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
TQPoint p = parentWidget()->mapFromGlobal( e->globalPos() );

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

@ -73,10 +73,10 @@ void KMdiTaskBarButton::mousePressEvent( TQMouseEvent* e )
{
switch ( e->button() )
{
case Qt::LeftButton:
case TQt::LeftButton:
emit leftMouseButtonClicked( m_pWindow );
break;
case Qt::RightButton:
case TQt::RightButton:
emit rightMouseButtonClicked( m_pWindow );
break;
default:
@ -359,7 +359,7 @@ void KMdiTaskBar::layoutTaskBar( int taskBarWidth )
newButtonWidth = buttonAreaWidth / buttonCount;
else
newButtonWidth = 0;
if ( orientation() == Qt::Vertical )
if ( orientation() == TQt::Vertical )
newButtonWidth = 80;
if ( newButtonWidth > 0 )
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 ) ;
centerLabel->setTextFormat ( TQt::RichText ) ;
rightLabel->setTextFormat (TQt::RichText ) ;
m_leftValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox);
m_centerValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox);
m_rightValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox);
m_leftValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , leftBox);
m_centerValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , centerBox);
m_rightValue = new TQSlider ( 0, 255, 1, 0, TQt::Horizontal , rightBox);
setSpacing(10);
connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(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());
if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] );
switch( n->splitType() ){
case VERTICAL : splitter->setOrientation(Qt::Horizontal);break;
case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break;
case VERTICAL : splitter->setOrientation(TQt::Horizontal);break;
case HORIZONTAL : splitter->setOrientation(TQt::Vertical);break;
default:break;
}
n->firstChild();

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

@ -262,7 +262,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 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);
tabWidget()->installEventFilter(this);
}
@ -4145,7 +4145,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// 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
slotFileNew();
return canExit;

@ -98,7 +98,7 @@ QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &capti
m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus );
//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
m_viewLayout = new TQGridLayout(this, 2, 0);
m_viewLayout->setRowStretch(0, 0);

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

@ -294,7 +294,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
TQTextStream stream(&file);
stream.setEncoding(TQTextStream::UnicodeUTF8);
//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( "Action: " + ev.action + " : ");
if (ev.arguments[1] == "full")

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

Loading…
Cancel
Save