summaryrefslogtreecommitdiffstats
path: root/kommander/editor/sizehandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/sizehandle.cpp')
-rw-r--r--kommander/editor/sizehandle.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp
index 937d33bc..a5ebe0ec 100644
--- a/kommander/editor/sizehandle.cpp
+++ b/kommander/editor/sizehandle.cpp
@@ -18,20 +18,20 @@
**
**********************************************************************/
-#include <qvariant.h> // HP-UX compiler needs this here
+#include <tqvariant.h> // HP-UX compiler needs this here
#include "sizehandle.h"
#include "formwindow.h"
#include "widgetfactory.h"
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <klocale.h>
SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
- : QWidget( parent )
+ : TQWidget( parent )
{
active = true;
setBackgroundMode( active ? PaletteText : PaletteDark );
@@ -86,37 +86,37 @@ void SizeHandle::setActive( bool a )
updateCursor();
}
-void SizeHandle::setWidget( QWidget *w )
+void SizeHandle::setWidget( TQWidget *w )
{
widget = w;
}
-void SizeHandle::paintEvent( QPaintEvent * )
+void SizeHandle::paintEvent( TQPaintEvent * )
{
if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget )
return;
- QPainter p( this );
+ TQPainter p( this );
p.setPen( blue );
p.drawRect( 0, 0, width(), height() );
}
-void SizeHandle::mousePressEvent( QMouseEvent *e )
+void SizeHandle::mousePressEvent( TQMouseEvent *e )
{
if ( !widget || e->button() != LeftButton || !active )
return;
oldPressPos = e->pos();
- geom = origGeom = QRect( widget->pos(), widget->size() );
+ geom = origGeom = TQRect( widget->pos(), widget->size() );
}
-void SizeHandle::mouseMoveEvent( QMouseEvent *e )
+void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
{
if ( !widget || ( e->state() & LeftButton ) != LeftButton || !active )
return;
- QPoint rp = mapFromGlobal( e->globalPos() );
- QPoint d = oldPressPos - rp;
+ TQPoint rp = mapFromGlobal( e->globalPos() );
+ TQPoint d = oldPressPos - rp;
oldPressPos = rp;
- QPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
- QRect pr = widget->parentWidget()->rect();
+ TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
+ TQRect pr = widget->parentWidget()->rect();
// ##### move code around a bit to reduce duplicated code here
switch ( dir ) {
@@ -204,13 +204,13 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e )
} break;
}
- QPoint p = pos();
+ TQPoint p = pos();
sel->updateGeometry();
oldPressPos += ( p - pos() );
- formWindow->sizePreview()->setText( QString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
+ formWindow->sizePreview()->setText( TQString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
formWindow->sizePreview()->adjustSize();
- QRect lg( formWindow->mapFromGlobal( e->globalPos() ) + QPoint( 16, 16 ),
+ TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ),
formWindow->sizePreview()->size() );
formWindow->checkPreviewGeometry( lg );
formWindow->sizePreview()->setGeometry( lg );
@@ -220,7 +220,7 @@ void SizeHandle::mouseMoveEvent( QMouseEvent *e )
formWindow->updateChildSelections( widget );
}
-void SizeHandle::mouseReleaseEvent( QMouseEvent *e )
+void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e->button() != LeftButton || !active )
return;
@@ -234,7 +234,7 @@ void SizeHandle::mouseReleaseEvent( QMouseEvent *e )
formWindow->emitUpdateProperties( widget );
}
-void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height )
+void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height )
{
int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
minw = QMAX( minw, 2 * formWindow->grid().x() );
@@ -250,7 +250,7 @@ void SizeHandle::trySetGeometry( QWidget *w, int x, int y, int width, int height
w->setGeometry( x, y, QMAX( minw, width ), QMAX( minh, height ) );
}
-void SizeHandle::tryResize( QWidget *w, int width, int height )
+void SizeHandle::tryResize( TQWidget *w, int width, int height )
{
int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
minw = QMAX( minw, 16 );
@@ -261,7 +261,7 @@ void SizeHandle::tryResize( QWidget *w, int width, int height )
// ------------------------------------------------------------------------
-WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection> *selDict )
+WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict )
: selectionDict( selDict )
{
formWindow = parent;
@@ -271,7 +271,7 @@ WidgetSelection::WidgetSelection( FormWindow *parent, QPtrDict<WidgetSelection>
hide();
}
-void WidgetSelection::setWidget( QWidget *w, bool updateDict )
+void WidgetSelection::setWidget( TQWidget *w, bool updateDict )
{
if ( !w ) {
hide();
@@ -306,9 +306,9 @@ void WidgetSelection::updateGeometry()
if ( !wid )
return;
- QPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
+ TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
p = formWindow->mapFromGlobal( p );
- QRect r( p, wid->size() );
+ TQRect r( p, wid->size() );
int w = 6;
int h = 6;
@@ -377,7 +377,7 @@ void WidgetSelection::update()
}
}
-QWidget *WidgetSelection::widget() const
+TQWidget *WidgetSelection::widget() const
{
return wid;
}