summaryrefslogtreecommitdiffstats
path: root/libkscan
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /libkscan
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkscan')
-rw-r--r--libkscan/COPYING.LIB4
-rw-r--r--libkscan/devselector.cpp22
-rw-r--r--libkscan/devselector.h5
-rw-r--r--libkscan/dispgamma.cpp14
-rw-r--r--libkscan/dispgamma.h5
-rw-r--r--libkscan/gammadialog.cpp6
-rw-r--r--libkscan/gammadialog.h7
-rw-r--r--libkscan/img_canvas.cpp34
-rw-r--r--libkscan/img_canvas.h21
-rw-r--r--libkscan/imgscaledialog.cpp6
-rw-r--r--libkscan/imgscaledialog.h5
-rw-r--r--libkscan/kgammatable.h9
-rw-r--r--libkscan/kscandevice.cpp82
-rw-r--r--libkscan/kscandevice.h25
-rw-r--r--libkscan/kscandoc.h2
-rw-r--r--libkscan/kscanoption.cpp36
-rw-r--r--libkscan/kscanoption.h15
-rw-r--r--libkscan/kscanoptset.cpp4
-rw-r--r--libkscan/kscanslider.cpp30
-rw-r--r--libkscan/kscanslider.h37
-rw-r--r--libkscan/massscandialog.cpp4
-rw-r--r--libkscan/massscandialog.h5
-rw-r--r--libkscan/previewer.cpp28
-rw-r--r--libkscan/previewer.h7
-rw-r--r--libkscan/scandialog.cpp38
-rw-r--r--libkscan/scandialog.h7
-rw-r--r--libkscan/scanparams.cpp42
-rw-r--r--libkscan/scanparams.h11
-rw-r--r--libkscan/scansourcedialog.cpp4
-rw-r--r--libkscan/scansourcedialog.h3
-rw-r--r--libkscan/sizeindicator.cpp10
-rw-r--r--libkscan/sizeindicator.h7
32 files changed, 276 insertions, 259 deletions
diff --git a/libkscan/COPYING.LIB b/libkscan/COPYING.LIB
index 01148ab6..e8dcd1e0 100644
--- a/libkscan/COPYING.LIB
+++ b/libkscan/COPYING.LIB
@@ -128,7 +128,7 @@ included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
+all the source code for all modules it tqcontains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
@@ -250,7 +250,7 @@ linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
+structure tqlayouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
diff --git a/libkscan/devselector.cpp b/libkscan/devselector.cpp
index b30316c9..011e7469 100644
--- a/libkscan/devselector.cpp
+++ b/libkscan/devselector.cpp
@@ -41,9 +41,9 @@
#include "devselector.h"
-DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
+DeviceSelector::DeviceSelector( TQWidget *tqparent, TQStrList& devList,
const TQStringList& hrdevList )
- : KDialogBase( parent, "DeviceSel", true, i18n("Welcome to Kooka"),
+ : KDialogBase( tqparent, "DeviceSel", true, i18n("Welcome to Kooka"),
Ok|Cancel, Ok, true )
{
kdDebug(29000) << "Starting DevSelector!" << endl;
@@ -55,11 +55,11 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
TQLabel *label = new TQLabel( page, "captionImage" );
Q_CHECK_PTR( label );
- label->setPixmap( TQPixmap( "kookalogo.png" ));
+ label->setPixmap( TQPixmap( TQString("kookalogo.png") ));
label->resize( 100, 350 );
topLayout->addWidget( label );
- selectBox = new TQButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ),
+ selectBox = new TQButtonGroup( 1,Qt::Horizontal, i18n( "Select Scan Device" ),
page, "ButtonBox");
Q_CHECK_PTR( selectBox );
selectBox->setExclusive( true );
@@ -70,7 +70,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
page, "CBOX_SKIP_ON_START" );
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
cbSkipDialog->setChecked( skipDialog );
@@ -81,7 +81,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
TQCString DeviceSelector::getDeviceFromConfig( void ) const
{
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
TQCString result;
@@ -95,7 +95,7 @@ TQCString DeviceSelector::getDeviceFromConfig( void ) const
/* Now check if the scanner read from the config file is available !
* if not, ask the user !
*/
- if( skipDialog && devices.find( result ) > -1 )
+ if( skipDialog && devices.tqfind( result ) > -1 )
{
kdDebug(29000) << "Scanner from Config file is available - fine." << endl;
}
@@ -126,7 +126,7 @@ TQCString DeviceSelector::getSelectedDevice( void ) const
/* Store scanner selection settings */
KConfig *c = KGlobal::config();
- c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
/* Write both the scan device and the skip-start-dialog flag global. */
c->writeEntry( STARTUP_SCANDEV, dev, true, true );
c->writeEntry( STARTUP_SKIP_ASK, getShouldSkip(), true, true );
@@ -141,7 +141,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources,
{
bool default_ok = false;
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit();
/* Selector-Stuff*/
@@ -152,7 +152,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources,
TQStringList::ConstIterator it2 = hrSources.begin();
for ( ; it.current(); ++it, ++it2 )
{
- TQString text = TQString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( TQString::fromLocal8Bit(*it) ).arg( *it2 );
+ TQString text = TQString::tqfromLatin1("&%1. %2\n%3").tqarg(1+nr).tqarg( TQString::fromLocal8Bit(*it) ).tqarg( *it2 );
TQRadioButton *rb = new TQRadioButton( text, selectBox );
selectBox->insert( rb );
@@ -168,7 +168,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources,
if( ! default_ok )
{
/* if no default found, set the first */
- TQRadioButton *rb = (TQRadioButton*) selectBox->find( checkDefNo );
+ TQRadioButton *rb = (TQRadioButton*) selectBox->tqfind( checkDefNo );
if ( rb )
rb->setChecked( true );
}
diff --git a/libkscan/devselector.h b/libkscan/devselector.h
index 011c4a4e..ec74f343 100644
--- a/libkscan/devselector.h
+++ b/libkscan/devselector.h
@@ -54,14 +54,15 @@ class TQCheckBox;
class DeviceSelector: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* constructs the dialog class
- * @param TQWidget *parent - the parent
+ * @param TQWidget *tqparent - the tqparent
* @param TQStrList backends - a list of device names retrieved from the scan device
* @param TQStrList scannerNames - a list of corresponding human readable sanner names.
*/
- DeviceSelector( TQWidget *parent, TQStrList&, const TQStringList& );
+ DeviceSelector( TQWidget *tqparent, TQStrList&, const TQStringList& );
~DeviceSelector();
/**
diff --git a/libkscan/dispgamma.cpp b/libkscan/dispgamma.cpp
index 478096e9..a2815276 100644
--- a/libkscan/dispgamma.cpp
+++ b/libkscan/dispgamma.cpp
@@ -22,7 +22,7 @@
#include "dispgamma.h"
-DispGamma::DispGamma( TQWidget *parent ) : TQWidget( parent )
+DispGamma::DispGamma( TQWidget *tqparent ) : TQWidget( tqparent )
{
vals = 0;
margin = 10;
@@ -35,7 +35,7 @@ DispGamma::~DispGamma()
void DispGamma::resizeEvent (TQResizeEvent* )
{
- repaint();
+ tqrepaint();
}
void DispGamma::paintEvent( TQPaintEvent *ev )
@@ -49,11 +49,11 @@ void DispGamma::paintEvent( TQPaintEvent *ev )
p.setClipRect( ev->rect());
- p.setPen( colorGroup().highlight() );
- p.setBrush( colorGroup().base() );
+ p.setPen( tqcolorGroup().highlight() );
+ p.setBrush( tqcolorGroup().base() );
// Backgrond
p.drawRect( 0,0, w, 256 );
- p.setPen( TQPen(colorGroup().midlight(), 1, DotLine));
+ p.setPen( TQPen(tqcolorGroup().midlight(), 1, DotLine));
// horizontal Grid
for( int l = 1; l < 5; l++ )
p.drawLine( 1, l*51, 255, l*51 );
@@ -63,7 +63,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev )
p.drawLine( l*51, 2, l*51, 255 );
// draw gamma-Line
- p.setPen( colorGroup().highlight() );
+ p.setPen( tqcolorGroup().highlight() );
p.moveTo( 1, vals->at(1) );
for( int i = 2; i < w-1; i++ )
{
@@ -73,7 +73,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev )
}
-TQSize DispGamma::sizeHint( void )
+TQSize DispGamma::tqsizeHint( void )
{
return TQSize( 256 + 2*margin,256 + 2 * margin );
}
diff --git a/libkscan/dispgamma.h b/libkscan/dispgamma.h
index 8e917d83..dca8840d 100644
--- a/libkscan/dispgamma.h
+++ b/libkscan/dispgamma.h
@@ -35,11 +35,12 @@ extern "C"{
class DispGamma : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- DispGamma( TQWidget *parent );
+ DispGamma( TQWidget *tqparent );
~DispGamma();
- TQSize sizeHint( void );
+ TQSize tqsizeHint( void );
TQSizePolicy sizePolicy( void );
void setValueRef( TQMemArray<SANE_Word> *newVals )
diff --git a/libkscan/gammadialog.cpp b/libkscan/gammadialog.cpp
index ef8a87a2..b61a3388 100644
--- a/libkscan/gammadialog.cpp
+++ b/libkscan/gammadialog.cpp
@@ -29,8 +29,8 @@
#include "gammadialog.h"
-GammaDialog::GammaDialog( TQWidget *parent ) :
- KDialogBase( parent, "GammaDialog", true, i18n("Custom Gamma Tables"),
+GammaDialog::GammaDialog( TQWidget *tqparent ) :
+ KDialogBase( tqparent, "GammaDialog", true, i18n("Custom Gamma Tables"),
Ok|Cancel|Apply, Ok, true )
{
gt = new KGammaTable();
@@ -47,7 +47,7 @@ GammaDialog::GammaDialog( TQWidget *parent ) :
gtDisp->setValueRef( gt->getArrayPtr() );
gtDisp->resize( 280, 280 );
- connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( repaint()));
+ connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( tqrepaint()));
// setCaption( i18n( "Gamma Table" ));
diff --git a/libkscan/gammadialog.h b/libkscan/gammadialog.h
index 0c63a967..a4edea12 100644
--- a/libkscan/gammadialog.h
+++ b/libkscan/gammadialog.h
@@ -41,11 +41,12 @@ class KGammaTable;
class GammaDialog : public KDialogBase
{
Q_OBJECT
-// FIXME: Doesn't compile with Qt 3 (malte)
-// Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt )
+ TQ_OBJECT
+// FIXME: Doesn't compile with TQt 3 (malte)
+// TQ_PROPERTY( KGammaTable *gt READ getGt WRITE setGt )
public:
- GammaDialog ( TQWidget *parent );
+ GammaDialog ( TQWidget *tqparent );
~GammaDialog( );
KGammaTable *getGt( ) const { return gt; }
diff --git a/libkscan/img_canvas.cpp b/libkscan/img_canvas.cpp
index 18c1f606..2037cb01 100644
--- a/libkscan/img_canvas.cpp
+++ b/libkscan/img_canvas.cpp
@@ -72,10 +72,10 @@ public:
TQValueList<TQRect> highlightRects;
};
-ImageCanvas::ImageCanvas(TQWidget *parent,
+ImageCanvas::ImageCanvas(TQWidget *tqparent,
const TQImage *start_image,
const char *name ):
- TQScrollView( parent, name ),
+ TQScrollView( tqparent, name ),
m_contextMenu(0)
{
d = new ImageCanvasPrivate();
@@ -226,12 +226,12 @@ void ImageCanvas::newImage( TQImage *new_image )
}
- kdDebug(29000) << "going to repaint!" << endl;
- repaint( true );
- kdDebug(29000) << "repaint ok" << endl;
+ kdDebug(29000) << "going to tqrepaint!" << endl;
+ tqrepaint( true );
+ kdDebug(29000) << "tqrepaint ok" << endl;
}
-TQSize ImageCanvas::sizeHint() const
+TQSize ImageCanvas::tqsizeHint() const
{
return( TQSize( 2, 2 ));
}
@@ -295,7 +295,7 @@ void ImageCanvas::handle_popup( int item )
default: break;
}
update_scaled_pixmap();
- repaint();
+ tqrepaint();
}
@@ -379,7 +379,7 @@ void ImageCanvas::drawContents( TQPainter * p, int clipx, int clipy, int clipw,
// p->scale( used_xscaler, used_yscaler );
// p->scale( used_xscaler, used_yscaler );
if ( x2 >= x1 && y2 >= y1 ) {
- p->drawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph);
+ p->tqdrawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph);
// p->setBrush( red );
// p->drawRect( x1, y1, clipw, cliph );
}
@@ -457,7 +457,7 @@ void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev)
{
if( ! acquired || ! image ) return;
- if(ev->button()==LeftButton )
+ if(ev->button()==Qt::LeftButton )
{
int cx = contentsX(), cy = contentsY();
@@ -486,7 +486,7 @@ void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev)
void ImageCanvas::viewportMouseReleaseEvent(TQMouseEvent *ev)
{
- if(ev->button()!=LeftButton || !acquired ) return;
+ if(ev->button()!=Qt::LeftButton || !acquired ) return;
//// debug( "Mouse Release at %d/%d", ev->x(), ev->y());
if(moving!=MOVE_NONE) {
@@ -675,7 +675,7 @@ void ImageCanvas::update_scaled_pixmap( void )
if( scaleKind() == DYNAMIC )
kdDebug(28000) << "Scaling DYNAMIC" << endl;
TQSize noSBSize( visibleWidth(), visibleHeight());
- const int sbWidth = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent );
+ const int sbWidth = kapp->tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent );
// if( verticalScrollBar()->visible() ) noSBSize.width()+=sbWidth;
// if( horizontalScrollBar()->visible() ) noSBSize.height()+=sbWidth;
@@ -783,7 +783,7 @@ void ImageCanvas::drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r)
} else if(!acquired) p.setPen(TQPen(TQColor(150,150,150)));
for(;;) {
- if(rect().contains(TQPoint(x1,y))) {
+ if(TQT_TQRECT_OBJECT(rect()).tqcontains(TQPoint(x1,y))) {
if( r && acquired ) {
int re_x1, re_y;
inv_scale_matrix.map( x1+cx, y+cy, &re_x1, &re_y );
@@ -826,7 +826,7 @@ void ImageCanvas::drawVAreaBorder(TQPainter &p, int x, int y1, int y2, int r )
if( !acquired ) p.setPen( TQPen( TQColor(150,150,150) ) );
for(;;) {
- if(rect().contains( TQPoint(x,y1) )) {
+ if(TQT_TQRECT_OBJECT(rect()).tqcontains( TQPoint(x,y1) )) {
if( r && acquired ) {
int re_y1, re_x;
inv_scale_matrix.map( x+cx, y1+cy, &re_x, &re_y1 );
@@ -921,7 +921,7 @@ preview_state ImageCanvas::classifyPoint(int x,int y)
if(x>=a.left()&&x<=a.right()) {
if(top) return MOVE_TOP;
if(bottom) return MOVE_BOTTOM;
- if(selected->contains(TQPoint(x,y))) return MOVE_WHOLE;
+ if(selected->tqcontains(TQPoint(x,y))) return MOVE_WHOLE;
}
return MOVE_NONE;
}
@@ -1022,7 +1022,7 @@ const TQString ImageCanvas::imageInfoString( int w, int h, int d )
else
return TQString("-");
}
- return i18n("%1x%2 pixel, %3 bit").arg(w).arg(h).arg(d);
+ return i18n("%1x%2 pixel, %3 bit").tqarg(w).tqarg(h).tqarg(d);
}
@@ -1043,7 +1043,7 @@ const TQString ImageCanvas::scaleKindString()
return i18n("Fit Height");
break;
case ZOOM:
- return i18n("Zoom to %1 %%").arg( TQString::number(getScaleFactor()));
+ return i18n("Zoom to %1 %%").tqarg( TQString::number(getScaleFactor()));
break;
default:
return i18n("Unknown scaling!");
@@ -1058,7 +1058,7 @@ int ImageCanvas::highlight( const TQRect& rect, const TQPen& pen, const TQBrush&
saveRect.setRect( rect.x()-2, rect.y()-2, rect.width()+4, rect.height()+4 );
d->highlightRects.append( saveRect );
- int idx = d->highlightRects.findIndex(saveRect);
+ int idx = d->highlightRects.tqfindIndex(saveRect);
TQRect targetRect = scale_matrix.map( rect );
diff --git a/libkscan/img_canvas.h b/libkscan/img_canvas.h
index 958fecbb..b99cb630 100644
--- a/libkscan/img_canvas.h
+++ b/libkscan/img_canvas.h
@@ -71,17 +71,18 @@ extern int max_dpi;
-class ImageCanvas: public QScrollView
+class ImageCanvas: public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( PopupIDs )
- Q_PROPERTY( int brightness READ getBrightness WRITE setBrightness )
- Q_PROPERTY( int contrast READ getContrast WRITE setContrast )
- Q_PROPERTY( int gamma READ getGamma WRITE setGamma )
- Q_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor )
+ TQ_PROPERTY( int brightness READ getBrightness WRITE setBrightness )
+ TQ_PROPERTY( int contrast READ getContrast WRITE setContrast )
+ TQ_PROPERTY( int gamma READ getGamma WRITE setGamma )
+ TQ_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor )
public:
- ImageCanvas( TQWidget *parent = 0,
+ ImageCanvas( TQWidget *tqparent = 0,
const TQImage *start_image = 0,
const char *name = 0);
~ImageCanvas( );
@@ -120,9 +121,9 @@ public slots:
void toggleAspect( int aspect_in_mind )
{
maintain_aspect = aspect_in_mind;
- repaint();
+ tqrepaint();
}
- virtual TQSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
void newImage( TQImage* );
void newImageHoldZoom( TQImage* );
void deleteView( TQImage *);
@@ -191,8 +192,8 @@ private:
KPixmapIO pixIO;
#endif
- QWMatrix scale_matrix;
- QWMatrix inv_scale_matrix;
+ TQWMatrix scale_matrix;
+ TQWMatrix inv_scale_matrix;
TQPixmap *pmScaled;
float used_yscaler;
float used_xscaler;
diff --git a/libkscan/imgscaledialog.cpp b/libkscan/imgscaledialog.cpp
index 2deb4544..85c793e3 100644
--- a/libkscan/imgscaledialog.cpp
+++ b/libkscan/imgscaledialog.cpp
@@ -27,9 +27,9 @@
/* ############################################################################## */
-ImgScaleDialog::ImgScaleDialog( TQWidget *parent, int curr_sel,
+ImgScaleDialog::ImgScaleDialog( TQWidget *tqparent, int curr_sel,
const char *name )
- :KDialogBase( parent, name , true, i18n("Zoom"),
+ :KDialogBase( tqparent, name , true, i18n("Zoom"),
Ok|Cancel, Ok, true )
{
// setCaption (i18n ("Image Zoom"));
@@ -134,7 +134,7 @@ void ImgScaleDialog::customChanged( const TQString& s )
// in the button group. The value val is the index of the active
// button which is translated to the Scale-Size in percent.
// If custom size is selected, the ScaleSize is read from the
-// QLineedit.
+// TQLineedit.
//
void ImgScaleDialog::setSelValue( int val )
{
diff --git a/libkscan/imgscaledialog.h b/libkscan/imgscaledialog.h
index 6ab4cb78..78c62b43 100644
--- a/libkscan/imgscaledialog.h
+++ b/libkscan/imgscaledialog.h
@@ -32,10 +32,11 @@
class ImgScaleDialog : public KDialogBase
{
Q_OBJECT
- Q_PROPERTY( int selected READ getSelected WRITE setSelValue )
+ TQ_OBJECT
+ TQ_PROPERTY( int selected READ getSelected WRITE setSelValue )
public:
- ImgScaleDialog( TQWidget *parent, int curr_sel = 100,
+ ImgScaleDialog( TQWidget *tqparent, int curr_sel = 100,
const char *name = 0 );
public slots:
diff --git a/libkscan/kgammatable.h b/libkscan/kgammatable.h
index 49540a82..7d949d45 100644
--- a/libkscan/kgammatable.h
+++ b/libkscan/kgammatable.h
@@ -27,13 +27,14 @@ extern "C" {
#include <sane/sane.h>
}
-class KGammaTable: public QObject
+class KGammaTable: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( int g READ getGamma WRITE setGamma )
- Q_PROPERTY( int c READ getContrast WRITE setContrast )
- Q_PROPERTY( int b READ getBrightness WRITE setBrightness )
+ TQ_PROPERTY( int g READ getGamma WRITE setGamma )
+ TQ_PROPERTY( int c READ getContrast WRITE setContrast )
+ TQ_PROPERTY( int b READ getBrightness WRITE setBrightness )
public:
KGammaTable ( int gamma = 100, int brightness = 0,
diff --git a/libkscan/kscandevice.cpp b/libkscan/kscandevice.cpp
index c5237eb4..b603f15f 100644
--- a/libkscan/kscandevice.cpp
+++ b/libkscan/kscandevice.cpp
@@ -97,7 +97,7 @@ KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name )
TQCString alias = aliasName( name );
- /* gui_elements is a QList<KScanOption> */
+ /* gui_elements is a TQList<KScanOption> */
for( ret = gui_elements.first(); ret != 0; ret = gui_elements.next())
{
if( ret->getName() == alias ) break;
@@ -109,7 +109,7 @@ KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name )
------------------------------------------------------------------------- */
-KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent,
+KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *tqparent,
const TQString& desc,
const TQString& tooltip )
{
@@ -132,7 +132,7 @@ KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent
/** store new gui-elem in list of all gui-elements */
gui_elements.append( so );
- w = so->createWidget( parent, desc, tooltip );
+ w = so->createWidget( tqparent, desc, tooltip );
if( w )
{
connect( so, TQT_SIGNAL( optionChanged( KScanOption* ) ),
@@ -163,8 +163,8 @@ KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent
// ---------------------------------------------------------------------------
-KScanDevice::KScanDevice( TQObject *parent )
- : TQObject( parent )
+KScanDevice::KScanDevice( TQObject *tqparent )
+ : TQObject( tqparent )
{
SANE_Status sane_stat = sane_init(NULL, NULL );
@@ -175,7 +175,7 @@ KScanDevice::KScanDevice( TQObject *parent )
gui_elements.setAutoDelete( true );
scanner_initialised = false; /* stays false until openDevice. */
- scanStatus = SSTAT_SILENT;
+ scantqStatus = SSTAT_SILENT;
data = 0; /* temporary image data buffer while scanning */
sn = 0; /* socket notifier for async scanning */
@@ -240,7 +240,7 @@ KScanStat KScanDevice::openDevice( const TQCString& backend )
if( backend.isEmpty() ) return KSCAN_ERR_PARAM;
// search for scanner
- int indx = scanner_avail.find( backend );
+ int indx = scanner_avail.tqfind( backend );
if( indx < 0 ) {
stat = KSCAN_ERR_NO_DEVICE;
@@ -282,7 +282,7 @@ void KScanDevice::slCloseDevice( )
scanner_name = UNDEF_SCANNERNAME;
if( scanner_handle )
{
- if( scanStatus != SSTAT_SILENT )
+ if( scantqStatus != SSTAT_SILENT )
{
kdDebug(29000) << "Scanner is still active, calling cancel !" << endl;
sane_cancel( scanner_handle );
@@ -304,14 +304,14 @@ TQString KScanDevice::getScannerName(const TQCString& name) const
TQString ret = i18n("No scanner selected");
SANE_Device *scanner = 0L;
- if( scanner_name && scanner_initialised && name.isEmpty())
+ if( !scanner_name.isNull() && scanner_initialised && name.isEmpty())
{
scanner = scannerDevices[ scanner_name ];
}
else if ( ! name.isEmpty() )
{
scanner = scannerDevices[ name ];
- ret = TQString::null;
+ ret = TQString();
}
if( scanner ) {
@@ -533,7 +533,7 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable )
}
else
{
- kdDebug(29000) << "Status of sane is bad: " << sane_strstatus( sane_stat )
+ kdDebug(29000) << "tqStatus of sane is bad: " << sane_strstatus( sane_stat )
<< " for option " << oname << endl;
}
@@ -570,7 +570,7 @@ void KScanDevice::slSetDirty( const TQCString& name )
{
if( optionExists( name ) )
{
- if( dirtyList.find( name ) == -1 )
+ if( dirtyList.tqfind( name ) == -1 )
{
kdDebug(29000)<< "Setting dirty <" << name << ">" << endl;
/* item not found */
@@ -659,11 +659,11 @@ void KScanDevice::slReloadAll( )
void KScanDevice::slStopScanning( void )
{
kdDebug(29000) << "Attempt to stop scanning" << endl;
- if( scanStatus == SSTAT_IN_PROGRESS )
+ if( scantqStatus == SSTAT_IN_PROGRESS )
{
emit( sigScanFinished( KSCAN_CANCELLED ));
}
- scanStatus = SSTAT_STOP_NOW;
+ scantqStatus = SSTAT_STOP_NOW;
}
@@ -673,9 +673,9 @@ const TQString KScanDevice::previewFile()
if( !dir.endsWith("/") )
dir += "/";
- TQString fname = dir + TQString::fromLatin1(".previews/");
+ TQString fname = dir + TQString::tqfromLatin1(".previews/");
TQString sname( getScannerName(shortScannerName()) );
- sname.replace( '/', "_");
+ sname.tqreplace( '/', "_");
return fname+sname;
}
@@ -901,7 +901,7 @@ void KScanDevice::prepareScan( void )
/** Starts scanning
* depending on if a filename is given or not, the function tries to open
- * the file using the Qt-Image-IO or really scans the image.
+ * the file using the TQt-Image-IO or really scans the image.
**/
KScanStat KScanDevice::acquire( const TQString& filename )
{
@@ -982,8 +982,8 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
if( img )
{
img->setNumColors( 2 );
- img->setColor( 0, qRgb( 0,0,0));
- img->setColor( 1, qRgb( 255,255,255) );
+ img->setColor( 0, tqRgb( 0,0,0));
+ img->setColor( 1, tqRgb( 255,255,255) );
}
}
else if( p->depth == 8 )
@@ -998,7 +998,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
img->setNumColors( 256 );
for(int i = 0; i<256; i++)
- img->setColor(i, qRgb(i,i,i));
+ img->setColor(i, tqRgb(i,i,i));
}
}
else
@@ -1084,13 +1084,13 @@ KScanStat KScanDevice::acquire_data( bool isPreview )
if( stat == KSCAN_OK )
{
/* initiates Redraw of the Progress-Window */
- qApp->processEvents();
+ tqApp->processEvents();
}
if( stat == KSCAN_OK )
{
overall_bytes = 0;
- scanStatus = SSTAT_IN_PROGRESS;
+ scantqStatus = SSTAT_IN_PROGRESS;
pixel_x = 0;
pixel_y = 0;
overall_bytes = 0;
@@ -1115,7 +1115,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview )
do
{
doProcessABlock();
- if( scanStatus != SSTAT_SILENT )
+ if( scantqStatus != SSTAT_SILENT )
{
sane_stat = sane_get_parameters( scanner_handle, &sane_scan_param );
kdDebug(29000) << "--ProcessABlock-Loop" << endl;
@@ -1126,7 +1126,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview )
kdDebug(29000) << "pixels_per_line : " << sane_scan_param.pixels_per_line << endl;
kdDebug(29000) << "bytes_per_line : " << sane_scan_param.bytes_per_line << endl;
}
- } while ( scanStatus != SSTAT_SILENT );
+ } while ( scantqStatus != SSTAT_SILENT );
}
}
@@ -1247,7 +1247,7 @@ void KScanDevice::slScanFinished( KScanStat status )
void KScanDevice::doProcessABlock( void )
{
int val,i;
- QRgb col, newCol;
+ TQRgb col, newCol;
SANE_Byte *rptr = 0;
SANE_Int bytes_written = 0;
@@ -1289,7 +1289,7 @@ void KScanDevice::doProcessABlock( void )
{
case SANE_FRAME_RGB:
if( sane_scan_param.lines < 1 ) break;
- bytes_written += rest_bytes; // die übergebliebenen Bytes dazu
+ bytes_written += rest_bytes; // die �bergebliebenen Bytes dazu
rest_bytes = bytes_written % 3;
for( val = 0; val < ((bytes_written-rest_bytes) / 3); val++ )
@@ -1302,7 +1302,7 @@ void KScanDevice::doProcessABlock( void )
if( pixel_x == sane_scan_param.pixels_per_line )
{ pixel_x = 0; pixel_y++; }
if( pixel_y < img->height())
- img->setPixel( pixel_x, pixel_y, qRgb( red, green,blue ));
+ img->setPixel( pixel_x, pixel_y, tqRgb( red, green,blue ));
pixel_x++;
}
@@ -1363,25 +1363,25 @@ void KScanDevice::doProcessABlock( void )
col = img->pixel( pixel_x, pixel_y );
- red = qRed( col );
- green = qGreen( col );
- blue = qBlue( col );
+ red = tqRed( col );
+ green = tqGreen( col );
+ blue = tqBlue( col );
chan = *rptr++;
switch( sane_scan_param.format )
{
case SANE_FRAME_RED :
- newCol = qRgba( chan, green, blue, 0xFF );
+ newCol = tqRgba( chan, green, blue, 0xFF );
break;
case SANE_FRAME_GREEN :
- newCol = qRgba( red, chan, blue, 0xFF );
+ newCol = tqRgba( red, chan, blue, 0xFF );
break;
case SANE_FRAME_BLUE :
- newCol = qRgba( red , green, chan, 0xFF );
+ newCol = tqRgba( red , green, chan, 0xFF );
break;
default:
kdDebug(29000) << "Undefined format !" << endl;
- newCol = qRgba( 0xFF, 0xFF, 0xFF, 0xFF );
+ newCol = tqRgba( 0xFF, 0xFF, 0xFF, 0xFF );
break;
}
img->setPixel( pixel_x, pixel_y, newCol );
@@ -1410,18 +1410,18 @@ void KScanDevice::doProcessABlock( void )
}
}
- if( goOn && scanStatus == SSTAT_STOP_NOW )
+ if( goOn && scantqStatus == SSTAT_STOP_NOW )
{
- /* scanStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */
+ /* scantqStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */
/* Mostly that one is fired by the STOP-Button in the progress dialog. */
/* This is also hit after the normal finish of the scan. Most probably,
- * the QSocketnotifier fires for a few times after the scan has been
+ * the TQSocketnotifier fires for a few times after the scan has been
* cancelled. Does it matter ? To see it, just uncomment the qDebug msg.
*/
kdDebug(29000) << "Stopping the scan progress !" << endl;
goOn = false;
- scanStatus = SSTAT_SILENT;
+ scantqStatus = SSTAT_SILENT;
emit( sigScanFinished( KSCAN_OK ));
}
@@ -1435,13 +1435,13 @@ void KScanDevice::doProcessABlock( void )
{
/** Everythings okay, the picture is ready **/
kdDebug(29000) << "last frame reached - scan successful" << endl;
- scanStatus = SSTAT_SILENT;
+ scantqStatus = SSTAT_SILENT;
emit( sigScanFinished( KSCAN_OK ));
}
else
{
/** EOF und nicht letzter Frame -> Parameter neu belegen und neu starten **/
- scanStatus = SSTAT_NEXT_FRAME;
+ scantqStatus = SSTAT_NEXT_FRAME;
kdDebug(29000) << "EOF, but another frame to scan" << endl;
}
@@ -1449,7 +1449,7 @@ void KScanDevice::doProcessABlock( void )
if( sane_stat == SANE_STATUS_CANCELLED )
{
- scanStatus = SSTAT_STOP_NOW;
+ scantqStatus = SSTAT_STOP_NOW;
kdDebug(29000) << "Scan was cancelled" << endl;
// stat = KSCAN_CANCELLED;
diff --git a/libkscan/kscandevice.h b/libkscan/kscandevice.h
index f52af74d..06a28cfa 100644
--- a/libkscan/kscandevice.h
+++ b/libkscan/kscandevice.h
@@ -61,11 +61,12 @@ typedef enum {
**/
-class KScanDevice : public QObject
+class KScanDevice : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
- /* Hmmm - No Q_PROPS ? */
+ /* Hmmm - No TQ_PROPS ? */
public:
/**
* KScanDevice - the KDE Scanner Device
@@ -75,7 +76,7 @@ public:
*
*/
- KScanDevice( TQObject *parent = 0 );
+ KScanDevice( TQObject *tqparent = 0 );
/**
* Destructor
@@ -147,7 +148,7 @@ public:
* @param TQImage *image - Pointer to a reserved image
* @return the state of the operation in KScanStat
*/
- KScanStat acquire( const TQString& filename = TQString::null );
+ KScanStat acquire( const TQString& filename = TQString() );
/**
* returns the default filename of the preview image of this scanner.
@@ -157,7 +158,7 @@ public:
/**
* loads the last saved previewed image on this device from the default file
- * @return a bitmap as QImage
+ * @return a bitmap as TQImage
**/
TQImage loadPreviewImage();
@@ -245,13 +246,13 @@ public:
* KScanOption. It is internally connected to the scan device, every
* change to the widget is automaticly considered by the scan device.
* @param name: Name of the SANE Option
- * @param parent: pointer to the parent widget
+ * @param tqparent: pointer to the tqparent widget
* @param desc: pointer to the text appearing as widget text
* @param tooltip: tooltip text. If zero, the SANE text will be used.
**/
- KScanOption *getGuiElement( const TQCString& name, TQWidget *parent,
- const TQString& desc = TQString::null,
- const TQString& tooltip = TQString::null );
+ KScanOption *getGuiElement( const TQCString& name, TQWidget *tqparent,
+ const TQString& desc = TQString(),
+ const TQString& tooltip = TQString() );
/**
* returns the pointer to an already created Scanoption from the
@@ -422,12 +423,12 @@ private:
KScanStat createNewImage( SANE_Parameters *p );
// not implemented
-// QWidget *entryField( TQWidget *parent, const TQString& text,
+// TQWidget *entryField( TQWidget *tqparent, const TQString& text,
// const TQString& tooltip );
KScanStat find_options(); // help fct. to process options
KScanStat acquire_data( bool isPreview = false );
TQStrList scanner_avail; // list of names of all scan dev.
- QStrList option_list; // list of names of all options
+ TQStrList option_list; // list of names of all options
TQStrList dirtyList; // option changes
inline TQString optionNotifyString(int) const;
@@ -437,7 +438,7 @@ private:
TQSocketNotifier *sn;
- SCANSTATUS scanStatus;
+ SCANSTATUS scantqStatus;
/* Data for the scan process */
/* This could/should go to a small help object */
diff --git a/libkscan/kscandoc.h b/libkscan/kscandoc.h
index 14f1f2c8..ca57150a 100644
--- a/libkscan/kscandoc.h
+++ b/libkscan/kscandoc.h
@@ -95,7 +95,7 @@ Small dialog which enables scanning source selection, e.g. Flatbed, automatic do
- ScanParams\n
The ScanParams class is the actual core of the
- KScan Library in terms of interface layout. The ScanParams class provides a ready-to-use interface for the selected scanner.\n
+ KScan Library in terms of interface tqlayout. The ScanParams class provides a ready-to-use interface for the selected scanner.\n
\n
The scanner device is analyzed in this class and dynamically generates an interface, according to the device's properties, containing the most important operational elements. These are currently
diff --git a/libkscan/kscanoption.cpp b/libkscan/kscanoption.cpp
index 2bf20d48..108d1c79 100644
--- a/libkscan/kscanoption.cpp
+++ b/libkscan/kscanoption.cpp
@@ -177,7 +177,7 @@ KScanOption::KScanOption( const KScanOption &so ) :
/* the widget is not copied ! */
internal_widget = 0;
- if( ! ( desc && name ) )
+ if ( ! ( desc && !name.isNull() ) )
{
kdWarning( 29000) << "Trying to copy a not healthy option (no name nor desc)" << endl;
return;
@@ -317,15 +317,15 @@ void KScanOption::slRedrawWidget( KScanOption *so )
break;
case GAMMA_TABLE:
/* Widget Type is GammaTable */
- // w = new TQSlider( parent, "AUTO_GAMMA" );
+ // w = new TQSlider( tqparent, "AUTO_GAMMA" );
break;
case STR_LIST:
- // w = comboBox( parent, text );
+ // w = comboBox( tqparent, text );
((KScanCombo*)w)->slSetEntry( so->get() );
/* Widget Type is Selection Box */
break;
case STRING:
- // w = entryField( parent, text );
+ // w = entryField( tqparent, text );
((KScanEntry*)w)->slSetEntry( so->get() );
/* Widget Type is Selection Box */
break;
@@ -732,7 +732,7 @@ bool KScanOption::set( const TQCString& c_string )
TQRegExp re( "\\d+, \\d+, \\d+" );
re.setMinimal(true);
- if( TQString(c_string).contains( re ))
+ if( TQString(c_string).tqcontains( re ))
{
TQStringList relist = TQStringList::split( ", ", TQString(c_string) );
@@ -1059,7 +1059,7 @@ bool KScanOption::getRange( double *min, double *max, double *q ) const
return( ret );
}
-TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc,
+TQWidget *KScanOption::createWidget( TQWidget *tqparent, const TQString& w_desc,
const TQString& tooltip )
{
TQStrList list;
@@ -1084,31 +1084,31 @@ TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc,
{
case BOOL:
/* Widget Type is ToggleButton */
- w = new TQCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" );
+ w = new TQCheckBox( text, tqparent, "AUTO_TOGGLE_BUTTON" );
connect( w, TQT_SIGNAL(clicked()), this,
TQT_SLOT(slWidgetChange()));
break;
case SINGLE_VAL:
/* Widget Type is Entry-Field */
- w = 0; // new QEntryField(
+ w = 0; // new TQEntryField(
kdDebug(29000) << "can not create widget for SINGLE_VAL!" << endl;
break;
case RANGE:
/* Widget Type is Slider */
- w = KSaneSlider( parent, text );
+ w = KSaneSlider( tqparent, text );
break;
case GAMMA_TABLE:
/* Widget Type is Slider */
- // w = KSaneSlider( parent, text );
+ // w = KSaneSlider( tqparent, text );
kdDebug(29000) << "can not create widget for GAMMA_TABLE!" << endl;
w = 0; // No widget, needs to be a set !
break;
case STR_LIST:
- w = comboBox( parent, text );
+ w = comboBox( tqparent, text );
/* Widget Type is Selection Box */
break;
case STRING:
- w = entryField( parent, text );
+ w = entryField( tqparent, text );
/* Widget Type is Selection Box */
break;
default:
@@ -1137,11 +1137,11 @@ TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc,
}
-TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text )
+TQWidget *KScanOption::comboBox( TQWidget *tqparent, const TQString& text )
{
TQStrList list = getList();
- KScanCombo *cb = new KScanCombo( parent, text, list);
+ KScanCombo *cb = new KScanCombo( tqparent, text, list);
connect( cb, TQT_SIGNAL( valueChanged( const TQCString& )), this,
TQT_SLOT( slWidgetChange( const TQCString& )));
@@ -1150,9 +1150,9 @@ TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text )
}
-TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text )
+TQWidget *KScanOption::entryField( TQWidget *tqparent, const TQString& text )
{
- KScanEntry *ent = new KScanEntry( parent, text );
+ KScanEntry *ent = new KScanEntry( tqparent, text );
connect( ent, TQT_SIGNAL( valueChanged( TQCString )), this,
TQT_SLOT( slWidgetChange( TQCString )));
@@ -1160,12 +1160,12 @@ TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text )
}
-TQWidget *KScanOption::KSaneSlider( TQWidget *parent, const TQString& text )
+TQWidget *KScanOption::KSaneSlider( TQWidget *tqparent, const TQString& text )
{
double min, max, quant;
getRange( &min, &max, &quant );
- KScanSlider *slider = new KScanSlider( parent, text, min, max );
+ KScanSlider *slider = new KScanSlider( tqparent, text, min, max );
/* Connect to the options change Slot */
connect( slider, TQT_SIGNAL( valueChanged(int)), this,
TQT_SLOT( slWidgetChange(int)));
diff --git a/libkscan/kscanoption.h b/libkscan/kscanoption.h
index fc1e8a0a..d26ddd10 100644
--- a/libkscan/kscanoption.h
+++ b/libkscan/kscanoption.h
@@ -57,9 +57,10 @@ class KGammaTable;
**/
-class KScanOption : public QObject
+class KScanOption : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -148,9 +149,9 @@ public:
*
**/
- TQWidget *createWidget( TQWidget *parent,
- const TQString& w_desc = TQString::null,
- const TQString& tooltip = TQString::null );
+ TQWidget *createWidget( TQWidget *tqparent,
+ const TQString& w_desc = TQString(),
+ const TQString& tooltip = TQString() );
/* Operators */
const KScanOption& operator= (const KScanOption& so );
@@ -237,9 +238,9 @@ private:
bool initOption( const TQCString& new_name );
void *allocBuffer( long );
- TQWidget *entryField ( TQWidget *parent, const TQString& text );
- TQWidget *KSaneSlider( TQWidget *parent, const TQString& text );
- TQWidget *comboBox ( TQWidget *parent, const TQString& text );
+ TQWidget *entryField ( TQWidget *tqparent, const TQString& text );
+ TQWidget *KSaneSlider( TQWidget *tqparent, const TQString& text );
+ TQWidget *comboBox ( TQWidget *tqparent, const TQString& text );
const SANE_Option_Descriptor *desc;
TQCString name;
diff --git a/libkscan/kscanoptset.cpp b/libkscan/kscanoptset.cpp
index eac44987..91b6e196 100644
--- a/libkscan/kscanoptset.cpp
+++ b/libkscan/kscanoptset.cpp
@@ -81,12 +81,12 @@ bool KScanOptSet::backupOption( const KScanOption& opt )
/** Allocate a new option and store it **/
const TQCString& optName = opt.getName();
- if( !optName )
+ if( optName.isNull() )
retval = false;
if( retval )
{
- KScanOption *newopt = find( optName );
+ KScanOption *newopt = tqfind( optName );
if( newopt )
{
diff --git a/libkscan/kscanslider.cpp b/libkscan/kscanslider.cpp
index e79634bd..4e04f095 100644
--- a/libkscan/kscanslider.cpp
+++ b/libkscan/kscanslider.cpp
@@ -31,10 +31,10 @@
#include <kdebug.h>
#include "kscanslider.h"
-KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
+KScanSlider::KScanSlider( TQWidget *tqparent, const TQString& text,
double min, double max, bool haveStdButt,
int stdValue )
- : TQFrame( parent ),
+ : TQFrame( tqparent ),
m_stdValue( stdValue ),
m_stdButt(0)
{
@@ -53,15 +53,15 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
this, TQT_SLOT(slRevertValue()));
TQToolTip::add( m_stdButt,
- i18n( "Revert value back to its standard value %1" ).arg( stdValue ));
+ i18n( "Revert value back to its standard value %1" ).tqarg( stdValue ));
hb->addWidget( m_stdButt, 0 );
hb->addSpacing( 4 );
}
- slider = new TQSlider( (int) min, (int)max, 1, (int)min, TQSlider::Horizontal, this, "AUTO_SLIDER_" );
+ slider = new TQSlider( (int) min, (int)max, 1, (int)min, Qt::Horizontal, this, "AUTO_SLIDER_" );
slider->setTickmarks( TQSlider::Below );
- slider->setTickInterval( int(QMAX( (max-min)/10, 1 )) );
- slider->setSteps( int(QMAX( (max-min)/20, 1) ), int(QMAX( (max-min)/10, 1) ) );
+ slider->setTickInterval( int(TQMAX( (max-min)/10, 1 )) );
+ slider->setSteps( int(TQMAX( (max-min)/20, 1) ), int(TQMAX( (max-min)/10, 1) ) );
slider->setMinimumWidth( 140 );
/* set a buddy */
l1->setBuddy( slider );
@@ -82,7 +82,7 @@ KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
/* set Value 0 to the widget */
slider->setValue( (int) min -1 );
- /* Add to layout widget and activate */
+ /* Add to tqlayout widget and activate */
hb->addWidget( slider, 36 );
hb->addSpacing( 4 );
hb->addWidget( m_spin, 0 );
@@ -149,8 +149,8 @@ KScanSlider::~KScanSlider()
/* ====================================================================== */
-KScanEntry::KScanEntry( TQWidget *parent, const TQString& text )
- : TQFrame( parent )
+KScanEntry::KScanEntry( TQWidget *tqparent, const TQString& text )
+ : TQFrame( tqparent )
{
TQHBoxLayout *hb = new TQHBoxLayout( this );
@@ -170,7 +170,7 @@ KScanEntry::KScanEntry( TQWidget *parent, const TQString& text )
TQString KScanEntry::text( void ) const
{
- TQString str = TQString::null;
+ TQString str = TQString();
// kdDebug(29000) << "entry is "<< entry << endl;
if(entry)
{
@@ -213,9 +213,9 @@ void KScanEntry::slReturnPressed( void )
-KScanCombo::KScanCombo( TQWidget *parent, const TQString& text,
+KScanCombo::KScanCombo( TQWidget *tqparent, const TQString& text,
const TQStrList& list )
- : TQHBox( parent ),
+ : TQHBox( tqparent ),
combo(0)
{
createCombo( text );
@@ -224,9 +224,9 @@ KScanCombo::KScanCombo( TQWidget *parent, const TQString& text,
combolist = list;
}
-KScanCombo::KScanCombo( TQWidget *parent, const TQString& text,
+KScanCombo::KScanCombo( TQWidget *tqparent, const TQString& text,
const TQStringList& list )
- : TQHBox( parent ),
+ : TQHBox( tqparent ),
combo(0)
{
createCombo( text );
@@ -260,7 +260,7 @@ void KScanCombo::createCombo( const TQString& text )
void KScanCombo::slSetEntry( const TQString &t )
{
if( t.isNull() ) return;
- int i = combolist.find( t.local8Bit() );
+ int i = combolist.tqfind( t.local8Bit() );
/* Important to check value to avoid recursive signals ;) */
if( i == combo->currentItem() )
diff --git a/libkscan/kscanslider.h b/libkscan/kscanslider.h
index 9d95bd7c..30fc6464 100644
--- a/libkscan/kscanslider.h
+++ b/libkscan/kscanslider.h
@@ -42,16 +42,17 @@ class TQLabel;
*
* @author Klaas Freitag <freitag@suse.de>
*/
-class KScanSlider : public QFrame
+class KScanSlider : public TQFrame
{
Q_OBJECT
- Q_PROPERTY( int slider_val READ value WRITE slSetSlider )
+ TQ_OBJECT
+ TQ_PROPERTY( int slider_val READ value WRITE slSetSlider )
public:
/**
* Create the slider.
*
- * @param parent parent widget
+ * @param tqparent tqparent widget
* @param text is the text describing the the slider value. If the text
* contains a '&', a buddy for the slider will be created.
* @param min minimum slider value
@@ -60,7 +61,7 @@ public:
* appears on the left of the slider.
* @param stdValue the value to which the standard button resets the slider.
*/
- KScanSlider( TQWidget *parent, const TQString& text,
+ KScanSlider( TQWidget *tqparent, const TQString& text,
double min, double max, bool haveStdButt=false,
int stdValue=0);
/**
@@ -101,8 +102,8 @@ private slots:
void slSliderChange( int );
private:
- QSlider *slider;
- QLabel *l1, *numdisp;
+ TQSlider *slider;
+ TQLabel *l1, *numdisp;
TQSpinBox *m_spin;
int m_stdValue;
TQPushButton *m_stdButt;
@@ -114,18 +115,19 @@ private:
/**
* a entry field with a prefix text for description.
*/
-class KScanEntry : public QFrame
+class KScanEntry : public TQFrame
{
Q_OBJECT
- Q_PROPERTY( TQString text READ text WRITE slSetEntry )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString text READ text WRITE slSetEntry )
public:
/**
* create a new entry field prepended by text.
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @text the prefix text
*/
- KScanEntry( TQWidget *parent, const TQString& text );
+ KScanEntry( TQWidget *tqparent, const TQString& text );
// ~KScanEntry();
/**
@@ -167,21 +169,22 @@ private:
/**
* a combobox filled with a decriptional text.
*/
-class KScanCombo : public QHBox
+class KScanCombo : public TQHBox
{
Q_OBJECT
- Q_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry )
public:
/**
* create a combobox with prepended text.
*
- * @param parent parent widget
+ * @param tqparent tqparent widget
* @param text the text the combobox is prepended by
* @param list a stringlist with values the list should contain.
*/
- KScanCombo( TQWidget *parent, const TQString& text, const TQStrList& list );
- KScanCombo( TQWidget *parent, const TQString& text, const TQStringList& list );
+ KScanCombo( TQWidget *tqparent, const TQString& text, const TQStrList& list );
+ KScanCombo( TQWidget *tqparent, const TQString& text, const TQStringList& list );
// ~KScanCombo();
/**
@@ -234,8 +237,8 @@ signals:
private:
void createCombo( const TQString& text );
- QComboBox *combo;
- QStrList combolist;
+ TQComboBox *combo;
+ TQStrList combolist;
class KScanComboPrivate;
KScanComboPrivate *d;
diff --git a/libkscan/massscandialog.cpp b/libkscan/massscandialog.cpp
index 9d4a5f91..372d2a7c 100644
--- a/libkscan/massscandialog.cpp
+++ b/libkscan/massscandialog.cpp
@@ -30,8 +30,8 @@
#include "massscandialog.h"
-MassScanDialog::MassScanDialog( TQWidget *parent )
- :TQDialog( parent, "MASS_SCAN", true )
+MassScanDialog::MassScanDialog( TQWidget *tqparent )
+ :TQDialog( tqparent, "MASS_SCAN", true )
{
setCaption( i18n( "ADF Scanning" ));
kdDebug(29000) << "Starting MassScanDialog!" << endl;
diff --git a/libkscan/massscandialog.h b/libkscan/massscandialog.h
index dc1120b5..1cd68153 100644
--- a/libkscan/massscandialog.h
+++ b/libkscan/massscandialog.h
@@ -30,11 +30,12 @@ class TQLabel;
*@author Klaas Freitag
*/
-class MassScanDialog : public QDialog
+class MassScanDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- MassScanDialog( TQWidget *parent);
+ MassScanDialog( TQWidget *tqparent);
~MassScanDialog();
public slots:
diff --git a/libkscan/previewer.cpp b/libkscan/previewer.cpp
index ec1f9065..5fde3f06 100644
--- a/libkscan/previewer.cpp
+++ b/libkscan/previewer.cpp
@@ -106,8 +106,8 @@ public:
TQMemArray<long> m_widthSum;
};
-Previewer::Previewer(TQWidget *parent, const char *name )
- : TQWidget(parent,name)
+Previewer::Previewer(TQWidget *tqparent, const char *name )
+ : TQWidget(tqparent,name)
{
d = new PreviewerPrivate();
@@ -119,10 +119,10 @@ Previewer::Previewer(TQWidget *parent, const char *name )
htop->addWidget( frame );
TQVBoxLayout *top = new TQVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() );
- layout = new TQHBoxLayout( KDialog::spacingHint() );
- top->addLayout( layout, 9 );
+ tqlayout = new TQHBoxLayout( KDialog::spacingHint() );
+ top->addLayout( tqlayout, 9 );
TQVBoxLayout *left = new TQVBoxLayout( KDialog::spacingHint() );
- layout->addLayout( left, 2 );
+ tqlayout->addLayout( left, 2 );
/* Load autoselection values from Config file */
KConfig *cfg = KGlobal::config();
@@ -141,17 +141,17 @@ Previewer::Previewer(TQWidget *parent, const char *name )
img_canvas->setDefaultScaleKind( ImageCanvas::DYNAMIC );
img_canvas->enableContextMenu(true);
- img_canvas->repaint();
- layout->addWidget( img_canvas, 6 );
+ img_canvas->tqrepaint();
+ tqlayout->addWidget( img_canvas, 6 );
/* Actions for the previewer zoom */
KAction *act;
act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I,
- this, TQT_SLOT( slScaleToWidth()), this, "preview_scaletowidth" );
+ TQT_TQOBJECT(this), TQT_SLOT( slScaleToWidth()), TQT_TQOBJECT(this), "preview_scaletowidth" );
act->plug( img_canvas->contextMenu());
act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H,
- this, TQT_SLOT( slScaleToHeight()), this, "preview_scaletoheight" );
+ TQT_TQOBJECT(this), TQT_SLOT( slScaleToHeight()), TQT_TQOBJECT(this), "preview_scaletoheight" );
act->plug( img_canvas->contextMenu());
/*Signals: Control the custom-field and show size of selection */
@@ -200,7 +200,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
/** Autoselection Box **/
- d->m_autoSelGroup = new TQGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame);
+ d->m_autoSelGroup = new TQGroupBox( 1,Qt::Horizontal, i18n("Auto-Selection"), frame);
TQHBox *hbox = new TQHBox(d->m_autoSelGroup);
d->m_cbAutoSel = new TQCheckBox( i18n("Active on"), hbox );
@@ -246,7 +246,7 @@ Previewer::Previewer(TQWidget *parent, const char *name )
left->addWidget(d->m_autoSelGroup);
/* Labels for the dimension */
- TQGroupBox *gbox = new TQGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" );
+ TQGroupBox *gbox = new TQGroupBox( 1,Qt::Horizontal, i18n("Selection"), frame, "GROUPBOX" );
TQLabel *l2 = new TQLabel( i18n("width - mm" ), gbox );
TQLabel *l3 = new TQLabel( i18n("height - mm" ), gbox );
@@ -477,11 +477,11 @@ void Previewer::slNewDimen(TQRect r)
selectionHeightMm = (overallHeight / 1000 * r.height());
TQString s;
- s = i18n("width %1 mm").arg( int(selectionWidthMm));
+ s = i18n("width %1 mm").tqarg( int(selectionWidthMm));
emit(setScanWidth(s));
kdDebug(29000) << "Setting new Dimension " << s << endl;
- s = i18n("height %1 mm").arg(int(selectionHeightMm));
+ s = i18n("height %1 mm").tqarg(int(selectionHeightMm));
emit(setScanHeight(s));
recalcFileSize( );
@@ -727,7 +727,7 @@ void Previewer::findSelection( )
for( x = 0; x < iWidth; x++ )
{
- int gray = qGray( img->pixel( x, line ));
+ int gray = tqGray( img->pixel( x, line ));
// kdDebug(29000) << "Gray-Value at line " << gray << endl;
Q_ASSERT( line < iHeight );
Q_ASSERT( x < iWidth );
diff --git a/libkscan/previewer.h b/libkscan/previewer.h
index 6d9a7b10..45a270ea 100644
--- a/libkscan/previewer.h
+++ b/libkscan/previewer.h
@@ -40,11 +40,12 @@ class TQComboBox;
class TQRadioButton;
class TQHBoxLayout;
-class Previewer : public QWidget
+class Previewer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Previewer(TQWidget *parent=0, const char *name=0);
+ Previewer(TQWidget *tqparent=0, const char *name=0);
~Previewer();
ImageCanvas *getImageCanvas( void ){ return( img_canvas ); }
@@ -88,7 +89,7 @@ private:
TQPoint calcPercent( int, int );
- TQHBoxLayout *layout;
+ TQHBoxLayout *tqlayout;
ImageCanvas *img_canvas;
TQComboBox *pre_format_combo;
TQMemArray<TQCString> format_ids;
diff --git a/libkscan/scandialog.cpp b/libkscan/scandialog.cpp
index 2e3db229..bc9a7854 100644
--- a/libkscan/scandialog.cpp
+++ b/libkscan/scandialog.cpp
@@ -51,34 +51,34 @@ extern "C" {
}
}
-ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name )
- : KScanDialogFactory( parent, name )
+ScanDialogFactory::ScanDialogFactory( TQObject *tqparent, const char *name )
+ : KScanDialogFactory( tqparent, name )
{
setName( "ScanDialogFactory" );
- KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") );
+ KGlobal::locale()->insertCatalogue( TQString::tqfromLatin1("libkscan") );
}
-KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent,
+KScanDialog * ScanDialogFactory::createDialog( TQWidget *tqparent,
const char *name, bool modal)
{
- return new ScanDialog( parent, name, modal );
+ return new ScanDialog( tqparent, name, modal );
}
///////////////////////////////////////////////////////////////////
-ScanDialog::ScanDialog( TQWidget *parent, const char *name, bool modal )
- : KScanDialog( Tabbed, Close|Help, parent, name, modal ),
+ScanDialog::ScanDialog( TQWidget *tqparent, const char *name, bool modal )
+ : KScanDialog( Tabbed, Close|Help, tqparent, name, modal ),
good_scan_connect(false)
{
TQVBox *page = addVBoxPage( i18n("&Scanning") );
- splitter = new TQSplitter( Horizontal, page, "splitter" );
+ splitter = new TQSplitter(Qt::Horizontal, page, "splitter" );
Q_CHECK_PTR( splitter );
m_scanParams = 0;
- m_device = new KScanDevice( this );
+ m_device = new KScanDevice( TQT_TQOBJECT(this) );
connect(m_device, TQT_SIGNAL(sigNewImage(TQImage *, ImgScanInfo*)),
this, TQT_SLOT(slotFinalImage(TQImage *, ImgScanInfo *)));
@@ -113,7 +113,7 @@ void ScanDialog::createOptionsTab( void )
TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" );
TQLabel *label = new TQLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ),
gb );
- label->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ label->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
/* Checkbox for asking for scanner on startup */
cb_askOnStart = new TQCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb );
@@ -130,7 +130,7 @@ void ScanDialog::createOptionsTab( void )
/* Read settings for startup behavior */
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false );
@@ -144,7 +144,7 @@ void ScanDialog::createOptionsTab( void )
TQWidget *spaceEater = new TQWidget( page );
Q_CHECK_PTR( spaceEater );
- spaceEater->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
+ spaceEater->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
}
@@ -154,7 +154,7 @@ void ScanDialog::slotNetworkToggle( bool state)
kdDebug(29000) << "slotNetworkToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config();
- c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_ONLY_LOCAL, writestate, true, true );
}
@@ -164,7 +164,7 @@ void ScanDialog::slotAskOnStartToggle(bool state)
kdDebug(29000) << "slotAskOnStartToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config();
- c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::tqfromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true );
}
@@ -176,7 +176,7 @@ void ScanDialog::slotScanStart( )
KLed *led = m_scanParams->operationLED();
if( led )
{
- led->setColor( Qt::red );
+ led->setColor( TQt::red );
led->setState( KLed::On );
}
@@ -190,7 +190,7 @@ void ScanDialog::slotAcquireStart( )
KLed *led = m_scanParams->operationLED();
if( led )
{
- led->setColor( Qt::green );
+ led->setColor( TQt::green );
}
}
@@ -205,7 +205,7 @@ void ScanDialog::slotScanFinished( KScanStat status )
KLed *led = m_scanParams->operationLED();
if( led )
{
- led->setColor( Qt::green );
+ led->setColor( TQt::green );
led->setState( KLed::Off );
}
@@ -314,7 +314,7 @@ bool ScanDialog::setup()
kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */
- TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
+ TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width());
kdDebug(29000) << "Read Splitter-Sizes " << key << endl;
splitter->setSizes( kfg->readIntListEntry( key ));
}
@@ -336,7 +336,7 @@ void ScanDialog::slotClose()
kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */
- TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
+ TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width());
kfg->writeEntry( key, splitter->sizes(), true, true);
}
}
diff --git a/libkscan/scandialog.h b/libkscan/scandialog.h
index 71667326..5077f050 100644
--- a/libkscan/scandialog.h
+++ b/libkscan/scandialog.h
@@ -32,9 +32,10 @@ class TQSplitter;
class ScanDialog : public KScanDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScanDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
+ ScanDialog( TQWidget *tqparent=0, const char *name=0, bool modal=false );
~ScanDialog();
virtual bool setup();
@@ -71,10 +72,10 @@ private:
class ScanDialogFactory : public KScanDialogFactory
{
public:
- ScanDialogFactory( TQObject *parent=0, const char *name=0 );
+ ScanDialogFactory( TQObject *tqparent=0, const char *name=0 );
protected:
- virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0,
+ virtual KScanDialog * createDialog( TQWidget *tqparent=0, const char *name=0,
bool modal=false );
diff --git a/libkscan/scanparams.cpp b/libkscan/scanparams.cpp
index b121c77d..f8d21121 100644
--- a/libkscan/scanparams.cpp
+++ b/libkscan/scanparams.cpp
@@ -53,8 +53,8 @@
-ScanParams::ScanParams( TQWidget *parent, const char *name )
- : TQVBox( parent, name ),
+ScanParams::ScanParams( TQWidget *tqparent, const char *name )
+ : TQVBox( tqparent, name ),
m_firstGTEdit( true )
{
/* first some initialisation and debug messages */
@@ -111,7 +111,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
/* initialise own widgets */
cb_gray_preview = 0;
- /* A top layout box */
+ /* A top tqlayout box */
// TQVBoxLayout *top = new TQVBoxLayout(this, 6);
TQHBox *hb = new TQHBox( this );
hb->setSpacing( KDialog::spacingHint() );
@@ -120,7 +120,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
(void ) new TQLabel( cap, hb );
m_led = new KLed( hb );
m_led->setState( KLed::Off );
- m_led->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
+ m_led->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
(void) new KSeparator( KSeparator::HLine, this);
@@ -160,7 +160,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStartScan()) );
pb = kbb->addButton( i18n( "&Preview Scan" ));
connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slAcquirePreview()) );
- kbb->layout();
+ kbb->tqlayout();
/* Initialise the progress dialog */
progressDialog = new TQProgressDialog( i18n("Scanning in progress"),
@@ -501,9 +501,9 @@ TQScrollView *ScanParams::scannerParams( )
}
TQWidget *spacer = new TQWidget( pbox );
- spacer->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
+ spacer->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
- pbox->setMinimumWidth( pbox->sizeHint().width() );
+ pbox->setMinimumWidth( pbox->tqsizeHint().width() );
sv->setMinimumWidth( pbox->minimumWidth() );
sv->addChild( pbox );
@@ -547,7 +547,7 @@ void ScanParams::slSourceSelect( void )
sources = so.getList();
#undef CHEAT_FOR_DEBUGGING
#ifdef CHEAT_FOR_DEBUGGING
- if( sources.find( "Automatic Document Feeder" ) == -1)
+ if( sources.tqfind( "Automatic Document Feeder" ) == -1)
sources.append( "Automatic Document Feeder" );
#endif
@@ -575,7 +575,7 @@ void ScanParams::slSourceSelect( void )
* images, if a single file is selected, the virt Scanner just reads
* one file.
* If SANE Debug Mode is selected, only pnm can be loaded.
- * on Qt mode, all available Qt-Formats are ok.
+ * on TQt mode, all available TQt-Formats are ok.
*/
void ScanParams::slFileSelect( void )
{
@@ -583,7 +583,7 @@ void ScanParams::slFileSelect( void )
TQString filter;
TQCString prefix = "\n*.";
- if( scan_mode == ID_QT_IMGIO )
+ if( scan_mode == ID_TQT_IMGIO )
{
TQStrList filterList = TQImage::inputFormats();
filter = i18n( "*|All Files (*)");
@@ -591,7 +591,7 @@ void ScanParams::slFileSelect( void )
fi_item = filterList.next() )
{
- filter.append( TQString::fromLatin1( prefix + fi_item.lower()) );
+ filter.append( TQString::tqfromLatin1( prefix + fi_item.lower()) );
}
}
else
@@ -616,7 +616,7 @@ void ScanParams::slFileSelect( void )
if ( !fileName.isNull() && virt_filename ) { // got a file name
kdDebug(29000) << "Got fileName: " << fileName << endl;
// write Value to SANEOption, it updates itself.
- virt_filename->set( TQFile::encodeName( fileName ) );
+ virt_filename->set( TQFile::encodeName( fileName ).data() );
}
}
@@ -626,7 +626,7 @@ void ScanParams::slFileSelect( void )
void ScanParams::slVirtScanModeSelect( int id )
{
if( id == 0 ) {
- scan_mode = ID_SANE_DEBUG; /* , ID_QT_IMGIO */
+ scan_mode = ID_SANE_DEBUG; /* , ID_TQT_IMGIO */
sane_device->guiSetEnabled( "three-pass", true );
sane_device->guiSetEnabled( "grayify", true );
sane_device->guiSetEnabled( SANE_NAME_CONTRAST, true );
@@ -638,11 +638,11 @@ void ScanParams::slVirtScanModeSelect( int id )
kdDebug(29000) << "Found File in Filename-Option: " << vf << endl;
TQFileInfo fi( vf );
- if( fi.extension() != TQString::fromLatin1("pnm") )
+ if( fi.extension() != TQString::tqfromLatin1("pnm") )
virt_filename->set(TQCString(""));
}
} else {
- scan_mode = ID_QT_IMGIO;
+ scan_mode = ID_TQT_IMGIO;
sane_device->guiSetEnabled( "three-pass", false );
sane_device->guiSetEnabled( "grayify", false );
sane_device->guiSetEnabled( SANE_NAME_CONTRAST, false );
@@ -672,13 +672,13 @@ void ScanParams::virtualScannerParams( void )
- TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all Qt modes)"),
- bg_virt_scan_mode, "VirtScanQtModes" );
+ TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all TQt modes)"),
+ bg_virt_scan_mode, "VirtScanTQtModes" );
rb1->setChecked( true );
rb2->setChecked( false );
- if( scan_mode == ID_QT_IMGIO )
+ if( scan_mode == ID_TQT_IMGIO )
{
rb2->setChecked( true );
rb1->setChecked( false );
@@ -695,7 +695,7 @@ void ScanParams::virtualScannerParams( void )
TQHBoxLayout *hb = new TQHBoxLayout();
top->addLayout( hb );
w = virt_filename->widget();
- w->setMinimumHeight( (w->sizeHint()).height());
+ w->setMinimumHeight( (w->tqsizeHint()).height());
connect( w, TQT_SIGNAL(returnPressed()), this,
TQT_SLOT( slCheckGlob()));
@@ -766,7 +766,7 @@ void ScanParams::slStartScan( void )
kdDebug(29000) << "Called start-scan-Slot!" << endl;
TQString q;
- if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_QT_IMGIO )
+ if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_TQT_IMGIO )
{
if( virt_filename )
q = virt_filename->get();
@@ -798,7 +798,7 @@ void ScanParams::slStartScan( void )
// stat = performADFScan();
}
} else {
- kdDebug(29000) << "Reading dir by Qt-internal imagereading file " << q << endl;
+ kdDebug(29000) << "Reading dir by TQt-internal imagereading file " << q << endl;
sane_device->acquire( q );
}
}
diff --git a/libkscan/scanparams.h b/libkscan/scanparams.h
index 7508cdb9..d3536e42 100644
--- a/libkscan/scanparams.h
+++ b/libkscan/scanparams.h
@@ -42,16 +42,17 @@ class TQPushButton;
class TQCheckBox;
class TQButtonGroup;
-typedef enum { ID_SANE_DEBUG, ID_QT_IMGIO, ID_SCAN } ScanMode;
+typedef enum { ID_SANE_DEBUG, ID_TQT_IMGIO, ID_SCAN } ScanMode;
-class ScanParams : public QVBox
+class ScanParams : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScanParams( TQWidget *parent, const char *name = 0);
+ ScanParams( TQWidget *tqparent, const char *name = 0);
~ScanParams();
#if 0
- TQSize sizeHint( );
+ TQSize tqsizeHint( );
#endif
bool connectDevice( KScanDevice* );
@@ -60,7 +61,7 @@ public:
public slots:
/**
* In this slot, a custom scan window can be set, e.g. through a preview
- * image with a area selector. The QRect-param needs to contain values
+ * image with a area selector. The TQRect-param needs to contain values
* between 0 and 1000, which are interpreted as tenth of percent of the
* whole image dimensions.
**/
diff --git a/libkscan/scansourcedialog.cpp b/libkscan/scansourcedialog.cpp
index fcb3fc25..2edac6f8 100644
--- a/libkscan/scansourcedialog.cpp
+++ b/libkscan/scansourcedialog.cpp
@@ -45,8 +45,8 @@ extern "C"{
#endif
-ScanSourceDialog::ScanSourceDialog( TQWidget *parent, const TQStrList list, ADF_BEHAVE adfBehave )
- : KDialogBase( parent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"),
+ScanSourceDialog::ScanSourceDialog( TQWidget *tqparent, const TQStrList list, ADF_BEHAVE adfBehave )
+ : KDialogBase( tqparent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"),
Ok|Cancel,Ok, true)
{
TQVBox *vbox = makeVBoxMainWidget();
diff --git a/libkscan/scansourcedialog.h b/libkscan/scansourcedialog.h
index 61ae4a6e..3b0662d8 100644
--- a/libkscan/scansourcedialog.h
+++ b/libkscan/scansourcedialog.h
@@ -37,8 +37,9 @@ class TQButtonGroup;
class ScanSourceDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScanSourceDialog( TQWidget *parent, const TQStrList, ADF_BEHAVE );
+ ScanSourceDialog( TQWidget *tqparent, const TQStrList, ADF_BEHAVE );
~ScanSourceDialog();
// void fillWithSources( TQStrList *list );
diff --git a/libkscan/sizeindicator.cpp b/libkscan/sizeindicator.cpp
index bd259bd3..3b0a2a18 100644
--- a/libkscan/sizeindicator.cpp
+++ b/libkscan/sizeindicator.cpp
@@ -29,12 +29,12 @@
-SizeIndicator::SizeIndicator( TQWidget *parent, long thres, long crit )
- :TQLabel( parent )
+SizeIndicator::SizeIndicator( TQWidget *tqparent, long thres, long crit )
+ :TQLabel( tqparent )
{
sizeInByte = -1;
setFrameStyle( TQFrame::Box | TQFrame::Sunken );
- setMinimumWidth( fontMetrics().width( TQString::fromLatin1("MMM.MM MB") ));
+ setMinimumWidth( fontMetrics().width( TQString::tqfromLatin1("MMM.MM MB") ));
setCritical( crit );
threshold = thres;
@@ -79,7 +79,7 @@ void SizeIndicator::setSizeInByte( long newSize )
fwidth = 2;
}
- t = unit.arg( sizer, fwidth, 'f', precision);
+ t = unit.tqarg( sizer, fwidth, 'f', precision);
setText(t);
}
@@ -100,7 +100,7 @@ void SizeIndicator::drawContents( TQPainter *p )
warnColor.setHsv( 0, c, c );
p->drawImage( 0,0,
- KImageEffect::unbalancedGradient( s, colorGroup().background(),
+ KImageEffect::unbalancedGradient( s, tqcolorGroup().background(),
warnColor, KImageEffect::CrossDiagonalGradient, 200,200 ));
}
/* Displaying the text */
diff --git a/libkscan/sizeindicator.h b/libkscan/sizeindicator.h
index d49c60b5..0d248fec 100644
--- a/libkscan/sizeindicator.h
+++ b/libkscan/sizeindicator.h
@@ -37,10 +37,11 @@ class TQPainter;
* user that he is doing something obvious.
*/
-class SizeIndicator: public QLabel
+class SizeIndicator: public TQLabel
{
Q_OBJECT
- // Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt )
+ TQ_OBJECT
+ // TQ_PROPERTY( KGammaTable *gt READ getGt WRITE setGt )
public:
/**
@@ -49,7 +50,7 @@ public:
* @param crit: Critical value, not yet used.
*/
- SizeIndicator( TQWidget *parent, long thres = DEFAULT_THRESHOLD,
+ SizeIndicator( TQWidget *tqparent, long thres = DEFAULT_THRESHOLD,
long crit = DEFAULT_CRITICAL );
/**
* destructor does not really do much yet.