summaryrefslogtreecommitdiffstats
path: root/kbarcode/commands.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
commitc4189d200e71c7ef82e9a6e34935ad225154d658 (patch)
treef7f29a1159e0402472ff2ab22617a8113f66263c /kbarcode/commands.cpp
parent2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff)
downloadkbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz
kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/commands.cpp')
-rw-r--r--kbarcode/commands.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kbarcode/commands.cpp b/kbarcode/commands.cpp
index a11c01b..ae62911 100644
--- a/kbarcode/commands.cpp
+++ b/kbarcode/commands.cpp
@@ -33,25 +33,25 @@
// KDE includes
#include <kapplication.h>
-QPoint getFreePos( QCanvas* c )
+TQPoint getFreePos( TQCanvas* c )
{
MyCanvas* canvas = (MyCanvas*)c;
if( !c->width() && !c->height() )
- return QPoint( canvas->rect().x(), canvas->rect().y() );
+ return TQPoint( canvas->rect().x(), canvas->rect().y() );
// TODO: fix for positions on label
int x = KApplication::random() % canvas->rect().width() - 20;
int y = KApplication::random() % canvas->rect().height() - 20;
if( x > 0 && y > 0 )
- return QPoint( canvas->rect().x() + x, canvas->rect().y() + y );
+ return TQPoint( canvas->rect().x() + x, canvas->rect().y() + y );
else
- return QPoint( canvas->rect().x(), canvas->rect().y() );
+ return TQPoint( canvas->rect().x(), canvas->rect().y() );
}
CommandUtils::CommandUtils(TCanvasItem* item)
- : QObject()
+ : TQObject()
{
m_canvas_item = item;
m_canvas_item->addRef();
@@ -59,7 +59,7 @@ CommandUtils::CommandUtils(TCanvasItem* item)
c = m_canvas_item->canvas();
/* NOT NEEDED:
if( m_canvas_item && m_canvas_item->item() )
- connect( m_canvas_item->item(), SIGNAL( destroyed() ), this, SLOT( documentItemDeleted() ) );
+ connect( m_canvas_item->item(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( documentItemDeleted() ) );
*/
}
@@ -72,7 +72,7 @@ bool CommandUtils::canvasHasItem()
{
if( m_canvas_item && c )
{
- QCanvasItemList list = c->allItems();
+ TQCanvasItemList list = c->allItems();
for( unsigned int i=0;i<list.count();i++)
if( m_canvas_item == list[i] )
return true;
@@ -96,8 +96,8 @@ void CommandUtils::documentItemDeleted()
*/
}
-NewItemCommand::NewItemCommand( MyCanvasView* view, const QString & name )
- : QObject(), KCommand()
+NewItemCommand::NewItemCommand( MyCanvasView* view, const TQString & name )
+ : TQObject(), KCommand()
{
cv = view;
m_name = name;
@@ -125,7 +125,7 @@ void NewItemCommand::execute()
m_item->addRef();
/* NOT NEEDED:
- connect( m_object, SIGNAL( destroyed() ), this, SLOT( documentItemDeleted() ) );
+ connect( m_object, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( documentItemDeleted() ) );
*/
}
}
@@ -173,7 +173,7 @@ void ResizeCommand::setRect( int cx, int cy, int cw, int ch )
if( ch <= 0 )
ch = orect.height();
- rect = QRect( cx, cy, cw, ch );
+ rect = TQRect( cx, cy, cw, ch );
}
void ResizeCommand::execute()
@@ -295,12 +295,12 @@ PictureCommand::PictureCommand( double r, bool mh, bool mv, EImageScaling s, Ima
m_item = it;
}
-void PictureCommand::setExpression( const QString & expr )
+void PictureCommand::setExpression( const TQString & expr )
{
expression = expr;
}
-void PictureCommand::setPixmap( const QPixmap & pix )
+void PictureCommand::setPixmap( const TQPixmap & pix )
{
pixmap = pix;
pixserial = pixmap.serialNumber();
@@ -334,7 +334,7 @@ void PictureCommand::unexecute()
}
}
-TextChangeCommand::TextChangeCommand( TextItem* it, QString t )
+TextChangeCommand::TextChangeCommand( TextItem* it, TQString t )
: CommandUtils( it->canvasItem() )
{
m_item = it;
@@ -372,7 +372,7 @@ void TextRotationCommand::unexecute()
}
//NY24
-TextLineChangeCommand::TextLineChangeCommand( TextLineItem* it, QString t, int font , int magvert, int maghor)
+TextLineChangeCommand::TextLineChangeCommand( TextLineItem* it, TQString t, int font , int magvert, int maghor)
: CommandUtils( it->canvasItem() )
{
m_item = it;
@@ -454,7 +454,7 @@ void NewLineCommand::create()
m_object = new LineItem();
}
-NewTextCommand::NewTextCommand( QString t, MyCanvasView* v, TokenProvider* token )
+NewTextCommand::NewTextCommand( TQString t, MyCanvasView* v, TokenProvider* token )
: NewItemCommand( v, i18n("New Text") ),
m_token( token )
{
@@ -471,7 +471,7 @@ void NewTextCommand::create()
}
//NY25
-NewTextLineCommand::NewTextLineCommand( QString t, MyCanvasView* v, TokenProvider* token )
+NewTextLineCommand::NewTextLineCommand( TQString t, MyCanvasView* v, TokenProvider* token )
: NewItemCommand( v, i18n("New TextLine") ),
m_token( token )
{
@@ -506,7 +506,7 @@ DeleteCommand::~DeleteCommand()
{
DocumentItem* item = m_canvas_item->item();
if( item )
- item->disconnect( item, SIGNAL( destroyed() ), this, 0 );
+ item->disconnect( item, TQT_SIGNAL( destroyed() ), this, 0 );
delete m_canvas_item;
}
}
@@ -528,7 +528,7 @@ void DeleteCommand::unexecute()
}
}
-BorderCommand::BorderCommand( bool border, const QPen & pen, DocumentItem* item )
+BorderCommand::BorderCommand( bool border, const TQPen & pen, DocumentItem* item )
: CommandUtils( item->canvasItem() )
{
m_new_border = border;
@@ -560,7 +560,7 @@ void BorderCommand::unexecute()
}
}
-FillCommand::FillCommand( QColor c, RectItem* r )
+FillCommand::FillCommand( TQColor c, RectItem* r )
: CommandUtils( r->canvasItem() )
{
fill = c;