diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
commit | eba47f8f0637f451e21348187591e1f1fd58ac74 (patch) | |
tree | 448f10b95c656604acc331a3236c1e59bde5c1ad /libkscan | |
parent | c7e8736c69373f48b0401319757c742e8607431a (diff) | |
download | tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip |
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkscan')
34 files changed, 1050 insertions, 1050 deletions
diff --git a/libkscan/devselector.cpp b/libkscan/devselector.cpp index 8d1a90ad..b30316c9 100644 --- a/libkscan/devselector.cpp +++ b/libkscan/devselector.cpp @@ -19,16 +19,16 @@ #include <stdlib.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcstring.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qstrlist.h> -#include <qstringlist.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcstring.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqstrlist.h> +#include <tqstringlist.h> #include <kapplication.h> #include <kconfig.h> @@ -41,36 +41,36 @@ #include "devselector.h" -DeviceSelector::DeviceSelector( QWidget *parent, QStrList& devList, - const QStringList& hrdevList ) +DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, + const TQStringList& hrdevList ) : KDialogBase( parent, "DeviceSel", true, i18n("Welcome to Kooka"), Ok|Cancel, Ok, true ) { kdDebug(29000) << "Starting DevSelector!" << endl; // Layout-Boxes - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); Q_CHECK_PTR( page ); setMainWidget( page ); - QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() ); - QLabel *label = new QLabel( page, "captionImage" ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() ); + TQLabel *label = new TQLabel( page, "captionImage" ); Q_CHECK_PTR( label ); - label->setPixmap( QPixmap( "kookalogo.png" )); + label->setPixmap( TQPixmap( "kookalogo.png" )); label->resize( 100, 350 ); topLayout->addWidget( label ); - selectBox = new QButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ), + selectBox = new TQButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ), page, "ButtonBox"); Q_CHECK_PTR( selectBox ); selectBox->setExclusive( true ); topLayout->addWidget( selectBox ); setScanSources( devList, hrdevList ); - cbSkipDialog = new QCheckBox( i18n("&Do not ask on startup again, always use this device"), + cbSkipDialog = new TQCheckBox( i18n("&Do not ask on startup again, always use this device"), page, "CBOX_SKIP_ON_START" ); KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); cbSkipDialog->setChecked( skipDialog ); @@ -78,18 +78,18 @@ DeviceSelector::DeviceSelector( QWidget *parent, QStrList& devList, } -QCString DeviceSelector::getDeviceFromConfig( void ) const +TQCString DeviceSelector::getDeviceFromConfig( void ) const { KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); - QCString result; + TQCString result; /* in this case, the user has checked 'Do not ask me again' and does not * want to be bothered any more. */ - result = QFile::encodeName(gcfg->readEntry( STARTUP_SCANDEV, "" )); + result = TQFile::encodeName(gcfg->readEntry( STARTUP_SCANDEV, "" )); kdDebug(29000) << "Got scanner from config file to use: " << result << endl; /* Now check if the scanner read from the config file is available ! @@ -102,7 +102,7 @@ QCString DeviceSelector::getDeviceFromConfig( void ) const else { kdDebug(29000) << "Scanner from Config file is _not_ available" << endl; - result = QCString(); + result = TQCString(); } return( result ); @@ -113,7 +113,7 @@ bool DeviceSelector::getShouldSkip( void ) const return( cbSkipDialog->isChecked()); } -QCString DeviceSelector::getSelectedDevice( void ) const +TQCString DeviceSelector::getSelectedDevice( void ) const { unsigned int selID = selectBox->id( selectBox->selected() ); @@ -126,7 +126,7 @@ QCString DeviceSelector::getSelectedDevice( void ) const /* Store scanner selection settings */ KConfig *c = KGlobal::config(); - c->setGroup(QString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::fromLatin1(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 ); @@ -136,24 +136,24 @@ QCString DeviceSelector::getSelectedDevice( void ) const } -void DeviceSelector::setScanSources( const QStrList& sources, - const QStringList& hrSources ) +void DeviceSelector::setScanSources( const TQStrList& sources, + const TQStringList& hrSources ) { bool default_ok = false; KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP)); - QCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit(); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); + TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit(); /* Selector-Stuff*/ uint nr = 0; int checkDefNo = 0; - QStrListIterator it( sources ); - QStringList::ConstIterator it2 = hrSources.begin(); + TQStrListIterator it( sources ); + TQStringList::ConstIterator it2 = hrSources.begin(); for ( ; it.current(); ++it, ++it2 ) { - QString text = QString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( QString::fromLocal8Bit(*it) ).arg( *it2 ); - QRadioButton *rb = new QRadioButton( text, selectBox ); + TQString text = TQString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( TQString::fromLocal8Bit(*it) ).arg( *it2 ); + TQRadioButton *rb = new TQRadioButton( text, selectBox ); selectBox->insert( rb ); devices.append( *it ); @@ -168,7 +168,7 @@ void DeviceSelector::setScanSources( const QStrList& sources, if( ! default_ok ) { /* if no default found, set the first */ - QRadioButton *rb = (QRadioButton*) selectBox->find( checkDefNo ); + TQRadioButton *rb = (TQRadioButton*) selectBox->find( checkDefNo ); if ( rb ) rb->setChecked( true ); } diff --git a/libkscan/devselector.h b/libkscan/devselector.h index 9fa80469..011c4a4e 100644 --- a/libkscan/devselector.h +++ b/libkscan/devselector.h @@ -23,10 +23,10 @@ #include <kdialogbase.h> -class QButtonGroup; -class QStrList; -class QStringList; -class QCheckBox; +class TQButtonGroup; +class TQStrList; +class TQStringList; +class TQCheckBox; /** *@author Klaas Freitag @@ -57,11 +57,11 @@ class DeviceSelector: public KDialogBase public: /** * constructs the dialog class - * @param QWidget *parent - the parent - * @param QStrList backends - a list of device names retrieved from the scan device - * @param QStrList scannerNames - a list of corresponding human readable sanner names. + * @param TQWidget *parent - the parent + * @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( QWidget *parent, QStrList&, const QStringList& ); + DeviceSelector( TQWidget *parent, TQStrList&, const TQStringList& ); ~DeviceSelector(); /** @@ -69,7 +69,7 @@ public: * @return a CString containing the technical name of the selected device (taken from * the backends-list from the constructor) */ - QCString getSelectedDevice( void ) const; + TQCString getSelectedDevice( void ) const; /** * returns the users selection if the dialog should be skipped in future. @@ -85,15 +85,15 @@ public: * @return a string containing the device to open or null if no device is specified or the * one specified is not valid. */ - QCString getDeviceFromConfig( void ) const; + TQCString getDeviceFromConfig( void ) const; public slots: - void setScanSources( const QStrList&, const QStringList& ); + void setScanSources( const TQStrList&, const TQStringList& ); private: - QButtonGroup *selectBox; - mutable QStrList devices; - QCheckBox *cbSkipDialog; + TQButtonGroup *selectBox; + mutable TQStrList devices; + TQCheckBox *cbSkipDialog; bool configDevValid; class DeviceSelectorPrivate; diff --git a/libkscan/dispgamma.cpp b/libkscan/dispgamma.cpp index 2892d563..478096e9 100644 --- a/libkscan/dispgamma.cpp +++ b/libkscan/dispgamma.cpp @@ -17,12 +17,12 @@ Boston, MA 02110-1301, USA. */ -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "dispgamma.h" -DispGamma::DispGamma( QWidget *parent ) : QWidget( parent ) +DispGamma::DispGamma( TQWidget *parent ) : TQWidget( parent ) { vals = 0; margin = 10; @@ -33,14 +33,14 @@ DispGamma::~DispGamma() } -void DispGamma::resizeEvent (QResizeEvent* ) +void DispGamma::resizeEvent (TQResizeEvent* ) { repaint(); } -void DispGamma::paintEvent( QPaintEvent *ev ) +void DispGamma::paintEvent( TQPaintEvent *ev ) { - QPainter p(this); + TQPainter p(this); int w = vals->size() +1; // Viewport auf margin setzen. @@ -53,7 +53,7 @@ void DispGamma::paintEvent( QPaintEvent *ev ) p.setBrush( colorGroup().base() ); // Backgrond p.drawRect( 0,0, w, 256 ); - p.setPen( QPen(colorGroup().midlight(), 1, DotLine)); + p.setPen( TQPen(colorGroup().midlight(), 1, DotLine)); // horizontal Grid for( int l = 1; l < 5; l++ ) p.drawLine( 1, l*51, 255, l*51 ); @@ -73,13 +73,13 @@ void DispGamma::paintEvent( QPaintEvent *ev ) } -QSize DispGamma::sizeHint( void ) +TQSize DispGamma::sizeHint( void ) { - return QSize( 256 + 2*margin,256 + 2 * margin ); + return TQSize( 256 + 2*margin,256 + 2 * margin ); } -QSizePolicy DispGamma::sizePolicy( void ) +TQSizePolicy DispGamma::sizePolicy( void ) { - return QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + return TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ); } #include "dispgamma.moc" diff --git a/libkscan/dispgamma.h b/libkscan/dispgamma.h index 86c8c1b4..8e917d83 100644 --- a/libkscan/dispgamma.h +++ b/libkscan/dispgamma.h @@ -20,10 +20,10 @@ #ifndef DISPGAMMA_H #define DISPGAMMA_H -#include <qwidget.h> -#include <qsizepolicy.h> -#include <qsize.h> -#include <qmemarray.h> +#include <tqwidget.h> +#include <tqsizepolicy.h> +#include <tqsize.h> +#include <tqmemarray.h> extern "C"{ #include <sane/sane.h> @@ -33,26 +33,26 @@ extern "C"{ *@author Klaas Freitag */ -class DispGamma : public QWidget { +class DispGamma : public TQWidget { Q_OBJECT public: - DispGamma( QWidget *parent ); + DispGamma( TQWidget *parent ); ~DispGamma(); - QSize sizeHint( void ); - QSizePolicy sizePolicy( void ); + TQSize sizeHint( void ); + TQSizePolicy sizePolicy( void ); - void setValueRef( QMemArray<SANE_Word> *newVals ) + void setValueRef( TQMemArray<SANE_Word> *newVals ) { vals = newVals; } protected: - void paintEvent (QPaintEvent *ev ); - void resizeEvent( QResizeEvent* ); + void paintEvent (TQPaintEvent *ev ); + void resizeEvent( TQResizeEvent* ); private: - QMemArray<SANE_Word> *vals; + TQMemArray<SANE_Word> *vals; int margin; class DispGammaPrivate; diff --git a/libkscan/gammadialog.cpp b/libkscan/gammadialog.cpp index 4a8b3302..ef8a87a2 100644 --- a/libkscan/gammadialog.cpp +++ b/libkscan/gammadialog.cpp @@ -17,11 +17,11 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qpushbutton.h> -#include <qslider.h> -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqslider.h> +#include <tqlineedit.h> +#include <tqcombobox.h> #include <kscanslider.h> #include <klocale.h> @@ -29,34 +29,34 @@ #include "gammadialog.h" -GammaDialog::GammaDialog( QWidget *parent ) : +GammaDialog::GammaDialog( TQWidget *parent ) : KDialogBase( parent, "GammaDialog", true, i18n("Custom Gamma Tables"), Ok|Cancel|Apply, Ok, true ) { gt = new KGammaTable(); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); Q_CHECK_PTR( page ); setMainWidget( page ); /* This connect is for recalculating the table every time a new * Bright., Contrast or Gamma-Value is set */ - connect( gt, SIGNAL(tableChanged()), gt, SLOT(getTable())); + connect( gt, TQT_SIGNAL(tableChanged()), gt, TQT_SLOT(getTable())); gtDisp = new DispGamma( page ); gtDisp->setValueRef( gt->getArrayPtr() ); gtDisp->resize( 280, 280 ); - connect( gt, SIGNAL(tableChanged()), gtDisp, SLOT( repaint())); + connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( repaint())); // setCaption( i18n( "Gamma Table" )); // Layout-Boxes - QVBoxLayout *bigdad = new QVBoxLayout( page, 10 ); - QHBoxLayout *lhMiddle = new QHBoxLayout( 5 ); - QVBoxLayout *lvSliders = new QVBoxLayout( 10 ); + TQVBoxLayout *bigdad = new TQVBoxLayout( page, 10 ); + TQHBoxLayout *lhMiddle = new TQHBoxLayout( 5 ); + TQVBoxLayout *lvSliders = new TQVBoxLayout( 10 ); - QLabel *l_top = new QLabel( i18n( "<B>Edit the custom gamma table</B><BR>This gamma table is passed to the scanner hardware." ), page ); + TQLabel *l_top = new TQLabel( i18n( "<B>Edit the custom gamma table</B><BR>This gamma table is passed to the scanner hardware." ), page ); bigdad->addWidget( l_top, 1 ); bigdad->addLayout( lhMiddle, 6 ); @@ -67,17 +67,17 @@ GammaDialog::GammaDialog( QWidget *parent ) : wBright = new KScanSlider ( page, i18n("Brightness"), -50.0, 50.0 ); Q_CHECK_PTR(wBright); wBright->slSetSlider( 0 ); - connect( wBright, SIGNAL(valueChanged(int)), gt, SLOT(setBrightness(int))); + connect( wBright, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setBrightness(int))); wContrast = new KScanSlider ( page, i18n("Contrast") , -50.0, 50.0 ); Q_CHECK_PTR(wContrast); wContrast->slSetSlider( 0 ); - connect( wContrast, SIGNAL(valueChanged(int)), gt, SLOT(setContrast(int))); + connect( wContrast, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setContrast(int))); wGamma = new KScanSlider ( page, i18n("Gamma"), 30.0, 300.0 ); Q_CHECK_PTR(wGamma); wGamma->slSetSlider(100); - connect( wGamma, SIGNAL(valueChanged(int)), gt, SLOT(setGamma(int))); + connect( wGamma, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setGamma(int))); /* and add the Sliders */ lvSliders->addWidget( wBright, 1 ); diff --git a/libkscan/gammadialog.h b/libkscan/gammadialog.h index 8ba648a3..0c63a967 100644 --- a/libkscan/gammadialog.h +++ b/libkscan/gammadialog.h @@ -20,8 +20,8 @@ #ifndef GAMMADIALOG_H #define GAMMADIALOG_H -#include <qwidget.h> -#include <qlayout.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <kgammatable.h> #include <kdialogbase.h> @@ -45,7 +45,7 @@ class GammaDialog : public KDialogBase // Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt ) public: - GammaDialog ( QWidget *parent ); + GammaDialog ( TQWidget *parent ); ~GammaDialog( ); KGammaTable *getGt( ) const { return gt; } @@ -61,8 +61,8 @@ private: KGammaTable *gt; DispGamma *gtDisp; - QHBoxLayout *lhMiddle; - QVBoxLayout *lvSliders; + TQHBoxLayout *lhMiddle; + TQVBoxLayout *lvSliders; KScanSlider *wGamma; KScanSlider *wBright; diff --git a/libkscan/img_canvas.cpp b/libkscan/img_canvas.cpp index eccaa412..18c1f606 100644 --- a/libkscan/img_canvas.cpp +++ b/libkscan/img_canvas.cpp @@ -17,16 +17,16 @@ Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qfiledialog.h> -#include <qstring.h> -#include <qmessagebox.h> -#include <qscrollview.h> +#include <tqapplication.h> +#include <tqfiledialog.h> +#include <tqstring.h> +#include <tqmessagebox.h> +#include <tqscrollview.h> #include <kpopupmenu.h> -#include <qlabel.h> -#include <qdict.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqlabel.h> +#include <tqdict.h> +#include <tqimage.h> +#include <tqpainter.h> #include <klocale.h> #include <kstyle.h> @@ -36,7 +36,7 @@ #include <kdebug.h> #include <kiconloader.h> #include <kcmenumngr.h> -#include <qpixmap.h> +#include <tqpixmap.h> #define __IMG_CANVAS_CPP__ @@ -48,7 +48,7 @@ #define MIN(x,y) (x<y?x:y) -inline void debug_rect( const char *name, QRect *r ) +inline void debug_rect( const char *name, TQRect *r ) { kdDebug(29000) << (name ? name: "NONAME") << ": " << r->x() << ", " << r->y() << ", " << r->width() << ", " << r->height() << endl; } @@ -69,20 +69,20 @@ public: ScaleKinds scaleKind; ScaleKinds defaultScaleKind; - QValueList<QRect> highlightRects; + TQValueList<TQRect> highlightRects; }; -ImageCanvas::ImageCanvas(QWidget *parent, - const QImage *start_image, +ImageCanvas::ImageCanvas(TQWidget *parent, + const TQImage *start_image, const char *name ): - QScrollView( parent, name ), + TQScrollView( parent, name ), m_contextMenu(0) { d = new ImageCanvasPrivate(); scale_factor = 100; // means original size maintain_aspect = true; - selected = new QRect; + selected = new TQRect; selected->setWidth(0); selected->setHeight(0); @@ -92,12 +92,12 @@ ImageCanvas::ImageCanvas(QWidget *parent, image = start_image; moving = MOVE_NONE; - QSize img_size; + TQSize img_size; if( image && ! image->isNull() ) { img_size = image->size(); - pmScaled = new QPixmap( img_size ); + pmScaled = new TQPixmap( img_size ); #ifdef USE_KPIXMAPIO *pmScaled = pixIO.convertToPixmap(*image); @@ -114,8 +114,8 @@ ImageCanvas::ImageCanvas(QWidget *parent, update_scaled_pixmap(); // timer-Start and stop - connect( this, SIGNAL( newRect()), SLOT( newRectSlot())); - connect( this, SIGNAL( noRect()), SLOT( noRectSlot())); + connect( this, TQT_SIGNAL( newRect()), TQT_SLOT( newRectSlot())); + connect( this, TQT_SIGNAL( noRect()), TQT_SLOT( noRectSlot())); //zoomOut();scrollview/scrollview viewport()->setCursor( crossCursor ); @@ -138,9 +138,9 @@ ImageCanvas::~ImageCanvas() delete d; } -void ImageCanvas::deleteView( QImage *delimage ) +void ImageCanvas::deleteView( TQImage *delimage ) { - const QImage *img = rootImage(); + const TQImage *img = rootImage(); if( delimage == img ) { @@ -151,7 +151,7 @@ void ImageCanvas::deleteView( QImage *delimage ) } -void ImageCanvas::newImageHoldZoom( QImage *new_image ) +void ImageCanvas::newImageHoldZoom( TQImage *new_image ) { bool holdZ = d->keepZoom; @@ -160,7 +160,7 @@ void ImageCanvas::newImageHoldZoom( QImage *new_image ) d->keepZoom = holdZ; } -void ImageCanvas::newImage( QImage *new_image ) +void ImageCanvas::newImage( TQImage *new_image ) { /** do cleanups **/ @@ -190,10 +190,10 @@ void ImageCanvas::newImage( QImage *new_image ) if( image ) { if( image->depth() == 1 ) { - pmScaled = new QPixmap( image->size(), 1 ); + pmScaled = new TQPixmap( image->size(), 1 ); } else { - int i = QPixmap::defaultDepth(); - pmScaled = new QPixmap( image->size(), i); + int i = TQPixmap::defaultDepth(); + pmScaled = new TQPixmap( image->size(), i); } // image->convertDepth(32); @@ -231,9 +231,9 @@ void ImageCanvas::newImage( QImage *new_image ) kdDebug(29000) << "repaint ok" << endl; } -QSize ImageCanvas::sizeHint() const +TQSize ImageCanvas::sizeHint() const { - return( QSize( 2, 2 )); + return( TQSize( 2, 2 )); } void ImageCanvas::enableContextMenu( bool wantContextMenu ) @@ -304,9 +304,9 @@ void ImageCanvas::handle_popup( int item ) * sizes, eg. 500 means 50.0 % of original width/height. * That makes it easier to work with different scales and units */ -QRect ImageCanvas::sel( void ) +TQRect ImageCanvas::sel( void ) { - QRect retval; + TQRect retval; retval.setCoords(0, 0, 0, 0); if( selected && image && selected->width()>MIN_AREA_WIDTH @@ -315,7 +315,7 @@ QRect ImageCanvas::sel( void ) /* Get the size in real image pixels */ // debug_rect( "PRE map", selected ); - QRect mapped = inv_scale_matrix.map( (const QRect) *selected ); + TQRect mapped = inv_scale_matrix.map( (const TQRect) *selected ); // debug_rect( "Postmap", &mapped ); if( mapped.x() > 0 ) retval.setLeft((int) (1000.0/( (double)image->width() / (double)mapped.x()))); @@ -335,16 +335,16 @@ QRect ImageCanvas::sel( void ) } -bool ImageCanvas::selectedImage( QImage *retImg ) +bool ImageCanvas::selectedImage( TQImage *retImg ) { - QRect r = sel(); + TQRect r = sel(); bool result = false; - const QImage* entireImg = this->rootImage(); + const TQImage* entireImg = this->rootImage(); if( entireImg ) { - QSize s = entireImg->size(); + TQSize s = entireImg->size(); int x = (s.width() * r.x())/1000; int y = (s.height() * r.y())/1000; @@ -361,7 +361,7 @@ bool ImageCanvas::selectedImage( QImage *retImg ) } -void ImageCanvas::drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph ) +void ImageCanvas::drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph ) { if( !pmScaled ) return; int x1 = 0; @@ -388,19 +388,19 @@ void ImageCanvas::drawContents( QPainter * p, int clipx, int clipy, int clipw, i } -void ImageCanvas::timerEvent(QTimerEvent *) +void ImageCanvas::timerEvent(TQTimerEvent *) { if(moving!=MOVE_NONE || !acquired ) return; cr1++; - QPainter p(viewport()); + TQPainter p(viewport()); // p.setWindow( contentsX(), contentsY(), contentsWidth(), contentsHeight()); drawAreaBorder(&p); } -void ImageCanvas::newRectSlot( QRect newSel ) +void ImageCanvas::newRectSlot( TQRect newSel ) { - QRect to_map; - QPainter p(viewport()); + TQRect to_map; + TQPainter p(viewport()); drawAreaBorder(&p,TRUE); selected->setWidth(0); selected->setHeight(0); @@ -453,7 +453,7 @@ void ImageCanvas::noRectSlot( void ) selected->setCoords( 0,0,0,0 ); } -void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev) +void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev) { if( ! acquired || ! image ) return; @@ -469,7 +469,7 @@ void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev) if( moving == MOVE_NONE ) { - QPainter p( viewport()); + TQPainter p( viewport()); drawAreaBorder(&p,TRUE); moving = classifyPoint( x+cx ,y+cy); @@ -484,13 +484,13 @@ void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev) } -void ImageCanvas::viewportMouseReleaseEvent(QMouseEvent *ev) +void ImageCanvas::viewportMouseReleaseEvent(TQMouseEvent *ev) { if(ev->button()!=LeftButton || !acquired ) return; //// debug( "Mouse Release at %d/%d", ev->x(), ev->y()); if(moving!=MOVE_NONE) { - QPainter p(viewport()); + TQPainter p(viewport()); drawAreaBorder(&p,TRUE); moving = MOVE_NONE; *selected = selected->normalize(); @@ -511,7 +511,7 @@ void ImageCanvas::viewportMouseReleaseEvent(QMouseEvent *ev) } -void ImageCanvas::viewportMouseMoveEvent(QMouseEvent *ev) +void ImageCanvas::viewportMouseMoveEvent(TQMouseEvent *ev) { if( ! acquired || !image) return; @@ -580,7 +580,7 @@ void ImageCanvas::viewportMouseMoveEvent(QMouseEvent *ev) //At ButtonRelease : normalize + clip if( moving!=MOVE_NONE ) { int mx, my; - QPainter p(viewport()); + TQPainter p(viewport()); drawAreaBorder(&p,TRUE); switch(moving) { case MOVE_NONE: //Just to make compiler happy @@ -653,9 +653,9 @@ void ImageCanvas::setScaleFactor( int i ) } -void ImageCanvas::resizeEvent( QResizeEvent * event ) +void ImageCanvas::resizeEvent( TQResizeEvent * event ) { - QScrollView::resizeEvent( event ); + TQScrollView::resizeEvent( event ); update_scaled_pixmap(); } @@ -669,13 +669,13 @@ void ImageCanvas::update_scaled_pixmap( void ) return; } - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); kdDebug(28000) << "Updating scaled_pixmap" << endl; if( scaleKind() == DYNAMIC ) kdDebug(28000) << "Scaling DYNAMIC" << endl; - QSize noSBSize( visibleWidth(), visibleHeight()); - const int sbWidth = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent ); + TQSize noSBSize( visibleWidth(), visibleHeight()); + const int sbWidth = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent ); // if( verticalScrollBar()->visible() ) noSBSize.width()+=sbWidth; // if( horizontalScrollBar()->visible() ) noSBSize.height()+=sbWidth; @@ -729,7 +729,7 @@ void ImageCanvas::update_scaled_pixmap( void ) // reconvert the selection to orig size if( selected ) { - *selected = inv_scale_matrix.map( (const QRect) *selected ); + *selected = inv_scale_matrix.map( (const TQRect) *selected ); } scale_matrix.reset(); // transformation matrix @@ -747,7 +747,7 @@ void ImageCanvas::update_scaled_pixmap( void ) inv_scale_matrix = scale_matrix.invert(); // for redraw of selection if( selected ) { - *selected = scale_matrix.map( (const QRect )*selected ); + *selected = scale_matrix.map( (const TQRect )*selected ); } #ifdef USE_KPIXMAPIO @@ -764,11 +764,11 @@ void ImageCanvas::update_scaled_pixmap( void ) resizeContents( static_cast<int>(image->width() * used_xscaler), static_cast<int>(image->height() * used_yscaler ) ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r) +void ImageCanvas::drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r) { if( ! acquired || !image ) return; @@ -780,17 +780,17 @@ void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r) if(!r) { if(cr2 & 4) p.setPen(black); else p.setPen(white); - } else if(!acquired) p.setPen(QPen(QColor(150,150,150))); + } else if(!acquired) p.setPen(TQPen(TQColor(150,150,150))); for(;;) { - if(rect().contains(QPoint(x1,y))) { + if(rect().contains(TQPoint(x1,y))) { if( r && acquired ) { int re_x1, re_y; inv_scale_matrix.map( x1+cx, y+cy, &re_x1, &re_y ); re_x1 = MIN( image->width()-1, re_x1 ); re_y = MIN( image->height()-1, re_y ); - p.setPen( QPen( QColor( image->pixel(re_x1, re_y)))); + p.setPen( TQPen( TQColor( image->pixel(re_x1, re_y)))); } p.drawPoint(x1,y); } @@ -808,7 +808,7 @@ void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r) } -void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r ) +void ImageCanvas::drawVAreaBorder(TQPainter &p, int x, int y1, int y2, int r ) { if( ! acquired || !image ) return; if( moving!=MOVE_NONE ) cr2 = 0; @@ -823,17 +823,17 @@ void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r ) else p.setPen(white); } else - if( !acquired ) p.setPen( QPen( QColor(150,150,150) ) ); + if( !acquired ) p.setPen( TQPen( TQColor(150,150,150) ) ); for(;;) { - if(rect().contains( QPoint(x,y1) )) { + if(rect().contains( TQPoint(x,y1) )) { if( r && acquired ) { int re_y1, re_x; inv_scale_matrix.map( x+cx, y1+cy, &re_x, &re_y1 ); re_x = MIN( image->width()-1, re_x ); re_y1 = MIN( image->height()-1, re_y1 ); - p.setPen( QPen( QColor( image->pixel( re_x, re_y1) ))); + p.setPen( TQPen( TQColor( image->pixel( re_x, re_y1) ))); } p.drawPoint(x,y1); } @@ -852,7 +852,7 @@ void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r ) } -void ImageCanvas::drawAreaBorder(QPainter *p,int r ) +void ImageCanvas::drawAreaBorder(TQPainter *p,int r ) { if(selected->isNull()) return; @@ -890,7 +890,7 @@ preview_state ImageCanvas::classifyPoint(int x,int y) { if(selected->isEmpty()) return MOVE_NONE; - QRect a = selected->normalize(); + TQRect a = selected->normalize(); int top = 0,left = 0,right = 0,bottom = 0; int lx = a.left()-x, rx = x-a.right(); @@ -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(QPoint(x,y))) return MOVE_WHOLE; + if(selected->contains(TQPoint(x,y))) return MOVE_WHOLE; } return MOVE_NONE; } @@ -947,7 +947,7 @@ int ImageCanvas::getScaleFactor() const return( scale_factor ); } -const QImage *ImageCanvas::rootImage( ) +const TQImage *ImageCanvas::rootImage( ) { return( image ); } @@ -1009,7 +1009,7 @@ void ImageCanvas::setDefaultScaleKind( ScaleKinds k ) d->defaultScaleKind = k; } -const QString ImageCanvas::imageInfoString( int w, int h, int d ) +const TQString ImageCanvas::imageInfoString( int w, int h, int d ) { if( w == 0 && h == 0 && d == 0 ) { @@ -1020,13 +1020,13 @@ const QString ImageCanvas::imageInfoString( int w, int h, int d ) d = image->depth(); } else - return QString("-"); + return TQString("-"); } return i18n("%1x%2 pixel, %3 bit").arg(w).arg(h).arg(d); } -const QString ImageCanvas::scaleKindString() +const TQString ImageCanvas::scaleKindString() { switch( scaleKind() ) { @@ -1043,7 +1043,7 @@ const QString ImageCanvas::scaleKindString() return i18n("Fit Height"); break; case ZOOM: - return i18n("Zoom to %1 %%").arg( QString::number(getScaleFactor())); + return i18n("Zoom to %1 %%").arg( TQString::number(getScaleFactor())); break; default: return i18n("Unknown scaling!"); @@ -1052,17 +1052,17 @@ const QString ImageCanvas::scaleKindString() } -int ImageCanvas::highlight( const QRect& rect, const QPen& pen, const QBrush&, bool ensureVis ) +int ImageCanvas::highlight( const TQRect& rect, const TQPen& pen, const TQBrush&, bool ensureVis ) { - QRect saveRect; + TQRect saveRect; saveRect.setRect( rect.x()-2, rect.y()-2, rect.width()+4, rect.height()+4 ); d->highlightRects.append( saveRect ); int idx = d->highlightRects.findIndex(saveRect); - QRect targetRect = scale_matrix.map( rect ); + TQRect targetRect = scale_matrix.map( rect ); - QPainter p( pmScaled ); + TQPainter p( pmScaled ); p.setPen(pen); p.drawLine( targetRect.x(), targetRect.y()+targetRect.height(), @@ -1074,7 +1074,7 @@ int ImageCanvas::highlight( const QRect& rect, const QPen& pen, const QBrush&, b if( ensureVis ) { - QPoint p = targetRect.center(); + TQPoint p = targetRect.center(); ensureVisible( p.x(), p.y(), 10+targetRect.width()/2, 10+targetRect.height()/2 ); } @@ -1090,17 +1090,17 @@ void ImageCanvas::removeHighlight( int idx ) } /* take the rectangle from the stored highlight rects and map it to the viewer scaling */ - QRect r = d->highlightRects[idx]; + TQRect r = d->highlightRects[idx]; d->highlightRects.remove(r); - QRect targetRect = scale_matrix.map( r ); + TQRect targetRect = scale_matrix.map( r ); /* create a small pixmap with a copy of the region in question of the original image */ - QPixmap origPix; + TQPixmap origPix; origPix.convertFromImage( image->copy(r) ); /* and scale it */ - QPixmap scaledPix = origPix.xForm( scale_matrix ); + TQPixmap scaledPix = origPix.xForm( scale_matrix ); /* and finally draw it */ - QPainter p( pmScaled ); + TQPainter p( pmScaled ); p.drawPixmap( targetRect, scaledPix ); p.flush(); diff --git a/libkscan/img_canvas.h b/libkscan/img_canvas.h index 5abf267c..958fecbb 100644 --- a/libkscan/img_canvas.h +++ b/libkscan/img_canvas.h @@ -20,22 +20,22 @@ #ifndef __IMG_CANVAS_H__ #define __IMG_CANVAS_H__ -#include <qwidget.h> -#include <qrect.h> +#include <tqwidget.h> +#include <tqrect.h> #include <stdlib.h> -#include <qsize.h> -#include <qwmatrix.h> -#include <qscrollview.h> -#include <qstrlist.h> +#include <tqsize.h> +#include <tqwmatrix.h> +#include <tqscrollview.h> +#include <tqstrlist.h> #ifdef USE_KPIXMAPIO #include <kpixmapio.h> #endif -class QPopupMenu; -class QPixmap; -class QImage; -class QPainter; +class TQPopupMenu; +class TQPixmap; +class TQImage; +class TQPainter; enum preview_state { MOVE_NONE, @@ -81,8 +81,8 @@ class ImageCanvas: public QScrollView Q_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor ) public: - ImageCanvas( QWidget *parent = 0, - const QImage *start_image = 0, + ImageCanvas( TQWidget *parent = 0, + const TQImage *start_image = 0, const char *name = 0); ~ImageCanvas( ); @@ -92,25 +92,25 @@ public: int getScaleFactor() const; - const QImage *rootImage(); + const TQImage *rootImage(); bool hasImage( void ) { return acquired; } - QPopupMenu* contextMenu() { return m_contextMenu; } - QRect sel( void ); + TQPopupMenu* contextMenu() { return m_contextMenu; } + TQRect sel( void ); enum ScaleKinds { UNSPEC, DYNAMIC, FIT_ORIG, FIT_WIDTH, FIT_HEIGHT, ZOOM }; enum PopupIDs { ID_POP_ZOOM, ID_POP_CLOSE, ID_FIT_WIDTH, ID_FIT_HEIGHT, ID_ORIG_SIZE }; - bool selectedImage( QImage* ); + bool selectedImage( TQImage* ); ScaleKinds scaleKind(); - const QString scaleKindString(); + const TQString scaleKindString(); ScaleKinds defaultScaleKind(); - const QString imageInfoString( int w=0, int h=0, int d=0 ); + const TQString imageInfoString( int w=0, int h=0, int d=0 ); public slots: void setBrightness(int); @@ -122,12 +122,12 @@ public slots: maintain_aspect = aspect_in_mind; repaint(); } - virtual QSize sizeHint() const; - void newImage( QImage* ); - void newImageHoldZoom( QImage* ); - void deleteView( QImage *); + virtual TQSize sizeHint() const; + void newImage( TQImage* ); + void newImageHoldZoom( TQImage* ); + void deleteView( TQImage *); void newRectSlot(); - void newRectSlot( QRect newSel ); + void newRectSlot( TQRect newSel ); void noRectSlot( void ); void setScaleFactor( int i ); void handle_popup(int item ); @@ -141,7 +141,7 @@ public slots: * and pen. * The function returns a id that needs to be given to the remove method. */ - int highlight( const QRect&, const QPen&, const QBrush&, bool ensureVis=false ); + int highlight( const TQRect&, const TQPen&, const TQBrush&, bool ensureVis=false ); /** * reverts the highlighted region back to normal view. @@ -158,10 +158,10 @@ public slots: signals: void noRect( void ); void newRect( void ); - void newRect( QRect ); + void newRect( TQRect ); void scalingRequested(); void closingRequested(); - void scalingChanged( const QString& ); + void scalingChanged( const TQString& ); /** * signal emitted if the permission of the currently displayed image changed, * ie. if it goes from writeable to readable. @@ -170,20 +170,20 @@ signals: void imageReadOnly( bool isRO ); protected: - void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph ); + void drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph ); - void timerEvent(QTimerEvent *); - void viewportMousePressEvent(QMouseEvent *); - void viewportMouseReleaseEvent(QMouseEvent *); - void viewportMouseMoveEvent(QMouseEvent *); + void timerEvent(TQTimerEvent *); + void viewportMousePressEvent(TQMouseEvent *); + void viewportMouseReleaseEvent(TQMouseEvent *); + void viewportMouseMoveEvent(TQMouseEvent *); - void resizeEvent( QResizeEvent * event ); + void resizeEvent( TQResizeEvent * event ); private: - QStrList urls; + TQStrList urls; int scale_factor; - const QImage *image; + const TQImage *image; int brightness, contrast, gamma; @@ -193,23 +193,23 @@ private: QWMatrix scale_matrix; QWMatrix inv_scale_matrix; - QPixmap *pmScaled; + TQPixmap *pmScaled; float used_yscaler; float used_xscaler; - QPopupMenu *m_contextMenu; + TQPopupMenu *m_contextMenu; bool maintain_aspect; int timer_id; - QRect *selected; + TQRect *selected; preview_state moving; int cr1,cr2; int lx,ly; bool acquired; /* private functions for the running ant */ - void drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r = FALSE); - void drawVAreaBorder(QPainter &p,int x,int y1,int y2,int r = FALSE); - void drawAreaBorder(QPainter *p,int r = FALSE); + void drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r = FALSE); + void drawVAreaBorder(TQPainter &p,int x,int y1,int y2,int r = FALSE); + void drawAreaBorder(TQPainter *p,int r = FALSE); void update_scaled_pixmap( void ); preview_state classifyPoint(int x,int y); diff --git a/libkscan/imgscaledialog.cpp b/libkscan/imgscaledialog.cpp index 535d3ffd..2deb4544 100644 --- a/libkscan/imgscaledialog.cpp +++ b/libkscan/imgscaledialog.cpp @@ -19,15 +19,15 @@ #include <klocale.h> #include <kdebug.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <knumvalidator.h> #include "imgscaledialog.h" /* ############################################################################## */ -ImgScaleDialog::ImgScaleDialog( QWidget *parent, int curr_sel, +ImgScaleDialog::ImgScaleDialog( TQWidget *parent, int curr_sel, const char *name ) :KDialogBase( parent, name , true, i18n("Zoom"), Ok|Cancel, Ok, true ) @@ -37,88 +37,88 @@ ImgScaleDialog::ImgScaleDialog( QWidget *parent, int curr_sel, int one_is_selected = false; enableButtonSeparator( false ); - // (void) new QLabel( , main, "Page"); + // (void) new TQLabel( , main, "Page"); // // makeMainWidget(); - QButtonGroup *radios = new QButtonGroup ( 2, Qt::Horizontal, this ); + TQButtonGroup *radios = new TQButtonGroup ( 2, Qt::Horizontal, this ); setMainWidget(radios); Q_CHECK_PTR(radios); radios->setTitle( i18n("Select Image Zoom") ); - connect( radios, SIGNAL( clicked( int )), - this, SLOT( setSelValue( int ))); + connect( radios, TQT_SIGNAL( clicked( int )), + this, TQT_SLOT( setSelValue( int ))); // left gap: smaller Image - QRadioButton *rb25 = new QRadioButton (i18n ("25 %"), radios); + TQRadioButton *rb25 = new TQRadioButton (i18n ("25 %"), radios); if( curr_sel == 25 ){ rb25->setChecked( true ); one_is_selected = true; } - QRadioButton *rb50 = new QRadioButton (i18n ("50 %"), radios ); + TQRadioButton *rb50 = new TQRadioButton (i18n ("50 %"), radios ); if( curr_sel == 50 ){ rb50->setChecked( true ); one_is_selected = true; } - QRadioButton *rb75 = new QRadioButton (i18n ("75 %"), radios ); + TQRadioButton *rb75 = new TQRadioButton (i18n ("75 %"), radios ); if( curr_sel == 75 ) { rb75->setChecked( true ); one_is_selected = true; } - QRadioButton *rb100 = new QRadioButton (i18n ("100 %"), radios); + TQRadioButton *rb100 = new TQRadioButton (i18n ("100 %"), radios); if( curr_sel == 100 ) { rb100->setChecked( true ); one_is_selected = true; } - QRadioButton *rb150 = new QRadioButton (i18n ("150 %"), radios); + TQRadioButton *rb150 = new TQRadioButton (i18n ("150 %"), radios); if( curr_sel == 150 ) { rb150->setChecked( true ); one_is_selected = true; } - QRadioButton *rb200 = new QRadioButton (i18n ("200 %"), radios ); + TQRadioButton *rb200 = new TQRadioButton (i18n ("200 %"), radios ); if( curr_sel == 200 ) { rb200->setChecked( true ); one_is_selected = true; } - QRadioButton *rb300 = new QRadioButton (i18n ("300 %"), radios ); + TQRadioButton *rb300 = new TQRadioButton (i18n ("300 %"), radios ); if( curr_sel == 300 ) { rb300->setChecked( true ); one_is_selected = true; } - QRadioButton *rb400 = new QRadioButton (i18n ("400 %"), radios); + TQRadioButton *rb400 = new TQRadioButton (i18n ("400 %"), radios); if( curr_sel == 400 ) { rb400->setChecked( true ); one_is_selected = true; } // Custom Scaler at the bottom - QRadioButton *rbCust = new QRadioButton (i18n ("Custom scale factor:"), + TQRadioButton *rbCust = new TQRadioButton (i18n ("Custom scale factor:"), radios); if( ! one_is_selected ) rbCust->setChecked( true ); - leCust = new QLineEdit( radios ); - QString sn; + leCust = new TQLineEdit( radios ); + TQString sn; sn.setNum(curr_sel ); leCust->setValidator( new KIntValidator( leCust ) ); leCust->setText(sn ); - connect( leCust, SIGNAL( textChanged( const QString& )), - this, SLOT( customChanged( const QString& ))); - connect( rbCust, SIGNAL( toggled( bool )), - this, SLOT(enableAndFocus(bool))); + connect( leCust, TQT_SIGNAL( textChanged( const TQString& )), + this, TQT_SLOT( customChanged( const TQString& ))); + connect( rbCust, TQT_SIGNAL( toggled( bool )), + this, TQT_SLOT(enableAndFocus(bool))); leCust->setEnabled( rbCust->isChecked()); } -void ImgScaleDialog::customChanged( const QString& s ) +void ImgScaleDialog::customChanged( const TQString& s ) { bool ok; int okval = s.toInt( &ok ); @@ -148,7 +148,7 @@ void ImgScaleDialog::setSelValue( int val ) // Custom size selected if( selected == -1 ) { - QString s = leCust->text(); + TQString s = leCust->text(); bool ok; int okval = s.toInt( &ok ); diff --git a/libkscan/imgscaledialog.h b/libkscan/imgscaledialog.h index 8bbe1963..6ab4cb78 100644 --- a/libkscan/imgscaledialog.h +++ b/libkscan/imgscaledialog.h @@ -20,7 +20,7 @@ #ifndef __IMGSCALEDIALOG_H__ #define __IMGSCALEDIALOG_H__ -#include <qlineedit.h> +#include <tqlineedit.h> #include <kdialogbase.h> @@ -35,7 +35,7 @@ class ImgScaleDialog : public KDialogBase Q_PROPERTY( int selected READ getSelected WRITE setSelValue ) public: - ImgScaleDialog( QWidget *parent, int curr_sel = 100, + ImgScaleDialog( TQWidget *parent, int curr_sel = 100, const char *name = 0 ); public slots: @@ -50,9 +50,9 @@ public slots: signals: void customScaleChange( int ); public slots: - void customChanged( const QString& ); + void customChanged( const TQString& ); private: - QLineEdit *leCust; + TQLineEdit *leCust; int selected; class ImgScaleDialogPrivate; diff --git a/libkscan/imgscaninfo.cpp b/libkscan/imgscaninfo.cpp index a3287a5b..eee481c6 100644 --- a/libkscan/imgscaninfo.cpp +++ b/libkscan/imgscaninfo.cpp @@ -54,22 +54,22 @@ int ImgScanInfo::getYResolution() return m_yRes; } -void ImgScanInfo::setMode( const QString& smode ) +void ImgScanInfo::setMode( const TQString& smode ) { m_mode = smode; } -QString ImgScanInfo::getMode() +TQString ImgScanInfo::getMode() { return m_mode; } -void ImgScanInfo::setScannerName( const QString& name ) +void ImgScanInfo::setScannerName( const TQString& name ) { m_scanner = name; } -QString ImgScanInfo::getScannerName() +TQString ImgScanInfo::getScannerName() { return m_scanner; } diff --git a/libkscan/imgscaninfo.h b/libkscan/imgscaninfo.h index 05ff63e2..8c87d3e5 100644 --- a/libkscan/imgscaninfo.h +++ b/libkscan/imgscaninfo.h @@ -20,7 +20,7 @@ #ifndef __IMGSCANINFO_H__ #define __IMGSCANINFO_H__ -#include <qstring.h> +#include <tqstring.h> /* ---------------------------------------------------------------------- * @@ -32,18 +32,18 @@ public: int getXResolution(); int getYResolution(); - QString getMode(); - QString getScannerName(); + TQString getMode(); + TQString getScannerName(); void setXResolution( int ); void setYResolution( int ); - void setMode( const QString& ); - void setScannerName( const QString& ); + void setMode( const TQString& ); + void setScannerName( const TQString& ); private: int m_xRes; int m_yRes; - QString m_mode; - QString m_scanner; + TQString m_mode; + TQString m_scanner; class ImgScanInfoPrivate; ImgScanInfoPrivate *d; diff --git a/libkscan/kgammatable.cpp b/libkscan/kgammatable.cpp index 4f1ef64f..d364d989 100644 --- a/libkscan/kgammatable.cpp +++ b/libkscan/kgammatable.cpp @@ -23,7 +23,7 @@ #include "kgammatable.h" KGammaTable::KGammaTable( int gamma, int brightness, int contrast ) - : QObject() + : TQObject() { g = gamma < 1 ? 1 : gamma; b = brightness; diff --git a/libkscan/kgammatable.h b/libkscan/kgammatable.h index 05e71ddd..49540a82 100644 --- a/libkscan/kgammatable.h +++ b/libkscan/kgammatable.h @@ -20,8 +20,8 @@ #ifndef KGAMMATABLE_H #define KGAMMATABLE_H -#include <qmemarray.h> -#include <qobject.h> +#include <tqmemarray.h> +#include <tqobject.h> extern "C" { #include <sane/sane.h> @@ -39,7 +39,7 @@ public: KGammaTable ( int gamma = 100, int brightness = 0, int contrast = 0 ); void setAll ( int gamma, int brightness, int contrast ); - QMemArray<SANE_Word> *getArrayPtr( void ) { return > } + TQMemArray<SANE_Word> *getArrayPtr( void ) { return > } int getGamma( ) const { return g; } int getBrightness( ) const { return b; } @@ -62,7 +62,7 @@ private: void calcTable( ); int g, b, c; bool dirty; - QMemArray<SANE_Word> gt; + TQMemArray<SANE_Word> gt; class KGammaTablePrivate; KGammaTablePrivate *d; diff --git a/libkscan/kscandevice.cpp b/libkscan/kscandevice.cpp index ca678eac..c5237eb4 100644 --- a/libkscan/kscandevice.cpp +++ b/libkscan/kscandevice.cpp @@ -18,19 +18,19 @@ */ #include <stdlib.h> -#include <qwidget.h> -#include <qobject.h> -#include <qasciidict.h> -#include <qcombobox.h> -#include <qslider.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qimage.h> -#include <qfileinfo.h> -#include <qapplication.h> +#include <tqwidget.h> +#include <tqobject.h> +#include <tqasciidict.h> +#include <tqcombobox.h> +#include <tqslider.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqimage.h> +#include <tqfileinfo.h> +#include <tqapplication.h> #include <kdebug.h> #include <klocale.h> #include <kglobal.h> @@ -74,13 +74,13 @@ public: /* --------------------------------------------------------------------------- ------------------------------------------------------------------------- */ -void KScanDevice::guiSetEnabled( const QCString& name, bool state ) +void KScanDevice::guiSetEnabled( const TQCString& name, bool state ) { KScanOption *so = getExistingGuiElement( name ); if( so ) { - QWidget *w = so->widget(); + TQWidget *w = so->widget(); if( w ) w->setEnabled( state ); @@ -91,11 +91,11 @@ void KScanDevice::guiSetEnabled( const QCString& name, bool state ) /* --------------------------------------------------------------------------- ------------------------------------------------------------------------- */ -KScanOption *KScanDevice::getExistingGuiElement( const QCString& name ) +KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name ) { KScanOption *ret = 0L; - QCString alias = aliasName( name ); + TQCString alias = aliasName( name ); /* gui_elements is a QList<KScanOption> */ for( ret = gui_elements.first(); ret != 0; ret = gui_elements.next()) @@ -109,15 +109,15 @@ KScanOption *KScanDevice::getExistingGuiElement( const QCString& name ) ------------------------------------------------------------------------- */ -KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent, - const QString& desc, - const QString& tooltip ) +KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent, + const TQString& desc, + const TQString& tooltip ) { if( name.isEmpty() ) return(0); - QWidget *w = 0; + TQWidget *w = 0; KScanOption *so = 0; - QCString alias = aliasName( name ); + TQCString alias = aliasName( name ); /* Check if already exists */ so = getExistingGuiElement( name ); @@ -135,8 +135,8 @@ KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent, w = so->createWidget( parent, desc, tooltip ); if( w ) { - connect( so, SIGNAL( optionChanged( KScanOption* ) ), - this, SLOT( slOptChanged( KScanOption* ))); + connect( so, TQT_SIGNAL( optionChanged( KScanOption* ) ), + this, TQT_SLOT( slOptChanged( KScanOption* ))); w->setEnabled( so->active() ); } else @@ -163,14 +163,14 @@ KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent, // --------------------------------------------------------------------------- -KScanDevice::KScanDevice( QObject *parent ) - : QObject( parent ) +KScanDevice::KScanDevice( TQObject *parent ) + : TQObject( parent ) { SANE_Status sane_stat = sane_init(NULL, NULL ); d = new KScanDevicePrivate(); - option_dic = new QAsciiDict<int>; + option_dic = new TQAsciiDict<int>; option_dic->setAutoDelete( true ); gui_elements.setAutoDelete( true ); @@ -209,7 +209,7 @@ KScanDevice::KScanDevice( QObject *parent ) } } #if 0 - connect( this, SIGNAL(sigOptionsChanged()), SLOT(slReloadAll())); + connect( this, TQT_SIGNAL(sigOptionsChanged()), TQT_SLOT(slReloadAll())); #endif gammaTables = new KScanOptSet( "GammaTables" ); } @@ -218,7 +218,7 @@ KScanDevice::KScanDevice( QObject *parent ) kdDebug(29000) << "ERROR: sane_init failed -> SANE installed ?" << endl; } - connect( this, SIGNAL( sigScanFinished( KScanStat )), SLOT( slScanFinished( KScanStat ))); + connect( this, TQT_SIGNAL( sigScanFinished( KScanStat )), TQT_SLOT( slScanFinished( KScanStat ))); } @@ -232,7 +232,7 @@ KScanDevice::~KScanDevice() } -KScanStat KScanDevice::openDevice( const QCString& backend ) +KScanStat KScanDevice::openDevice( const TQCString& backend ) { KScanStat stat = KSCAN_OK; SANE_Status sane_stat = SANE_STATUS_GOOD; @@ -299,9 +299,9 @@ void KScanDevice::slCloseDevice( ) } -QString KScanDevice::getScannerName(const QCString& name) const +TQString KScanDevice::getScannerName(const TQCString& name) const { - QString ret = i18n("No scanner selected"); + TQString ret = i18n("No scanner selected"); SANE_Device *scanner = 0L; if( scanner_name && scanner_initialised && name.isEmpty()) @@ -311,7 +311,7 @@ QString KScanDevice::getScannerName(const QCString& name) const else if ( ! name.isEmpty() ) { scanner = scannerDevices[ name ]; - ret = QString::null; + ret = TQString::null; } if( scanner ) { @@ -324,9 +324,9 @@ QString KScanDevice::getScannerName(const QCString& name) const } -QSize KScanDevice::getMaxScanSize( void ) const +TQSize KScanDevice::getMaxScanSize( void ) const { - QSize s; + TQSize s; double min, max, q; KScanOption so_w( SANE_NAME_SCAN_BR_X ); @@ -386,7 +386,7 @@ KScanStat KScanDevice::find_options() option_list.append( (const char*) d->name ); #if 0 KScanOption *newOpt = new KScanOption( d->name ); - const QString qq = newOpt->get(); + const TQString qq = newOpt->get(); qDebug( "INIT: <%s> = <%s>", d->name, qq ); allOptionSet->insert( d->name, newOpt ); #endif @@ -405,16 +405,16 @@ KScanStat KScanDevice::find_options() } -QStrList KScanDevice::getAllOptions() +TQStrList KScanDevice::getAllOptions() { return( option_list ); } -QStrList KScanDevice::getCommonOptions() +TQStrList KScanDevice::getCommonOptions() { - QStrList com_opt; + TQStrList com_opt; - QCString s = option_list.first(); + TQCString s = option_list.first(); while( !s.isEmpty() ) { @@ -426,11 +426,11 @@ QStrList KScanDevice::getCommonOptions() return( com_opt ); } -QStrList KScanDevice::getAdvancedOptions() +TQStrList KScanDevice::getAdvancedOptions() { - QStrList com_opt; + TQStrList com_opt; - QCString s = option_list.first(); + TQCString s = option_list.first(); while( !s.isEmpty() ) { @@ -450,7 +450,7 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable ) int *num = (*option_dic)[ opt->getName() ]; SANE_Status sane_stat = SANE_STATUS_GOOD; - const QCString& oname = opt->getName(); + const TQCString& oname = opt->getName(); if ( oname == "preview" || oname == "mode" ) { sane_stat = sane_control_option( scanner_handle, *num, @@ -551,12 +551,12 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable ) return( stat ); } -bool KScanDevice::optionExists( const QCString& name ) +bool KScanDevice::optionExists( const TQCString& name ) { if( name.isEmpty() ) return false; int *i = 0L; - QCString altname = aliasName( name ); + TQCString altname = aliasName( name ); if( ! altname.isNull() ) i = (*option_dic)[ altname ]; @@ -566,7 +566,7 @@ bool KScanDevice::optionExists( const QCString& name ) return( *i > -1 ); } -void KScanDevice::slSetDirty( const QCString& name ) +void KScanDevice::slSetDirty( const TQCString& name ) { if( optionExists( name ) ) { @@ -585,10 +585,10 @@ void KScanDevice::slSetDirty( const QCString& name ) * cool thing :-| * Maybe this helps us out ? */ -QCString KScanDevice::aliasName( const QCString& name ) +TQCString KScanDevice::aliasName( const TQCString& name ) { int *i = (*option_dic)[ name ]; - QCString ret; + TQCString ret; if( i ) return( name ); ret = name; @@ -667,36 +667,36 @@ void KScanDevice::slStopScanning( void ) } -const QString KScanDevice::previewFile() +const TQString KScanDevice::previewFile() { - QString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); + TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); if( !dir.endsWith("/") ) dir += "/"; - QString fname = dir + QString::fromLatin1(".previews/"); - QString sname( getScannerName(shortScannerName()) ); + TQString fname = dir + TQString::fromLatin1(".previews/"); + TQString sname( getScannerName(shortScannerName()) ); sname.replace( '/', "_"); return fname+sname; } -QImage KScanDevice::loadPreviewImage() +TQImage KScanDevice::loadPreviewImage() { - const QString prevFile = previewFile(); + const TQString prevFile = previewFile(); kdDebug(29000) << "Loading preview from file " << prevFile << endl; - QImage image; + TQImage image; image.load( prevFile ); return image; } -bool KScanDevice::savePreviewImage( const QImage &image ) +bool KScanDevice::savePreviewImage( const TQImage &image ) { if( image.isNull() ) return false; - const QString prevFile = previewFile(); + const TQString prevFile = previewFile(); kdDebug(29000) << "Saving preview to file " << prevFile << endl; return image.save( prevFile, "BMP" ); @@ -757,7 +757,7 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi ) if( optionExists( SANE_NAME_SCAN_MODE ) ) { KScanOption mode( SANE_NAME_SCAN_MODE ); - const QString kk = mode.get(); + const TQString kk = mode.get(); kdDebug(29000) << "Mode is <" << kk << ">" << endl; storeOptions->backupOption( mode ); /* apply if it has a widget, or apply always ? */ @@ -766,7 +766,7 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi ) /** Scan Resolution should always exist. **/ KScanOption res ( SANE_NAME_SCAN_RESOLUTION ); - const QString p = res.get(); + const TQString p = res.get(); kdDebug(29000) << "Scan Resolution pre Preview is " << p << endl; storeOptions->backupOption( res ); @@ -842,10 +842,10 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi ) **/ #define NOTIFIER(X) optionNotifyString(X) -QString KScanDevice::optionNotifyString( int i ) const +TQString KScanDevice::optionNotifyString( int i ) const { - const QString sOff = " |"; - const QString sOn = " X |"; + const TQString sOff = " |"; + const TQString sOn = " X |"; if( i > 0 ) { return sOn; @@ -856,7 +856,7 @@ QString KScanDevice::optionNotifyString( int i ) const void KScanDevice::prepareScan( void ) { - QAsciiDictIterator<int> it( *option_dic ); // iterator for dict + TQAsciiDictIterator<int> it( *option_dic ); // iterator for dict kdDebug(29000) << "########################################################################################################" << endl; kdDebug(29000) << "Scanner: " << scanner_name << endl; @@ -876,7 +876,7 @@ void KScanDevice::prepareScan( void ) { int cap = d->cap; - QString s = QString(it.currentKey()).leftJustify(32, ' '); + TQString s = TQString(it.currentKey()).leftJustify(32, ' '); kdDebug(29000) << " " << s << " |" << NOTIFIER( ((cap) & SANE_CAP_SOFT_SELECT)) << NOTIFIER( ((cap) & SANE_CAP_HARD_SELECT)) << @@ -892,7 +892,7 @@ void KScanDevice::prepareScan( void ) kdDebug(29000) << "----------------------------------+--------+--------+--------+--------+--------+--------+--------+" << endl; KScanOption pso( SANE_NAME_PREVIEW ); - const QString q = pso.get(); + const TQString q = pso.get(); kdDebug(29000) << "Preview-Switch is at the moment: " << q << endl; @@ -903,7 +903,7 @@ void KScanDevice::prepareScan( void ) * 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. **/ -KScanStat KScanDevice::acquire( const QString& filename ) +KScanStat KScanDevice::acquire( const TQString& filename ) { if( ! scanner_handle ) return KSCAN_ERR_NO_DEVICE; @@ -944,10 +944,10 @@ KScanStat KScanDevice::acquire( const QString& filename ) else { /* a filename is in the parameter */ - QFileInfo file( filename ); + TQFileInfo file( filename ); if( file.exists() ) { - QImage i; + TQImage i; ImgScanInfo info; if( i.load( filename )) { @@ -964,7 +964,7 @@ KScanStat KScanDevice::acquire( const QString& filename ) /** - * Creates a new QImage from the retrieved Image Options + * Creates a new TQImage from the retrieved Image Options **/ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) { @@ -978,7 +978,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) if( p->depth == 1 ) // Lineart !! { - img = new QImage( p->pixels_per_line, p->lines, 8 ); + img = new TQImage( p->pixels_per_line, p->lines, 8 ); if( img ) { img->setNumColors( 2 ); @@ -992,7 +992,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) if( p->format == SANE_FRAME_GRAY ) { /* Grayscale */ - img = new QImage( p->pixels_per_line, p->lines, 8 ); + img = new TQImage( p->pixels_per_line, p->lines, 8 ); if( img ) { img->setNumColors( 256 ); @@ -1004,7 +1004,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p ) else { /* true color image */ - img = new QImage( p->pixels_per_line, p->lines, 32 ); + img = new TQImage( p->pixels_per_line, p->lines, 32 ); if( img ) img->setAlphaBuffer( false ); } @@ -1104,9 +1104,9 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) int fd = 0; if( sane_get_select_fd( scanner_handle, &fd ) == SANE_STATUS_GOOD ) { - sn = new QSocketNotifier( fd, QSocketNotifier::Read, this ); - QObject::connect( sn, SIGNAL(activated(int)), - this, SLOT( doProcessABlock() ) ); + sn = new TQSocketNotifier( fd, TQSocketNotifier::Read, this ); + TQObject::connect( sn, TQT_SIGNAL(activated(int)), + this, TQT_SLOT( doProcessABlock() ) ); } } @@ -1147,7 +1147,7 @@ void KScanDevice::loadOptionSet( KScanOptSet *optSet ) } // kdDebug(29000) << "Loading Option set: " << optSet->optSetName() << endl; - QAsciiDictIterator<KScanOption> it(*optSet); + TQAsciiDictIterator<KScanOption> it(*optSet); kdDebug(29000) << "Postinstalling " << optSet->count() << " options" << endl; while( it.current() ) @@ -1161,7 +1161,7 @@ void KScanDevice::loadOptionSet( KScanOptSet *optSet ) if( so && so->active() && so->initialised()) { - const QString qq = so->get(); + const TQString qq = so->get(); kdDebug(29000) << "Post-Scan-apply <" << it.currentKey() << ">: " << qq << endl; apply( so ); @@ -1240,7 +1240,7 @@ void KScanDevice::slScanFinished( KScanStat status ) /* This function calls at least sane_read and converts the read data from the scanner * to the qimage. * The function needs: - * QImage img valid + * TQImage img valid * the data-buffer set to a appropriate size **/ @@ -1460,7 +1460,7 @@ void KScanDevice::doProcessABlock( void ) } /* end of fkt */ -void KScanDevice::slSaveScanConfigSet( const QString& setName, const QString& descr ) +void KScanDevice::slSaveScanConfigSet( const TQString& setName, const TQString& descr ) { if( setName.isEmpty() || setName.isNull()) return; @@ -1491,7 +1491,7 @@ void KScanDevice::getCurrentOptions( KScanOptSet *optSet ) dirtyList.removeRef( so->getName()); } - QStrListIterator it( dirtyList ); + TQStrListIterator it( dirtyList ); while( it.current()) { KScanOption so( it.current() ); @@ -1500,9 +1500,9 @@ void KScanDevice::getCurrentOptions( KScanOptSet *optSet ) } } -QString KScanDevice::getConfig( const QString& key, const QString& def ) const +TQString KScanDevice::getConfig( const TQString& key, const TQString& def ) const { - QString confFile = SCANNER_DB_FILE; + TQString confFile = SCANNER_DB_FILE; KSimpleConfig scanConfig( confFile, true ); scanConfig.setGroup( shortScannerName() ); @@ -1510,10 +1510,10 @@ QString KScanDevice::getConfig( const QString& key, const QString& def ) const return scanConfig.readEntry( key, def ); } -void KScanDevice::slStoreConfig( const QString& key, const QString& val ) +void KScanDevice::slStoreConfig( const TQString& key, const TQString& val ) { - QString confFile = SCANNER_DB_FILE; - QString scannerName = shortScannerName(); + TQString confFile = SCANNER_DB_FILE; + TQString scannerName = shortScannerName(); if( scannerName.isEmpty() || scannerName == UNDEF_SCANNERNAME ) { @@ -1534,7 +1534,7 @@ void KScanDevice::slStoreConfig( const QString& key, const QString& val ) bool KScanDevice::scanner_initialised = false; SANE_Handle KScanDevice::scanner_handle = 0L; SANE_Device const **KScanDevice::dev_list = 0L; -QAsciiDict<int> *KScanDevice::option_dic = 0L; +TQAsciiDict<int> *KScanDevice::option_dic = 0L; KScanOptSet *KScanDevice::gammaTables = 0L; diff --git a/libkscan/kscandevice.h b/libkscan/kscandevice.h index dd849566..f52af74d 100644 --- a/libkscan/kscandevice.h +++ b/libkscan/kscandevice.h @@ -20,12 +20,12 @@ #ifndef _KSCANDEV_H_ #define _KSCANDEV_H_ -#include <qwidget.h> -#include <qasciidict.h> -#include <qsize.h> -#include <qobject.h> -#include <qstrlist.h> -#include <qsocketnotifier.h> +#include <tqwidget.h> +#include <tqasciidict.h> +#include <tqsize.h> +#include <tqobject.h> +#include <tqstrlist.h> +#include <tqsocketnotifier.h> #include "kscanoption.h" @@ -75,7 +75,7 @@ public: * */ - KScanDevice( QObject *parent = 0 ); + KScanDevice( TQObject *parent = 0 ); /** * Destructor @@ -89,22 +89,22 @@ public: * @return the state of the operation * @param backend: the name of the backend to open */ - KScanStat openDevice( const QCString& backend ); + KScanStat openDevice( const TQCString& backend ); /** * returns the names of all existing Scan Devices in the system. * @param enable_net: allow net devices. - * @return a QStrList of available Scanners in the system + * @return a TQStrList of available Scanners in the system * @see KScanDevice */ - QStrList getDevices( ) const + TQStrList getDevices( ) const { return( scanner_avail ); } /** * returns the short, technical name of the currently attached backend. * It is in the form 'umax:/dev/sg1'. */ - QCString shortScannerName() const { return scanner_name; } + TQCString shortScannerName() const { return scanner_name; } /** * returns a long, human readable name of the scanner, like @@ -113,17 +113,17 @@ public: * If the name of the backend is skipped, the selected backend is * returned. * - * @param a QString with a backend string - * @return a QString containing a human readable scanner name + * @param a TQString with a backend string + * @return a TQString containing a human readable scanner name **/ - QString getScannerName( const QCString& name = 0 ) const; + TQString getScannerName( const TQCString& name = 0 ) const; /* * ========= Preview Functions ========== */ /** - * QImage * acquirePreview( bool forceGray = 0, int dpi = 0 ) + * TQImage * acquirePreview( bool forceGray = 0, int dpi = 0 ) * * acquires a preview on the selected device. KScanDevice allocs * memory for the qimage returned. This qimage remains valid @@ -144,29 +144,29 @@ public: * the Parameter image needs to point to a object qimage, * which is filled by the SANE-Dev. After the function returns, * the qimage is valid, if the returnvalue is OK. - * @param QImage *image - Pointer to a reserved image + * @param TQImage *image - Pointer to a reserved image * @return the state of the operation in KScanStat */ - KScanStat acquire( const QString& filename = QString::null ); + KScanStat acquire( const TQString& filename = TQString::null ); /** * returns the default filename of the preview image of this scanner. * @return default filename **/ - const QString previewFile(); + const TQString previewFile(); /** * loads the last saved previewed image on this device from the default file * @return a bitmap as QImage **/ - QImage loadPreviewImage(); + TQImage loadPreviewImage(); /** * saves current previewed image from this device to the default file * @param image current preview image which should be saved * @return true if the saving was sucessful **/ - bool savePreviewImage( const QImage& image ); + bool savePreviewImage( const TQImage& image ); /* @@ -176,9 +176,9 @@ public: /** * returns all existing options of the selected device. * @see openDevice - * @return a QStrList with the names of all options + * @return a TQStrList with the names of all options **/ - QStrList getAllOptions(); + TQStrList getAllOptions(); /** * returns the common options of the device. A frontend should @@ -186,18 +186,18 @@ public: * use. * @see getAllOptions * @see getAdvancedOptions - * @return a QStrList with with names of the common options. + * @return a TQStrList with with names of the common options. */ - QStrList getCommonOptions(); + TQStrList getCommonOptions(); /** * returns a list of advanced scan options. A frontend should * display these options in a special dialog. * @see getAllOptions * @see getCommonOptions - * @return a QStrList with names of advanced scan options. + * @return a TQStrList with names of advanced scan options. */ - QStrList getAdvancedOptions(); + TQStrList getAdvancedOptions(); /** * retrieves a set of the current scan options and writes them @@ -230,15 +230,15 @@ public: * @param name: the name of a option from a returned option-List * @return true, if the option exists */ - bool optionExists( const QCString& name ); + bool optionExists( const TQCString& name ); /** * checks if the backend knows the option with the required name under * a different name, like some backends do. If it does, the known name - * is returned, otherwise a null QCString. + * is returned, otherwise a null TQCString. */ - QCString aliasName( const QCString& name ); + TQCString aliasName( const TQCString& name ); /** * returns a Widget suitable for the selected Option and creates the @@ -249,20 +249,20 @@ public: * @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 QCString& name, QWidget *parent, - const QString& desc = QString::null, - const QString& tooltip = QString::null ); + KScanOption *getGuiElement( const TQCString& name, TQWidget *parent, + const TQString& desc = TQString::null, + const TQString& tooltip = TQString::null ); /** * returns the pointer to an already created Scanoption from the * gui element list. Cares for option name aliases. */ - KScanOption *getExistingGuiElement( const QCString& name ); + KScanOption *getExistingGuiElement( const TQCString& name ); /** * sets an widget of the named option enabled/disabled **/ - void guiSetEnabled( const QCString& name, bool state ); + void guiSetEnabled( const TQCString& name, bool state ); /** * returns the maximum scan size. This is interesting e.g. for the @@ -270,17 +270,17 @@ public: * The unit of the return value is millimeter, if the sane backend * returns millimeter. (TODO) **/ - QSize getMaxScanSize( void ) const; + TQSize getMaxScanSize( void ) const; /** * returns the information bit stored for the currently attached scanner * identified by the key. */ - QString getConfig( const QString& key, const QString& def = QString() ) const; + TQString getConfig( const TQString& key, const TQString& def = TQString() ) const; static bool scanner_initialised; static SANE_Handle scanner_handle; - static QAsciiDict<int>* option_dic; + static TQAsciiDict<int>* option_dic; static SANE_Device const **dev_list; static KScanOptSet *gammaTables; @@ -317,10 +317,10 @@ public slots: /** * Save the current configuration parameter set. Only changed options are saved. **/ - void slSaveScanConfigSet( const QString&, const QString& ); + void slSaveScanConfigSet( const TQString&, const TQString& ); - void slSetDirty( const QCString& name ); + void slSetDirty( const TQCString& name ); /** * Closes the scan device and frees all related data, makes @@ -334,7 +334,7 @@ public slots: * is opened, a group is created that identifies the scanner and the * device where it is connected. The information is stored into that group. */ - void slStoreConfig( const QString&, const QString& ); + void slStoreConfig( const TQString&, const TQString& ); signals: /** @@ -355,13 +355,13 @@ signals: * emitted if a new image was acquired. The image has to be * copied in the signal handler. */ - void sigNewImage( QImage*, ImgScanInfo* ); + void sigNewImage( TQImage*, ImgScanInfo* ); /** * emitted if a new preview was acquired. The image has to be * copied in the signal handler. */ - void sigNewPreview( QImage*, ImgScanInfo* ); + void sigNewPreview( TQImage*, ImgScanInfo* ); /** * emitted to tell the application the start of scanning. That is @@ -422,28 +422,28 @@ private: KScanStat createNewImage( SANE_Parameters *p ); // not implemented -// QWidget *entryField( QWidget *parent, const QString& text, -// const QString& tooltip ); +// QWidget *entryField( TQWidget *parent, const TQString& text, +// const TQString& tooltip ); KScanStat find_options(); // help fct. to process options KScanStat acquire_data( bool isPreview = false ); - QStrList scanner_avail; // list of names of all scan dev. + TQStrList scanner_avail; // list of names of all scan dev. QStrList option_list; // list of names of all options - QStrList dirtyList; // option changes + TQStrList dirtyList; // option changes - inline QString optionNotifyString(int) const; + inline TQString optionNotifyString(int) const; - QPtrList<KScanOption> gui_elements; - QAsciiDict<SANE_Device> scannerDevices; + TQPtrList<KScanOption> gui_elements; + TQAsciiDict<SANE_Device> scannerDevices; - QSocketNotifier *sn; + TQSocketNotifier *sn; SCANSTATUS scanStatus; /* Data for the scan process */ /* This could/should go to a small help object */ - QCString scanner_name; + TQCString scanner_name; SANE_Byte *data; - QImage *img; + TQImage *img; SANE_Parameters sane_scan_param; long overall_bytes; int rest_bytes; diff --git a/libkscan/kscanoption.cpp b/libkscan/kscanoption.cpp index 1aae1602..2bf20d48 100644 --- a/libkscan/kscanoption.cpp +++ b/libkscan/kscanoption.cpp @@ -18,18 +18,18 @@ */ #include <stdlib.h> -#include <qwidget.h> -#include <qobject.h> -#include <qasciidict.h> -#include <qcombobox.h> -#include <qslider.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqwidget.h> +#include <tqobject.h> +#include <tqasciidict.h> +#include <tqcombobox.h> +#include <tqslider.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqimage.h> +#include <tqregexp.h> #include <kdebug.h> @@ -51,7 +51,7 @@ /** inline-access to the option descriptor, object to changes with global vars. **/ -inline const SANE_Option_Descriptor *getOptionDesc( const QCString& name ) +inline const SANE_Option_Descriptor *getOptionDesc( const TQCString& name ) { int *idx = (*KScanDevice::option_dic)[ name ]; @@ -77,8 +77,8 @@ inline const SANE_Option_Descriptor *getOptionDesc( const QCString& name ) /* ************************************************************************ */ /* KScan Option */ /* ************************************************************************ */ -KScanOption::KScanOption( const QCString& new_name ) : - QObject() +KScanOption::KScanOption( const TQCString& new_name ) : + TQObject() { if( initOption( new_name ) ) { @@ -102,7 +102,7 @@ KScanOption::KScanOption( const QCString& new_name ) : } -bool KScanOption::initOption( const QCString& new_name ) +bool KScanOption::initOption( const TQCString& new_name ) { desc = 0; if( new_name.isEmpty() ) return( false ); @@ -160,7 +160,7 @@ bool KScanOption::initOption( const QCString& new_name ) } KScanOption::KScanOption( const KScanOption &so ) : - QObject() + TQObject() { /* desc is stored by sane-lib and may be copied */ desc = so.desc; @@ -206,9 +206,9 @@ KScanOption::KScanOption( const KScanOption &so ) : } -const QString KScanOption::configLine( void ) +const TQString KScanOption::configLine( void ) { - QCString strval = this->get(); + TQCString strval = this->get(); kdDebug(29000) << "configLine returns <" << strval << ">" << endl; return( strval ); } @@ -253,9 +253,9 @@ const KScanOption& KScanOption::operator= (const KScanOption& so ) return( *this ); } -void KScanOption::slWidgetChange( const QCString& t ) +void KScanOption::slWidgetChange( const TQCString& t ) { - kdDebug(29000) << "Received WidgetChange for " << getName() << " (const QCString&)" << endl; + kdDebug(29000) << "Received WidgetChange for " << getName() << " (const TQCString&)" << endl; set( t ); emit( guiChange( this ) ); // emit( optionChanged( this )); @@ -267,7 +267,7 @@ void KScanOption::slWidgetChange( void ) /* If Type is bool, the widget is a checkbox. */ if( type() == BOOL ) { - bool b = ((QCheckBox*) internal_widget)->isChecked(); + bool b = ((TQCheckBox*) internal_widget)->isChecked(); kdDebug(29000) << "Setting bool: " << b << endl; set( b ); } @@ -292,9 +292,9 @@ void KScanOption::slRedrawWidget( KScanOption *so ) { // qDebug( "Checking widget %s", (const char*) so->getName()); int help = 0; - QString string; + TQString string; - QWidget *w = so->widget(); + TQWidget *w = so->widget(); if( so->valid() && w && so->getBuffer() ) { @@ -302,7 +302,7 @@ void KScanOption::slRedrawWidget( KScanOption *so ) { case BOOL: if( so->get( &help )) - ((QCheckBox*) w)->setChecked( (bool) help ); + ((TQCheckBox*) w)->setChecked( (bool) help ); /* Widget Type is ToggleButton */ break; case SINGLE_VAL: @@ -317,7 +317,7 @@ void KScanOption::slRedrawWidget( KScanOption *so ) break; case GAMMA_TABLE: /* Widget Type is GammaTable */ - // w = new QSlider( parent, "AUTO_GAMMA" ); + // w = new TQSlider( parent, "AUTO_GAMMA" ); break; case STR_LIST: // w = comboBox( parent, text ); @@ -519,7 +519,7 @@ bool KScanOption::set( int val ) bool ret = false; int word_size = 0; - QMemArray<SANE_Word> qa; + TQMemArray<SANE_Word> qa; SANE_Word sw = SANE_TRUE; const SANE_Word sw1 = val; const SANE_Word sw2 = SANE_FIX( (double) val ); @@ -585,7 +585,7 @@ bool KScanOption::set( double val ) if( ! desc ) return( false ); bool ret = false; int word_size = 0; - QMemArray<SANE_Word> qa; + TQMemArray<SANE_Word> qa; SANE_Word sw = SANE_FALSE; switch( desc->type ) @@ -653,7 +653,7 @@ bool KScanOption::set( int *val, int size ) int offset = 0; int word_size = desc->size / sizeof( SANE_Word ); /* add 1 in case offset is needed */ - QMemArray<SANE_Word> qa( 1+word_size ); + TQMemArray<SANE_Word> qa( 1+word_size ); #if 0 if( desc->constraint_type == SANE_CONSTRAINT_WORD_LIST ) { @@ -719,7 +719,7 @@ bool KScanOption::set( int *val, int size ) return( ret ); } -bool KScanOption::set( const QCString& c_string ) +bool KScanOption::set( const TQCString& c_string ) { bool ret = false; int val = 0; @@ -729,12 +729,12 @@ bool KScanOption::set( const QCString& c_string ) /* Check if it is a gammatable. If it is, convert to KGammaTable and call * the approbiate set method. */ - QRegExp re( "\\d+, \\d+, \\d+" ); + TQRegExp re( "\\d+, \\d+, \\d+" ); re.setMinimal(true); - if( QString(c_string).contains( re )) + if( TQString(c_string).contains( re )) { - QStringList relist = QStringList::split( ", ", QString(c_string) ); + TQStringList relist = TQStringList::split( ", ", TQString(c_string) ); int brig = (relist[0]).toInt(); int contr = (relist[1]).toInt(); @@ -810,7 +810,7 @@ bool KScanOption::set( KGammaTable *gt ) SANE_Word *run = gt->getTable(); int word_size = desc->size / sizeof( SANE_Word ); - QMemArray<SANE_Word> qa( word_size ); + TQMemArray<SANE_Word> qa( word_size ); kdDebug(29000) << "KScanOption::set for Gammatable !" << endl; switch( desc->type ) { @@ -898,9 +898,9 @@ bool KScanOption::get( int *val ) const -QCString KScanOption::get( void ) const +TQCString KScanOption::get( void ) const { - QCString retstr; + TQCString retstr; SANE_Word sane_word; @@ -960,11 +960,11 @@ bool KScanOption::get( KGammaTable *gt ) const } -QStrList KScanOption::getList( ) const +TQStrList KScanOption::getList( ) const { if( ! desc ) return( false ); const char **sstring = 0; - QStrList strList; + TQStrList strList; if( desc->constraint_type == SANE_CONSTRAINT_STRING_LIST ) { sstring = (const char**) desc->constraint.string_list; @@ -979,7 +979,7 @@ QStrList KScanOption::getList( ) const if( desc->constraint_type == SANE_CONSTRAINT_WORD_LIST ) { const SANE_Int *sint = desc->constraint.word_list; int amount_vals = *sint; sint ++; - QString s; + TQString s; for( int i=0; i < amount_vals; i++ ) { if( desc->type == SANE_TYPE_FIXED ) @@ -1059,24 +1059,24 @@ bool KScanOption::getRange( double *min, double *max, double *q ) const return( ret ); } -QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc, - const QString& tooltip ) +TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc, + const TQString& tooltip ) { - QStrList list; + TQStrList list; if( ! valid() ) { kdDebug(29000) << "The option is not valid!" << endl; return( 0 ); } - QWidget *w = 0; + TQWidget *w = 0; /* free the old widget */ delete internal_widget; internal_widget = 0; /* check for text */ - QString text = w_desc; + TQString text = w_desc; if( text.isEmpty() && desc ) { - text = QString::fromLocal8Bit( desc->title ); + text = TQString::fromLocal8Bit( desc->title ); } @@ -1084,9 +1084,9 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc, { case BOOL: /* Widget Type is ToggleButton */ - w = new QCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" ); - connect( w, SIGNAL(clicked()), this, - SLOT(slWidgetChange())); + w = new TQCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" ); + connect( w, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slWidgetChange())); break; case SINGLE_VAL: /* Widget Type is Entry-Field */ @@ -1120,14 +1120,14 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc, if( w ) { internal_widget = w; - connect( this, SIGNAL( optionChanged( KScanOption*)), - SLOT( slRedrawWidget( KScanOption* ))); - QString tt = tooltip; + connect( this, TQT_SIGNAL( optionChanged( KScanOption*)), + TQT_SLOT( slRedrawWidget( KScanOption* ))); + TQString tt = tooltip; if( tt.isEmpty() && desc ) - tt = QString::fromLocal8Bit( desc->desc ); + tt = TQString::fromLocal8Bit( desc->desc ); if( !tt.isEmpty() ) - QToolTip::add( internal_widget, tt ); + TQToolTip::add( internal_widget, tt ); } /* Check if option is active, setEnabled etc. */ @@ -1137,38 +1137,38 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc, } -QWidget *KScanOption::comboBox( QWidget *parent, const QString& text ) +TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text ) { - QStrList list = getList(); + TQStrList list = getList(); KScanCombo *cb = new KScanCombo( parent, text, list); - connect( cb, SIGNAL( valueChanged( const QCString& )), this, - SLOT( slWidgetChange( const QCString& ))); + connect( cb, TQT_SIGNAL( valueChanged( const TQCString& )), this, + TQT_SLOT( slWidgetChange( const TQCString& ))); return( cb ); } -QWidget *KScanOption::entryField( QWidget *parent, const QString& text ) +TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text ) { KScanEntry *ent = new KScanEntry( parent, text ); - connect( ent, SIGNAL( valueChanged( QCString )), this, - SLOT( slWidgetChange( QCString ))); + connect( ent, TQT_SIGNAL( valueChanged( TQCString )), this, + TQT_SLOT( slWidgetChange( TQCString ))); return( ent ); } -QWidget *KScanOption::KSaneSlider( QWidget *parent, const QString& text ) +TQWidget *KScanOption::KSaneSlider( TQWidget *parent, const TQString& text ) { double min, max, quant; getRange( &min, &max, &quant ); KScanSlider *slider = new KScanSlider( parent, text, min, max ); /* Connect to the options change Slot */ - connect( slider, SIGNAL( valueChanged(int)), this, - SLOT( slWidgetChange(int))); + connect( slider, TQT_SIGNAL( valueChanged(int)), this, + TQT_SLOT( slWidgetChange(int))); return( slider ); } diff --git a/libkscan/kscanoption.h b/libkscan/kscanoption.h index 616ece23..fc1e8a0a 100644 --- a/libkscan/kscanoption.h +++ b/libkscan/kscanoption.h @@ -20,12 +20,12 @@ #ifndef _KSCANOPTION_H_ #define _KSCANOPTION_H_ -#include <qwidget.h> -#include <qdict.h> -#include <qobject.h> -#include <qstrlist.h> -#include <qsocketnotifier.h> -#include <qdatastream.h> +#include <tqwidget.h> +#include <tqdict.h> +#include <tqobject.h> +#include <tqstrlist.h> +#include <tqsocketnotifier.h> +#include <tqdatastream.h> extern "C" { #include <sane/sane.h> @@ -67,7 +67,7 @@ public: * option is valid and contains the correct value retrieved from the * scanner. **/ - KScanOption( const QCString& new_name ); + KScanOption( const TQCString& new_name ); /** * creates a KScanOption from another @@ -122,7 +122,7 @@ public: bool set( int val ); bool set( double val ); bool set( int *p_val, int size ); - bool set( const QCString& ); + bool set( const TQCString& ); bool set( bool b ){ if( b ) return(set( (int)(1==1) )); else return( set( (int) (1==0) )); } bool set( KGammaTable *gt ); @@ -131,7 +131,7 @@ public: **/ bool get( int* ) const; bool get( KGammaTable* ) const; - QCString get( void ) const; + TQCString get( void ) const; /** * This function creates a widget for the scanner option depending @@ -148,24 +148,24 @@ public: * **/ - QWidget *createWidget( QWidget *parent, - const QString& w_desc = QString::null, - const QString& tooltip = QString::null ); + TQWidget *createWidget( TQWidget *parent, + const TQString& w_desc = TQString::null, + const TQString& tooltip = TQString::null ); /* Operators */ const KScanOption& operator= (const KScanOption& so ); - const QString configLine( void ); + const TQString configLine( void ); // Possible Values - QStrList getList() const; + TQStrList getList() const; bool getRangeFromList( double*, double*, double* ) const; bool getRange( double*, double*, double* ) const; - QCString getName() const { return( name ); } + TQCString getName() const { return( name ); } void * getBuffer() const { return( buffer ); } - QWidget *widget( ) const { return( internal_widget ); } + TQWidget *widget( ) const { return( internal_widget ); } /** * returns the type of the selected option. * This might be SINGLE_VAL, VAL_LIST, STR_LIST, GAMMA_TABLE, @@ -185,7 +185,7 @@ public: ### not implemented at all? **/ - KSANE_Type typeToSet( const QCString& name ); + KSANE_Type typeToSet( const TQCString& name ); /** * returns a string describing the unit of given the option. @@ -194,7 +194,7 @@ public: ### not implemented at all? **/ - QString unitOf( const QCString& name ); + TQString unitOf( const TQCString& name ); public slots: void slRedrawWidget( KScanOption *so ); @@ -210,7 +210,7 @@ protected slots: * This is an internal slot. **/ void slWidgetChange( void ); - void slWidgetChange( const QCString& ); + void slWidgetChange( const TQCString& ); void slWidgetChange( int ); signals: @@ -234,17 +234,17 @@ protected slots: private: bool applyVal( void ); - bool initOption( const QCString& new_name ); + bool initOption( const TQCString& new_name ); void *allocBuffer( long ); - QWidget *entryField ( QWidget *parent, const QString& text ); - QWidget *KSaneSlider( QWidget *parent, const QString& text ); - QWidget *comboBox ( QWidget *parent, const QString& text ); + TQWidget *entryField ( TQWidget *parent, const TQString& text ); + TQWidget *KSaneSlider( TQWidget *parent, const TQString& text ); + TQWidget *comboBox ( TQWidget *parent, const TQString& text ); const SANE_Option_Descriptor *desc; - QCString name; + TQCString name; void *buffer; - QWidget *internal_widget; + TQWidget *internal_widget; bool buffer_untouched; size_t buffer_size; diff --git a/libkscan/kscanoptset.cpp b/libkscan/kscanoptset.cpp index ac30ae40..eac44987 100644 --- a/libkscan/kscanoptset.cpp +++ b/libkscan/kscanoptset.cpp @@ -17,10 +17,10 @@ Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qasciidict.h> -#include <qmap.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqasciidict.h> +#include <tqmap.h> +#include <tqdict.h> #include <kdebug.h> #include <kconfig.h> @@ -28,7 +28,7 @@ #include "kscanoption.h" #include "kscanoptset.h" -KScanOptSet::KScanOptSet( const QCString& setName ) +KScanOptSet::KScanOptSet( const TQCString& setName ) { name = setName; @@ -49,7 +49,7 @@ KScanOptSet::~KScanOptSet() -KScanOption *KScanOptSet::get( const QCString name ) const +KScanOption *KScanOptSet::get( const TQCString name ) const { KScanOption *ret = 0; @@ -58,10 +58,10 @@ KScanOption *KScanOptSet::get( const QCString name ) const return( ret ); } -QCString KScanOptSet::getValue( const QCString name ) const +TQCString KScanOptSet::getValue( const TQCString name ) const { KScanOption *re = get( name ); - QCString retStr = ""; + TQCString retStr = ""; if( re ) { @@ -80,7 +80,7 @@ bool KScanOptSet::backupOption( const KScanOption& opt ) bool retval = true; /** Allocate a new option and store it **/ - const QCString& optName = opt.getName(); + const TQCString& optName = opt.getName(); if( !optName ) retval = false; @@ -96,7 +96,7 @@ bool KScanOptSet::backupOption( const KScanOption& opt ) } else { - const QCString& qq = opt.get(); + const TQCString& qq = opt.get(); kdDebug(29000) << "Value is now: <" << qq << ">" << endl; const KScanOption *newopt = new KScanOption( opt ); @@ -115,19 +115,19 @@ bool KScanOptSet::backupOption( const KScanOption& opt ) } -QString KScanOptSet::getDescription() const +TQString KScanOptSet::getDescription() const { return description; } -void KScanOptSet::slSetDescription( const QString& str ) +void KScanOptSet::slSetDescription( const TQString& str ) { description = str; } -void KScanOptSet::backupOptionDict( const QAsciiDict<KScanOption>& optDict ) +void KScanOptSet::backupOptionDict( const TQAsciiDict<KScanOption>& optDict ) { - QAsciiDictIterator<KScanOption> it( optDict ); + TQAsciiDictIterator<KScanOption> it( optDict ); while ( it.current() ) { @@ -140,14 +140,14 @@ void KScanOptSet::backupOptionDict( const QAsciiDict<KScanOption>& optDict ) } /* */ -void KScanOptSet::saveConfig( const QString& scannerName, const QString& configName, - const QString& descr ) +void KScanOptSet::saveConfig( const TQString& scannerName, const TQString& configName, + const TQString& descr ) { - QString confFile = SCANNER_DB_FILE; + TQString confFile = SCANNER_DB_FILE; kdDebug( 29000) << "Creating scan configuration file <" << confFile << ">" << endl; KConfig *scanConfig = new KConfig( confFile ); - QString cfgName = configName; + TQString cfgName = configName; if( configName.isNull() || configName.isEmpty() ) cfgName = "default"; @@ -156,12 +156,12 @@ void KScanOptSet::saveConfig( const QString& scannerName, const QString& configN scanConfig->writeEntry( "description", descr ); scanConfig->writeEntry( "scannerName", scannerName ); - QAsciiDictIterator<KScanOption> it( *this); + TQAsciiDictIterator<KScanOption> it( *this); while ( it.current() ) { - const QString line = it.current() -> configLine(); - const QString name = it.current()->getName(); + const TQString line = it.current() -> configLine(); + const TQString name = it.current()->getName(); kdDebug(29000) << "writing " << name << " = <" << line << ">" << endl; @@ -174,14 +174,14 @@ void KScanOptSet::saveConfig( const QString& scannerName, const QString& configN delete( scanConfig ); } -bool KScanOptSet::load( const QString& /*scannerName*/ ) +bool KScanOptSet::load( const TQString& /*scannerName*/ ) { - QString confFile = SCANNER_DB_FILE; + TQString confFile = SCANNER_DB_FILE; kdDebug( 29000) << "** Reading from scan configuration file <" << confFile << ">" << endl; bool ret = true; KConfig *scanConfig = new KConfig( confFile, true ); - QString cfgName = name; /* of the KScanOptSet, given in constructor */ + TQString cfgName = name; /* of the KScanOptSet, given in constructor */ if( cfgName.isNull() || cfgName.isEmpty() ) cfgName = "default"; @@ -195,17 +195,17 @@ bool KScanOptSet::load( const QString& /*scannerName*/ ) { scanConfig->setGroup( name ); - typedef QMap<QString, QString> StringMap; + typedef TQMap<TQString, TQString> StringMap; StringMap strMap = scanConfig->entryMap( name ); StringMap::Iterator it; for( it = strMap.begin(); it != strMap.end(); ++it ) { - QCString optName = it.key().latin1(); + TQCString optName = it.key().latin1(); KScanOption optset( optName ); - QCString val = it.data().latin1(); + TQCString val = it.data().latin1(); kdDebug(29000) << "Reading for " << optName << " value " << val << endl; optset.set( val ); diff --git a/libkscan/kscanoptset.h b/libkscan/kscanoptset.h index 042dbe86..24cd4f8e 100644 --- a/libkscan/kscanoptset.h +++ b/libkscan/kscanoptset.h @@ -20,10 +20,10 @@ #ifndef KSCANOPTSET_H #define KSCANOPTSET_H -#include <qobject.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qasciidict.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqasciidict.h> #include "kscanoption.h" @@ -33,7 +33,7 @@ * about single scanner dependant options. It allows you to store a bunch * of options and accessing them via a iterator. * - * The class which is inherited from QAsciiDict does no deep copy of the options + * The class which is inherited from TQAsciiDict does no deep copy of the options * to store by with the standard method insert. * @see backupOption to get a deep copy. * @@ -46,7 +46,7 @@ -class KScanOptSet: public QAsciiDict<KScanOption> +class KScanOptSet: public TQAsciiDict<KScanOption> { public: @@ -54,12 +54,12 @@ public: * Constructor to create a new Container. Takes a string as a name, which * has no special meaning yet ;) */ - KScanOptSet( const QCString& ); + KScanOptSet( const TQCString& ); ~KScanOptSet(); /** * function to store a deep copy of an option. Note that this class is inherited - * from QAsciiDict and thus does no deep copies. This method does. + * from TQAsciiDict and thus does no deep copies. This method does. * @see insert */ bool backupOption( const KScanOption& ); @@ -67,10 +67,10 @@ public: /** * returns a pointer to a stored option given by name. */ - KScanOption *get( const QCString name ) const; - QCString getValue( const QCString name ) const; + KScanOption *get( const TQCString name ) const; + TQCString getValue( const TQCString name ) const; - void backupOptionDict( const QAsciiDict<KScanOption>& ); + void backupOptionDict( const TQAsciiDict<KScanOption>& ); /** * saves a configuration set to the configuration file 'ScanSettings' @@ -82,7 +82,7 @@ public: * @param configName: The name of the config, e.g. Black and White * @param descr : A description for the config. */ - void saveConfig( const QString&, const QString&, const QString&); + void saveConfig( const TQString&, const TQString&, const TQString&); /** * allows to load a configuration. Simple create a optionSet with the @@ -90,24 +90,24 @@ public: * load for the scanner you want. * @param scannerName: A scanner's name */ - bool load( const QString& scannerName ); + bool load( const TQString& scannerName ); - QString getDescription() const; + TQString getDescription() const; public slots: - void slSetDescription( const QString& ); + void slSetDescription( const TQString& ); private: - QCString name; + TQCString name; /* List to collect objects for which memory was allocated and must be freed */ - QPtrList<KScanOption> strayCatsList; + TQPtrList<KScanOption> strayCatsList; class KScanOptSetPrivate; KScanOptSetPrivate *d; - QString description; + TQString description; }; #endif // KScanOptSet diff --git a/libkscan/kscanslider.cpp b/libkscan/kscanslider.cpp index 3bf50395..e79634bd 100644 --- a/libkscan/kscanslider.cpp +++ b/libkscan/kscanslider.cpp @@ -17,49 +17,49 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qtooltip.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qslider.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqtooltip.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqslider.h> +#include <tqlineedit.h> #include <kiconloader.h> #include <klocale.h> #include <kdebug.h> #include "kscanslider.h" -KScanSlider::KScanSlider( QWidget *parent, const QString& text, +KScanSlider::KScanSlider( TQWidget *parent, const TQString& text, double min, double max, bool haveStdButt, int stdValue ) - : QFrame( parent ), + : TQFrame( parent ), m_stdValue( stdValue ), m_stdButt(0) { - QHBoxLayout *hb = new QHBoxLayout( this ); - l1 = new QLabel( text, this, "AUTO_SLIDER_LABEL" ); + TQHBoxLayout *hb = new TQHBoxLayout( this ); + l1 = new TQLabel( text, this, "AUTO_SLIDER_LABEL" ); hb->addWidget( l1,20 ); if( haveStdButt ) { KIconLoader *loader = KGlobal::iconLoader(); - m_stdButt = new QPushButton( this ); + m_stdButt = new TQPushButton( this ); m_stdButt->setPixmap( loader->loadIcon( "undo",KIcon::Small )); /* connect the button click to setting the value */ - connect( m_stdButt, SIGNAL(clicked()), - this, SLOT(slRevertValue())); + connect( m_stdButt, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slRevertValue())); - QToolTip::add( m_stdButt, + TQToolTip::add( m_stdButt, i18n( "Revert value back to its standard value %1" ).arg( stdValue )); hb->addWidget( m_stdButt, 0 ); hb->addSpacing( 4 ); } - slider = new QSlider( (int) min, (int)max, 1, (int)min, QSlider::Horizontal, this, "AUTO_SLIDER_" ); - slider->setTickmarks( QSlider::Below ); + slider = new TQSlider( (int) min, (int)max, 1, (int)min, TQSlider::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->setMinimumWidth( 140 ); @@ -67,17 +67,17 @@ KScanSlider::KScanSlider( QWidget *parent, const QString& text, l1->setBuddy( slider ); /* create a spinbox for displaying the values */ - m_spin = new QSpinBox( (int) min, (int) max, + m_spin = new TQSpinBox( (int) min, (int) max, 1, // step this ); /* make spin box changes change the slider */ - connect( m_spin, SIGNAL(valueChanged(int)), this, SLOT(slSliderChange(int))); + connect( m_spin, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slSliderChange(int))); /* Handle internal number display */ - // connect(slider, SIGNAL(valueChanged(int)), numdisp, SLOT( setNum(int) )); - connect(slider, SIGNAL(valueChanged(int)), this, SLOT( slSliderChange(int) )); + // connect(slider, TQT_SIGNAL(valueChanged(int)), numdisp, TQT_SLOT( setNum(int) )); + connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT( slSliderChange(int) )); /* set Value 0 to the widget */ slider->setValue( (int) min -1 ); @@ -149,28 +149,28 @@ KScanSlider::~KScanSlider() /* ====================================================================== */ -KScanEntry::KScanEntry( QWidget *parent, const QString& text ) - : QFrame( parent ) +KScanEntry::KScanEntry( TQWidget *parent, const TQString& text ) + : TQFrame( parent ) { - QHBoxLayout *hb = new QHBoxLayout( this ); + TQHBoxLayout *hb = new TQHBoxLayout( this ); - QLabel *l1 = new QLabel( text, this, "AUTO_ENTRYFIELD" ); + TQLabel *l1 = new TQLabel( text, this, "AUTO_ENTRYFIELD" ); hb->addWidget( l1,1 ); - entry = new QLineEdit( this, "AUTO_ENTRYFIELD_E" ); + entry = new TQLineEdit( this, "AUTO_ENTRYFIELD_E" ); l1->setBuddy( entry ); - connect( entry, SIGNAL( textChanged(const QString& )), - this, SLOT( slEntryChange(const QString&))); - connect( entry, SIGNAL( returnPressed()), - this, SLOT( slReturnPressed())); + connect( entry, TQT_SIGNAL( textChanged(const TQString& )), + this, TQT_SLOT( slEntryChange(const TQString&))); + connect( entry, TQT_SIGNAL( returnPressed()), + this, TQT_SLOT( slReturnPressed())); hb->addWidget( entry,3 ); hb->activate(); } -QString KScanEntry::text( void ) const +TQString KScanEntry::text( void ) const { - QString str = QString::null; + TQString str = TQString::null; // kdDebug(29000) << "entry is "<< entry << endl; if(entry) { @@ -191,7 +191,7 @@ QString KScanEntry::text( void ) const return ( str ); } -void KScanEntry::slSetEntry( const QString& t ) +void KScanEntry::slSetEntry( const TQString& t ) { if( t == entry->text() ) return; @@ -200,22 +200,22 @@ void KScanEntry::slSetEntry( const QString& t ) entry->setText( t ); } -void KScanEntry::slEntryChange( const QString& t ) +void KScanEntry::slEntryChange( const TQString& t ) { - emit valueChanged( QCString( t.latin1() ) ); + emit valueChanged( TQCString( t.latin1() ) ); } void KScanEntry::slReturnPressed( void ) { - QString t = text(); - emit returnPressed( QCString( t.latin1())); + TQString t = text(); + emit returnPressed( TQCString( t.latin1())); } -KScanCombo::KScanCombo( QWidget *parent, const QString& text, - const QStrList& list ) - : QHBox( parent ), +KScanCombo::KScanCombo( TQWidget *parent, const TQString& text, + const TQStrList& list ) + : TQHBox( parent ), combo(0) { createCombo( text ); @@ -224,40 +224,40 @@ KScanCombo::KScanCombo( QWidget *parent, const QString& text, combolist = list; } -KScanCombo::KScanCombo( QWidget *parent, const QString& text, - const QStringList& list ) - : QHBox( parent ), +KScanCombo::KScanCombo( TQWidget *parent, const TQString& text, + const TQStringList& list ) + : TQHBox( parent ), combo(0) { createCombo( text ); if( combo ) combo->insertStringList( list ); - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { combolist.append( (*it).local8Bit() ); } } -void KScanCombo::createCombo( const QString& text ) +void KScanCombo::createCombo( const TQString& text ) { setSpacing( 12 ); setMargin( 2 ); - (void) new QLabel( text, this, "AUTO_COMBOLABEL" ); + (void) new TQLabel( text, this, "AUTO_COMBOLABEL" ); - combo = new QComboBox( this, "AUTO_COMBO" ); + combo = new TQComboBox( this, "AUTO_COMBO" ); - connect( combo, SIGNAL(activated( const QString &)), this, - SLOT( slComboChange( const QString &))); - connect( combo, SIGNAL(activated( int )), - this, SLOT(slFireActivated(int))); + connect( combo, TQT_SIGNAL(activated( const TQString &)), this, + TQT_SLOT( slComboChange( const TQString &))); + connect( combo, TQT_SIGNAL(activated( int )), + this, TQT_SLOT(slFireActivated(int))); } -void KScanCombo::slSetEntry( const QString &t ) +void KScanCombo::slSetEntry( const TQString &t ) { if( t.isNull() ) return; int i = combolist.find( t.local8Bit() ); @@ -272,13 +272,13 @@ void KScanCombo::slSetEntry( const QString &t ) kdDebug(29000) << "Combo item not in list !" << endl; } -void KScanCombo::slComboChange( const QString &t ) +void KScanCombo::slComboChange( const TQString &t ) { - emit valueChanged( QCString( t.latin1() ) ); + emit valueChanged( TQCString( t.latin1() ) ); kdDebug(29000) << "Combo: valueChanged emitted!" << endl; } -void KScanCombo::slSetIcon( const QPixmap& pix, const QString& str) +void KScanCombo::slSetIcon( const TQPixmap& pix, const TQString& str) { for( int i=0; i < combo->count(); i++ ) { @@ -290,13 +290,13 @@ void KScanCombo::slSetIcon( const QPixmap& pix, const QString& str) } } -QString KScanCombo::currentText( void ) const +TQString KScanCombo::currentText( void ) const { return( combo->currentText() ); } -QString KScanCombo::text( int i ) const +TQString KScanCombo::text( int i ) const { return( combo->text(i) ); } diff --git a/libkscan/kscanslider.h b/libkscan/kscanslider.h index 7502ecad..9d95bd7c 100644 --- a/libkscan/kscanslider.h +++ b/libkscan/kscanslider.h @@ -20,19 +20,19 @@ #ifndef KSCANSLIDER_H #define KSCANSLIDER_H -#include <qframe.h> -#include <qstrlist.h> -#include <qhbox.h> -#include <qcombobox.h> -#include <qslider.h> -#include <qlineedit.h> +#include <tqframe.h> +#include <tqstrlist.h> +#include <tqhbox.h> +#include <tqcombobox.h> +#include <tqslider.h> +#include <tqlineedit.h> /** *@author Klaas Freitag */ -class QPushButton; -class QSpinBox; -class QLabel; +class TQPushButton; +class TQSpinBox; +class TQLabel; /** * a kind of extended slider which has a spinbox beside the slider offering @@ -60,7 +60,7 @@ public: * appears on the left of the slider. * @param stdValue the value to which the standard button resets the slider. */ - KScanSlider( QWidget *parent, const QString& text, + KScanSlider( TQWidget *parent, const TQString& text, double min, double max, bool haveStdButt=false, int stdValue=0); /** @@ -103,9 +103,9 @@ private slots: private: QSlider *slider; QLabel *l1, *numdisp; - QSpinBox *m_spin; + TQSpinBox *m_spin; int m_stdValue; - QPushButton *m_stdButt; + TQPushButton *m_stdButt; class KScanSliderPrivate; KScanSliderPrivate *d; @@ -117,7 +117,7 @@ private: class KScanEntry : public QFrame { Q_OBJECT - Q_PROPERTY( QString text READ text WRITE slSetEntry ) + Q_PROPERTY( TQString text READ text WRITE slSetEntry ) public: /** @@ -125,20 +125,20 @@ public: * @param parent the parent widget * @text the prefix text */ - KScanEntry( QWidget *parent, const QString& text ); + KScanEntry( TQWidget *parent, const TQString& text ); // ~KScanEntry(); /** * @return the current entry field contents. */ - QString text( ) const; + TQString text( ) const; public slots: /** * set the current text * @param t the new string */ - void slSetEntry( const QString& t ); + void slSetEntry( const TQString& t ); /** * enable or disable the text entry. * @param b set enabled if true, else disabled. @@ -149,14 +149,14 @@ protected slots: void slReturnPressed( void ); signals: - void valueChanged( const QCString& ); - void returnPressed( const QCString& ); + void valueChanged( const TQCString& ); + void returnPressed( const TQCString& ); private slots: - void slEntryChange( const QString& ); + void slEntryChange( const TQString& ); private: - QLineEdit *entry; + TQLineEdit *entry; class KScanEntryPrivate; KScanEntryPrivate *d; @@ -170,7 +170,7 @@ private: class KScanCombo : public QHBox { Q_OBJECT - Q_PROPERTY( QString cbEntry READ currentText WRITE slSetEntry ) + Q_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry ) public: /** @@ -180,19 +180,19 @@ public: * @param text the text the combobox is prepended by * @param list a stringlist with values the list should contain. */ - KScanCombo( QWidget *parent, const QString& text, const QStrList& list ); - KScanCombo( QWidget *parent, const QString& text, const QStringList& list ); + KScanCombo( TQWidget *parent, const TQString& text, const TQStrList& list ); + KScanCombo( TQWidget *parent, const TQString& text, const TQStringList& list ); // ~KScanCombo(); /** * @return the current selected text */ - QString currentText( ) const; + TQString currentText( ) const; /** * @return the text a position i */ - QString text( int i ) const; + TQString text( int i ) const; /** * @return the amount of list entries. @@ -204,7 +204,7 @@ public slots: * set the current entry to the given string if it is member of the list. * if not, the entry is not changed. */ - void slSetEntry( const QString &); + void slSetEntry( const TQString &); /** * enable or disable the combobox. @@ -217,7 +217,7 @@ public slots: * @param pix the pixmap to set. * @param str the string for which the pixmap should be set. */ - void slSetIcon( const QPixmap& pix, const QString& str); + void slSetIcon( const TQPixmap& pix, const TQString& str); /** * set the current item of the combobox. @@ -226,14 +226,14 @@ public slots: private slots: void slFireActivated( int); - void slComboChange( const QString & ); + void slComboChange( const TQString & ); signals: - void valueChanged( const QCString& ); + void valueChanged( const TQCString& ); void activated(int); private: - void createCombo( const QString& text ); + void createCombo( const TQString& text ); QComboBox *combo; QStrList combolist; diff --git a/libkscan/massscandialog.cpp b/libkscan/massscandialog.cpp index c86cd4e5..9d4a5f91 100644 --- a/libkscan/massscandialog.cpp +++ b/libkscan/massscandialog.cpp @@ -17,11 +17,11 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qprogressbar.h> -#include <qgroupbox.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqprogressbar.h> +#include <tqgroupbox.h> +#include <tqframe.h> #include <klocale.h> #include <kdebug.h> @@ -30,67 +30,67 @@ #include "massscandialog.h" -MassScanDialog::MassScanDialog( QWidget *parent ) - :QDialog( parent, "MASS_SCAN", true ) +MassScanDialog::MassScanDialog( TQWidget *parent ) + :TQDialog( parent, "MASS_SCAN", true ) { setCaption( i18n( "ADF Scanning" )); kdDebug(29000) << "Starting MassScanDialog!" << endl; // Layout-Boxes - QVBoxLayout *bigdad = new QVBoxLayout( this, 5 ); - // QHBoxLayout *hl1= new QHBoxLayout( ); // Caption - QHBoxLayout *l_but = new QHBoxLayout( 10 ); // Buttons + TQVBoxLayout *bigdad = new TQVBoxLayout( this, 5 ); + // TQHBoxLayout *hl1= new TQHBoxLayout( ); // Caption + TQHBoxLayout *l_but = new TQHBoxLayout( 10 ); // Buttons /* Caption */ - QLabel *l1 = new QLabel( i18n( "<B>Mass Scanning</B>" ), this); + TQLabel *l1 = new TQLabel( i18n( "<B>Mass Scanning</B>" ), this); bigdad->addWidget( l1, 1); /* Scan parameter information */ - QGroupBox *f1 = new QGroupBox( i18n("Scan Parameter"), this ); - f1->setFrameStyle( QFrame::Box | QFrame::Sunken ); + TQGroupBox *f1 = new TQGroupBox( i18n("Scan Parameter"), this ); + f1->setFrameStyle( TQFrame::Box | TQFrame::Sunken ); f1->setMargin(5); f1->setLineWidth( 1 ); - QVBoxLayout *l_main = new QVBoxLayout( f1, f1->frameWidth()+3, 3 ); + TQVBoxLayout *l_main = new TQVBoxLayout( f1, f1->frameWidth()+3, 3 ); bigdad->addWidget( f1, 6 ); scanopts = i18n("Scanning <B>%s</B> with <B>%d</B> dpi"); - l_scanopts = new QLabel( scanopts, f1 ); + l_scanopts = new TQLabel( scanopts, f1 ); l_main->addWidget( l_scanopts ); tofolder = i18n("Storing new images in folder <B>%s</B>"); - l_tofolder = new QLabel( tofolder, f1 ); + l_tofolder = new TQLabel( tofolder, f1 ); l_main->addWidget( l_tofolder ); /* Scan Progress information */ - QGroupBox *f2 = new QGroupBox( i18n("Scan Progress"), this ); - f2->setFrameStyle( QFrame::Box | QFrame::Sunken ); + TQGroupBox *f2 = new TQGroupBox( i18n("Scan Progress"), this ); + f2->setFrameStyle( TQFrame::Box | TQFrame::Sunken ); f2->setMargin(15); f2->setLineWidth( 1 ); - QVBoxLayout *l_pro = new QVBoxLayout( f2, f2->frameWidth()+3, 3 ); + TQVBoxLayout *l_pro = new TQVBoxLayout( f2, f2->frameWidth()+3, 3 ); bigdad->addWidget( f2, 6 ); - QHBoxLayout *l_scanp = new QHBoxLayout( ); + TQHBoxLayout *l_scanp = new TQHBoxLayout( ); l_pro->addLayout( l_scanp, 5 ); progress = i18n("Scanning page %1"); - l_progress = new QLabel( progress, f2 ); + l_progress = new TQLabel( progress, f2 ); l_scanp->addWidget( l_progress, 3 ); l_scanp->addStretch( 1 ); - QPushButton *pb_cancel_scan = new QPushButton( i18n("Cancel Scan"), f2); + TQPushButton *pb_cancel_scan = new TQPushButton( i18n("Cancel Scan"), f2); l_scanp->addWidget( pb_cancel_scan,3 ); - progressbar = new QProgressBar( 1000, f2 ); + progressbar = new TQProgressBar( 1000, f2 ); l_pro->addWidget( progressbar, 3 ); /* Buttons to start scanning and close the Window */ bigdad->addLayout( l_but ); - QPushButton *b_start = new QPushButton( i18n("Start Scan"), this, "ButtOK" ); - connect( b_start, SIGNAL(clicked()), this, SLOT( slStartScan()) ); + TQPushButton *b_start = new TQPushButton( i18n("Start Scan"), this, "ButtOK" ); + connect( b_start, TQT_SIGNAL(clicked()), this, TQT_SLOT( slStartScan()) ); - QPushButton *b_cancel = new QPushButton( i18n("Stop"), this, "ButtCancel" ); - connect( b_cancel, SIGNAL(clicked()), this, SLOT(slStopScan()) ); + TQPushButton *b_cancel = new TQPushButton( i18n("Stop"), this, "ButtCancel" ); + connect( b_cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStopScan()) ); - QPushButton *b_finish = new KPushButton( KStdGuiItem::close(), this, "ButtFinish" ); - connect( b_finish, SIGNAL(clicked()), this, SLOT(slFinished()) ); + TQPushButton *b_finish = new KPushButton( KStdGuiItem::close(), this, "ButtFinish" ); + connect( b_finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(slFinished()) ); l_but->addWidget( b_start ); l_but->addWidget( b_cancel ); diff --git a/libkscan/massscandialog.h b/libkscan/massscandialog.h index 6e57b098..dc1120b5 100644 --- a/libkscan/massscandialog.h +++ b/libkscan/massscandialog.h @@ -20,11 +20,11 @@ #ifndef MASSSCANDIALOG_H #define MASSSCANDIALOG_H -#include <qstring.h> -#include <qdialog.h> +#include <tqstring.h> +#include <tqdialog.h> -class QProgressBar; -class QLabel; +class TQProgressBar; +class TQLabel; /** *@author Klaas Freitag @@ -34,7 +34,7 @@ class MassScanDialog : public QDialog { Q_OBJECT public: - MassScanDialog( QWidget *parent); + MassScanDialog( TQWidget *parent); ~MassScanDialog(); public slots: @@ -49,16 +49,16 @@ public slots: } private: - QString scanopts; - QLabel *l_scanopts; + TQString scanopts; + TQLabel *l_scanopts; - QString tofolder; - QLabel *l_tofolder; + TQString tofolder; + TQLabel *l_tofolder; - QString progress; - QLabel *l_progress; + TQString progress; + TQLabel *l_progress; - QProgressBar *progressbar; + TQProgressBar *progressbar; class MassScanDialogPrivate; MassScanDialogPrivate *d; diff --git a/libkscan/previewer.cpp b/libkscan/previewer.cpp index f4133ee9..ec1f9065 100644 --- a/libkscan/previewer.cpp +++ b/libkscan/previewer.cpp @@ -18,17 +18,17 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qtooltip.h> -#include <qpopupmenu.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qcombobox.h> -#include <qradiobutton.h> -#include <qgroupbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqtooltip.h> +#include <tqpopupmenu.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqcombobox.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> +#include <tqlayout.h> #include <kdebug.h> #include <klocale.h> @@ -41,13 +41,13 @@ #include "sizeindicator.h" #include "devselector.h" /* for definition of config key :( */ #include "kscandevice.h" -#include <qslider.h> -#include <qcheckbox.h> +#include <tqslider.h> +#include <tqcheckbox.h> #include <kconfig.h> -#include <qbuttongroup.h> -#include <qvbuttongroup.h> +#include <tqbuttongroup.h> +#include <tqvbuttongroup.h> #include <kmessagebox.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #define ID_CUSTOM 0 #define ID_A4 1 @@ -95,33 +95,33 @@ public: bool m_bgIsWhite; /* indicates if a scan without paper * results in black or white */ - QSlider *m_sliderThresh; - QSlider *m_sliderDust; - QCheckBox *m_cbAutoSel; - QComboBox *m_cbBackground; - QGroupBox *m_autoSelGroup; + TQSlider *m_sliderThresh; + TQSlider *m_sliderDust; + TQCheckBox *m_cbAutoSel; + TQComboBox *m_cbBackground; + TQGroupBox *m_autoSelGroup; KScanDevice *m_scanner; - QMemArray<long> m_heightSum; - QMemArray<long> m_widthSum; + TQMemArray<long> m_heightSum; + TQMemArray<long> m_widthSum; }; -Previewer::Previewer(QWidget *parent, const char *name ) - : QWidget(parent,name) +Previewer::Previewer(TQWidget *parent, const char *name ) + : TQWidget(parent,name) { d = new PreviewerPrivate(); // beautification to look like the left scanparams widget in the dialog - QHBoxLayout *htop = new QHBoxLayout( this ); - QFrame *frame = new QFrame( this ); - frame->setFrameStyle( QFrame::Panel | QFrame::Raised ); + TQHBoxLayout *htop = new TQHBoxLayout( this ); + TQFrame *frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setLineWidth( 1 ); htop->addWidget( frame ); - QVBoxLayout *top = new QVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() ); - layout = new QHBoxLayout( KDialog::spacingHint() ); + TQVBoxLayout *top = new TQVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() ); + layout = new TQHBoxLayout( KDialog::spacingHint() ); top->addLayout( layout, 9 ); - QVBoxLayout *left = new QVBoxLayout( KDialog::spacingHint() ); + TQVBoxLayout *left = new TQVBoxLayout( KDialog::spacingHint() ); layout->addLayout( left, 2 ); /* Load autoselection values from Config file */ @@ -147,25 +147,25 @@ Previewer::Previewer(QWidget *parent, const char *name ) /* Actions for the previewer zoom */ KAction *act; act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I, - this, SLOT( slScaleToWidth()), this, "preview_scaletowidth" ); + this, TQT_SLOT( slScaleToWidth()), this, "preview_scaletowidth" ); act->plug( img_canvas->contextMenu()); act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H, - this, SLOT( slScaleToHeight()), this, "preview_scaletoheight" ); + this, TQT_SLOT( slScaleToHeight()), this, "preview_scaletoheight" ); act->plug( img_canvas->contextMenu()); /*Signals: Control the custom-field and show size of selection */ - connect( img_canvas, SIGNAL(newRect()), this, SLOT(slCustomChange())); - connect( img_canvas, SIGNAL(newRect(QRect)), this, SLOT(slNewDimen(QRect))); + connect( img_canvas, TQT_SIGNAL(newRect()), this, TQT_SLOT(slCustomChange())); + connect( img_canvas, TQT_SIGNAL(newRect(TQRect)), this, TQT_SLOT(slNewDimen(TQRect))); /* Stuff for the preview-Notification */ - left->addWidget( new QLabel( i18n("<B>Preview</B>"), frame ), 1); + left->addWidget( new TQLabel( i18n("<B>Preview</B>"), frame ), 1); // Create a button group to contain buttons for Portrait/Landscape - bgroup = new QVButtonGroup( i18n("Scan Size"), frame ); + bgroup = new TQVButtonGroup( i18n("Scan Size"), frame ); // ----- - pre_format_combo = new QComboBox( frame, "PREVIEWFORMATCOMBO" ); + pre_format_combo = new TQComboBox( frame, "PREVIEWFORMATCOMBO" ); pre_format_combo->insertItem( i18n( "Custom" ), ID_CUSTOM); pre_format_combo->insertItem( i18n( "DIN A4" ), ID_A4); pre_format_combo->insertItem( i18n( "DIN A5" ), ID_A5); @@ -174,23 +174,23 @@ Previewer::Previewer(QWidget *parent, const char *name ) pre_format_combo->insertItem( i18n( "10x15 cm" ), ID_10_15 ); pre_format_combo->insertItem( i18n( "Letter" ), ID_LETTER); - connect( pre_format_combo, SIGNAL(activated (int)), - this, SLOT( slFormatChange(int))); + connect( pre_format_combo, TQT_SIGNAL(activated (int)), + this, TQT_SLOT( slFormatChange(int))); left->addWidget( pre_format_combo, 1 ); /** Potrait- and Landscape Selector **/ - QFontMetrics fm = bgroup->fontMetrics(); - int w = fm.width( (const QString)i18n(" Landscape " ) ); + TQFontMetrics fm = bgroup->fontMetrics(); + int w = fm.width( (const TQString)i18n(" Landscape " ) ); int h = fm.height( ); - rb1 = new QRadioButton( i18n("&Landscape"), bgroup ); + rb1 = new TQRadioButton( i18n("&Landscape"), bgroup ); landscape_id = bgroup->id( rb1 ); - rb2 = new QRadioButton( i18n("P&ortrait"), bgroup ); + rb2 = new TQRadioButton( i18n("P&ortrait"), bgroup ); portrait_id = bgroup->id( rb2 ); bgroup->setButton( portrait_id ); - connect(bgroup, SIGNAL(clicked(int)), this, SLOT(slOrientChange(int))); + connect(bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slOrientChange(int))); int rblen = 5+w+12; // 12 for the button? rb1->setGeometry( 5, 6, rblen, h ); @@ -200,34 +200,34 @@ Previewer::Previewer(QWidget *parent, const char *name ) /** Autoselection Box **/ - d->m_autoSelGroup = new QGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame); + d->m_autoSelGroup = new TQGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame); - QHBox *hbox = new QHBox(d->m_autoSelGroup); - d->m_cbAutoSel = new QCheckBox( i18n("Active on"), hbox ); - QToolTip::add( d->m_cbAutoSel, i18n("Check here if you want autodetection\n" + TQHBox *hbox = new TQHBox(d->m_autoSelGroup); + d->m_cbAutoSel = new TQCheckBox( i18n("Active on"), hbox ); + TQToolTip::add( d->m_cbAutoSel, i18n("Check here if you want autodetection\n" "of the document on the preview.")); /* combobox to select if black or white background */ - d->m_cbBackground = new QComboBox( hbox ); + d->m_cbBackground = new TQComboBox( hbox ); d->m_cbBackground->insertItem(i18n("Black"), BG_ITEM_BLACK ); d->m_cbBackground->insertItem(i18n("White"), BG_ITEM_WHITE ); - connect( d->m_cbBackground, SIGNAL(activated(int) ), - this, SLOT( slScanBackgroundChanged( int ))); + connect( d->m_cbBackground, TQT_SIGNAL(activated(int) ), + this, TQT_SLOT( slScanBackgroundChanged( int ))); - QToolTip::add( d->m_cbBackground, + TQToolTip::add( d->m_cbBackground, i18n("Select whether a scan of the empty\n" "scanner glass results in a\n" "black or a white image.")); - connect( d->m_cbAutoSel, SIGNAL(toggled(bool) ), SLOT(slAutoSelToggled(bool))); + connect( d->m_cbAutoSel, TQT_SIGNAL(toggled(bool) ), TQT_SLOT(slAutoSelToggled(bool))); - (void) new QLabel( i18n("scanner background"), d->m_autoSelGroup ); + (void) new TQLabel( i18n("scanner background"), d->m_autoSelGroup ); - QLabel *l1= new QLabel( i18n("Thresh&old:"), d->m_autoSelGroup ); - d->m_sliderThresh = new QSlider( 0, 254, 10, d->m_autoSelThresh, Qt::Horizontal, + TQLabel *l1= new TQLabel( i18n("Thresh&old:"), d->m_autoSelGroup ); + d->m_sliderThresh = new TQSlider( 0, 254, 10, d->m_autoSelThresh, Qt::Horizontal, d->m_autoSelGroup ); - connect( d->m_sliderThresh, SIGNAL(valueChanged(int)), SLOT(slSetAutoSelThresh(int))); - QToolTip::add( d->m_sliderThresh, + connect( d->m_sliderThresh, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slSetAutoSelThresh(int))); + TQToolTip::add( d->m_sliderThresh, i18n("Threshold for autodetection.\n" "All pixels higher (on black background)\n" "or smaller (on white background)\n" @@ -235,9 +235,9 @@ Previewer::Previewer(QWidget *parent, const char *name ) l1->setBuddy(d->m_sliderThresh); #if 0 /** Dustsize-Slider: No deep impact on result **/ - (void) new QLabel( i18n("Dust size:"), grBox ); - d->m_sliderDust = new QSlider( 0, 50, 5, d->m_dustsize, Qt::Horizontal, grBox ); - connect( d->m_sliderDust, SIGNAL(valueChanged(int)), SLOT(slSetAutoSelDustsize(int))); + (void) new TQLabel( i18n("Dust size:"), grBox ); + d->m_sliderDust = new TQSlider( 0, 50, 5, d->m_dustsize, Qt::Horizontal, grBox ); + connect( d->m_sliderDust, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slSetAutoSelDustsize(int))); #endif /* disable Autoselbox as long as no scanner is connected */ @@ -246,27 +246,27 @@ Previewer::Previewer(QWidget *parent, const char *name ) left->addWidget(d->m_autoSelGroup); /* Labels for the dimension */ - QGroupBox *gbox = new QGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" ); + TQGroupBox *gbox = new TQGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" ); - QLabel *l2 = new QLabel( i18n("width - mm" ), gbox ); - QLabel *l3 = new QLabel( i18n("height - mm" ), gbox ); + TQLabel *l2 = new TQLabel( i18n("width - mm" ), gbox ); + TQLabel *l3 = new TQLabel( i18n("height - mm" ), gbox ); - connect( this, SIGNAL(setScanWidth(const QString&)), - l2, SLOT(setText(const QString&))); - connect( this, SIGNAL(setScanHeight(const QString&)), - l3, SLOT(setText(const QString&))); + connect( this, TQT_SIGNAL(setScanWidth(const TQString&)), + l2, TQT_SLOT(setText(const TQString&))); + connect( this, TQT_SIGNAL(setScanHeight(const TQString&)), + l3, TQT_SLOT(setText(const TQString&))); /* size indicator */ - QHBox *hb = new QHBox( gbox ); - (void) new QLabel( i18n( "Size:"), hb ); + TQHBox *hb = new TQHBox( gbox ); + (void) new TQLabel( i18n( "Size:"), hb ); SizeIndicator *indi = new SizeIndicator( hb ); - QToolTip::add( indi, i18n( "This size field shows how large the uncompressed image will be.\n" + TQToolTip::add( indi, i18n( "This size field shows how large the uncompressed image will be.\n" "It tries to warn you, if you try to produce huge images by \n" "changing its background color." )); indi->setText( i18n("-") ); - connect( this, SIGNAL( setSelectionSize(long)), - indi, SLOT( setSizeInByte (long)) ); + connect( this, TQT_SIGNAL( setSelectionSize(long)), + indi, TQT_SLOT( setSizeInByte (long)) ); left->addWidget( gbox, 1 ); @@ -292,7 +292,7 @@ Previewer::~Previewer() delete d; } -bool Previewer::setPreviewImage( const QImage &image ) +bool Previewer::setPreviewImage( const TQImage &image ) { if ( image.isNull() ) return false; @@ -303,9 +303,9 @@ bool Previewer::setPreviewImage( const QImage &image ) return true; } -QString Previewer::galleryRoot() +TQString Previewer::galleryRoot() { - QString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); + TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true ); if( !dir.endsWith("/") ) dir += "/"; @@ -314,7 +314,7 @@ QString Previewer::galleryRoot() } -void Previewer::newImage( QImage *ni ) +void Previewer::newImage( TQImage *ni ) { /* image canvas does not copy the image, so we hold a copy here */ m_previewImage = *ni; @@ -352,7 +352,7 @@ void Previewer::slOrientChange( int id ) /** Slot called whenever the format selection combo changes. **/ void Previewer::slFormatChange( int id ) { - QPoint p(0,0); + TQPoint p(0,0); bool lands_allowed; bool portr_allowed; bool setSelection = true; @@ -421,10 +421,10 @@ void Previewer::slFormatChange( int id ) bgroup->setButton( portrait_id ); format_id = portrait_id; } - /* Convert the new dimension to a new QRect and call slot in canvas */ + /* Convert the new dimension to a new TQRect and call slot in canvas */ if( setSelection ) { - QRect newrect; + TQRect newrect; newrect.setRect( 0,0, p.y(), p.x() ); if( format_id == portrait_id ) @@ -469,14 +469,14 @@ void Previewer::slNewScanResolutions( int x, int y ) * in values between 0..1000. It emits signals, that redraw the * size labels. */ -void Previewer::slNewDimen(QRect r) +void Previewer::slNewDimen(TQRect r) { if( r.height() > 0) selectionWidthMm = (overallWidth / 1000 * r.width()); if( r.width() > 0) selectionHeightMm = (overallHeight / 1000 * r.height()); - QString s; + TQString s; s = i18n("width %1 mm").arg( int(selectionWidthMm)); emit(setScanWidth(s)); @@ -507,9 +507,9 @@ void Previewer::recalcFileSize( void ) } -QPoint Previewer::calcPercent( int w_mm, int h_mm ) +TQPoint Previewer::calcPercent( int w_mm, int h_mm ) { - QPoint p(0,0); + TQPoint p(0,0); if( overallWidth < 1.0 || overallHeight < 1.0 ) return( p ); if( sizeUnit == KRuler::Millimetres ) { @@ -547,20 +547,20 @@ void Previewer::slConnectScanner( KScanDevice *scan ) { /* Enable the by-default disabled autoselection group */ d->m_autoSelGroup->setEnabled(true); - QString h; + TQString h; - h = scan->getConfig( CFG_AUTOSEL_DO, QString("unknown") ); - if( h == QString("on") ) + h = scan->getConfig( CFG_AUTOSEL_DO, TQString("unknown") ); + if( h == TQString("on") ) d->m_cbAutoSel->setChecked(true); else d->m_cbAutoSel->setChecked(false); - QString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" ); + TQString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" ); - h = scan->getConfig( CFG_AUTOSEL_DUSTSIZE, QString("5") ); + h = scan->getConfig( CFG_AUTOSEL_DUSTSIZE, TQString("5") ); d->m_dustsize = h.toInt(); - QString thresh = DEF_THRESH_BLACK; /* for black */ + TQString thresh = DEF_THRESH_BLACK; /* for black */ if( isWhite.lower() == "yes" ) thresh = DEF_THRESH_WHITE; @@ -584,7 +584,7 @@ void Previewer::slSetScannerBgIsWhite( bool b ) d->m_cbBackground->setCurrentItem( BG_ITEM_BLACK ); } - d->m_scanner->slStoreConfig( CFG_SCANNER_EMPTY_BG, b ? QString("Yes") : QString("No")); + d->m_scanner->slStoreConfig( CFG_SCANNER_EMPTY_BG, b ? TQString("Yes") : TQString("No")); } } @@ -597,7 +597,7 @@ void Previewer::checkForScannerBg() { if( d->m_scanner ) /* Is the scan device already known? */ { - QString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" ); + TQString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" ); bool goWhite = false; if( isWhite == "unknown" ) { @@ -634,7 +634,7 @@ void Previewer::slAutoSelToggled(bool isOn ) if( d->m_cbAutoSel ) { - QRect r = img_canvas->sel(); + TQRect r = img_canvas->sel(); kdDebug(29000) << "The rect is " << r.width() << " x " << r.height() << endl; d->m_doAutoSelection = isOn; @@ -673,7 +673,7 @@ void Previewer::slSetAutoSelThresh(int t) d->m_autoSelThresh = t; kdDebug(29000) << "Setting threshold to " << t << endl; if( d->m_scanner ) - d->m_scanner->slStoreConfig( CFG_AUTOSEL_THRESH, QString::number(t) ); + d->m_scanner->slStoreConfig( CFG_AUTOSEL_THRESH, TQString::number(t) ); findSelection(); } @@ -701,22 +701,22 @@ void Previewer::findSelection( ) if( ! d->m_doAutoSelection ) return; int line; int x; - const QImage *img = img_canvas->rootImage(); + const TQImage *img = img_canvas->rootImage(); if( ! img ) return; long iWidth = img->width(); long iHeight = img->height(); - QMemArray<long> heightSum; - QMemArray<long> widthSum; + TQMemArray<long> heightSum; + TQMemArray<long> widthSum; kdDebug(29000)<< "Preview size is " << iWidth << "x" << iHeight << endl; if( (d->m_heightSum).size() == 0 && (iHeight>0) ) { kdDebug(29000) << "Starting to fill Array " << endl; - QMemArray<long> heightSum(iHeight); - QMemArray<long> widthSum(iWidth); + TQMemArray<long> heightSum(iHeight); + TQMemArray<long> widthSum(iWidth); heightSum.fill(0); widthSum.fill(0); @@ -753,9 +753,9 @@ void Previewer::findSelection( ) #if 0 /* debug output */ { - QFile fi( "/tmp/thheight.dat"); + TQFile fi( "/tmp/thheight.dat"); if( fi.open( IO_ReadWrite ) ) { - QTextStream str( &fi ); + TQTextStream str( &fi ); str << "# height ##################" << endl; for( x = 0; x < iHeight; x++ ) @@ -763,10 +763,10 @@ void Previewer::findSelection( ) fi.close(); } } - QFile fi1( "/tmp/thwidth.dat"); + TQFile fi1( "/tmp/thwidth.dat"); if( fi1.open( IO_ReadWrite )) { - QTextStream str( &fi1 ); + TQTextStream str( &fi1 ); str << "# width ##################" << endl; str << "# " << iWidth << " points" << endl; for( x = 0; x < iWidth; x++ ) @@ -777,7 +777,7 @@ void Previewer::findSelection( ) #endif int start = 0; int end = 0; - QRect r; + TQRect r; /** scale to 0..1000 range **/ start = 0; @@ -813,7 +813,7 @@ void Previewer::findSelection( ) /* * returns an Array containing the */ -bool Previewer::imagePiece( QMemArray<long> src, int& start, int& end ) +bool Previewer::imagePiece( TQMemArray<long> src, int& start, int& end ) { for( uint x = 0; x < src.size(); x++ ) { diff --git a/libkscan/previewer.h b/libkscan/previewer.h index b2f993a0..6d9a7b10 100644 --- a/libkscan/previewer.h +++ b/libkscan/previewer.h @@ -20,31 +20,31 @@ #ifndef PREVIEWER_H #define PREVIEWER_H -#include <qwidget.h> -#include <qimage.h> -#include <qrect.h> -#include <qbuttongroup.h> -#include <qpoint.h> +#include <tqwidget.h> +#include <tqimage.h> +#include <tqrect.h> +#include <tqbuttongroup.h> +#include <tqpoint.h> #include <kruler.h> -#include <qmemarray.h> +#include <tqmemarray.h> /** *@author Klaas Freitag */ class ImageCanvas; -class QCheckBox; -class QSlider; +class TQCheckBox; +class TQSlider; class KScanDevice; -class QComboBox; -class QRadioButton; -class QHBoxLayout; +class TQComboBox; +class TQRadioButton; +class TQHBoxLayout; class Previewer : public QWidget { Q_OBJECT public: - Previewer(QWidget *parent=0, const char *name=0); + Previewer(TQWidget *parent=0, const char *name=0); ~Previewer(); ImageCanvas *getImageCanvas( void ){ return( img_canvas ); } @@ -52,18 +52,18 @@ public: /** * Static function that returns the image gallery base dir. */ - static QString galleryRoot(); - bool setPreviewImage( const QImage &image ); + static TQString galleryRoot(); + bool setPreviewImage( const TQImage &image ); void findSelection(); public slots: - void newImage( QImage* ); + void newImage( TQImage* ); void slFormatChange( int id ); void slOrientChange(int); void slSetDisplayUnit( KRuler::MetricStyle unit ); void setScanSize( int w, int h, KRuler::MetricStyle unit ); void slCustomChange( void ); - void slNewDimen(QRect r); + void slNewDimen(TQRect r); void slNewScanResolutions( int, int ); void recalcFileSize( void ); void slSetAutoSelThresh(int); @@ -77,27 +77,27 @@ protected slots: void slScanBackgroundChanged(int); signals: - void newRect( QRect ); + void newRect( TQRect ); void noRect( void ); - void setScanWidth(const QString&); - void setScanHeight(const QString&); + void setScanWidth(const TQString&); + void setScanHeight(const TQString&); void setSelectionSize( long ); private: void checkForScannerBg(); - QPoint calcPercent( int, int ); + TQPoint calcPercent( int, int ); - QHBoxLayout *layout; + TQHBoxLayout *layout; ImageCanvas *img_canvas; - QComboBox *pre_format_combo; - QMemArray<QCString> format_ids; - QButtonGroup * bgroup; - QRadioButton * rb1; - QRadioButton * rb2; - QImage m_previewImage; - - bool imagePiece( QMemArray<long> src, + TQComboBox *pre_format_combo; + TQMemArray<TQCString> format_ids; + TQButtonGroup * bgroup; + TQRadioButton * rb1; + TQRadioButton * rb2; + TQImage m_previewImage; + + bool imagePiece( TQMemArray<long> src, int& start, int& end ); diff --git a/libkscan/scandialog.cpp b/libkscan/scandialog.cpp index 8a6689fa..2e3db229 100644 --- a/libkscan/scandialog.cpp +++ b/libkscan/scandialog.cpp @@ -18,14 +18,14 @@ Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qtooltip.h> -#include <qsizepolicy.h> -#include <qapplication.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqtooltip.h> +#include <tqsizepolicy.h> +#include <tqapplication.h> +#include <tqcheckbox.h> #include <kglobal.h> #include <klocale.h> @@ -51,14 +51,14 @@ extern "C" { } } -ScanDialogFactory::ScanDialogFactory( QObject *parent, const char *name ) +ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name ) : KScanDialogFactory( parent, name ) { setName( "ScanDialogFactory" ); - KGlobal::locale()->insertCatalogue( QString::fromLatin1("libkscan") ); + KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") ); } -KScanDialog * ScanDialogFactory::createDialog( QWidget *parent, +KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent, const char *name, bool modal) { return new ScanDialog( parent, name, modal ); @@ -68,24 +68,24 @@ KScanDialog * ScanDialogFactory::createDialog( QWidget *parent, /////////////////////////////////////////////////////////////////// -ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal ) +ScanDialog::ScanDialog( TQWidget *parent, const char *name, bool modal ) : KScanDialog( Tabbed, Close|Help, parent, name, modal ), good_scan_connect(false) { - QVBox *page = addVBoxPage( i18n("&Scanning") ); + TQVBox *page = addVBoxPage( i18n("&Scanning") ); - splitter = new QSplitter( Horizontal, page, "splitter" ); + splitter = new TQSplitter( Horizontal, page, "splitter" ); Q_CHECK_PTR( splitter ); m_scanParams = 0; m_device = new KScanDevice( this ); - connect(m_device, SIGNAL(sigNewImage(QImage *, ImgScanInfo*)), - this, SLOT(slotFinalImage(QImage *, ImgScanInfo *))); + connect(m_device, TQT_SIGNAL(sigNewImage(TQImage *, ImgScanInfo*)), + this, TQT_SLOT(slotFinalImage(TQImage *, ImgScanInfo *))); - connect( m_device, SIGNAL(sigScanStart()), this, SLOT(slotScanStart())); - connect( m_device, SIGNAL(sigScanFinished(KScanStat)), - this, SLOT(slotScanFinished(KScanStat))); - connect( m_device, SIGNAL(sigAcquireStart()), this, SLOT(slotAcquireStart())); + connect( m_device, TQT_SIGNAL(sigScanStart()), this, TQT_SLOT(slotScanStart())); + connect( m_device, TQT_SIGNAL(sigScanFinished(KScanStat)), + this, TQT_SLOT(slotScanFinished(KScanStat))); + connect( m_device, TQT_SIGNAL(sigAcquireStart()), this, TQT_SLOT(slotAcquireStart())); /* Create a preview widget to the right side of the splitter */ m_previewer = new Previewer( splitter ); Q_CHECK_PTR(m_previewer ); @@ -93,8 +93,8 @@ ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal ) /* ... and connect to the selector-slots. They communicate user's * selection to the scanner parameter engine */ /* a new preview signal */ - connect( m_device, SIGNAL( sigNewPreview( QImage*, ImgScanInfo* )), - this, SLOT( slotNewPreview( QImage* ))); + connect( m_device, TQT_SIGNAL( sigNewPreview( TQImage*, ImgScanInfo* )), + this, TQT_SLOT( slotNewPreview( TQImage* ))); m_previewer->setEnabled( false ); // will be enabled in setup() @@ -107,44 +107,44 @@ ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal ) void ScanDialog::createOptionsTab( void ) { - QVBox *page = addVBoxPage( i18n("&Options")); + TQVBox *page = addVBoxPage( i18n("&Options")); setMainWidget(page); - QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" ); - QLabel *label = new QLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ), + 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( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + label->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); /* Checkbox for asking for scanner on startup */ - cb_askOnStart = new QCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb ); - QToolTip::add( cb_askOnStart, + cb_askOnStart = new TQCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb ); + TQToolTip::add( cb_askOnStart, i18n("You can uncheck this if you do not want to be asked which scanner to use on startup.")); Q_CHECK_PTR( cb_askOnStart ); /* Checkbox for network access */ - cb_network = new QCheckBox( i18n( "&Query the network for scan devices"), gb ); - QToolTip::add( cb_network, + cb_network = new TQCheckBox( i18n( "&Query the network for scan devices"), gb ); + TQToolTip::add( cb_network, i18n("Check this if you want to query for configured network scan stations.")); Q_CHECK_PTR( cb_network ); /* Read settings for startup behavior */ KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false ); /* Note: flag must be inverted because of question is 'the other way round' */ cb_askOnStart->setChecked( !skipDialog ); - connect( cb_askOnStart, SIGNAL(toggled(bool)), this, SLOT(slotAskOnStartToggle(bool))); + connect( cb_askOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotAskOnStartToggle(bool))); cb_network->setChecked( !onlyLocal ); - connect( cb_network, SIGNAL(toggled(bool)), this, SLOT(slotNetworkToggle(bool))); + connect( cb_network, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotNetworkToggle(bool))); - QWidget *spaceEater = new QWidget( page ); + TQWidget *spaceEater = new TQWidget( page ); Q_CHECK_PTR( spaceEater ); - spaceEater->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding) ); + spaceEater->setSizePolicy( 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(QString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::fromLatin1(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(QString::fromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true ); } @@ -230,20 +230,20 @@ bool ScanDialog::setup() } m_scanParams = new ScanParams( splitter ); - connect( m_previewer->getImageCanvas(), SIGNAL( newRect(QRect)), - m_scanParams, SLOT(slCustomScanSize(QRect))); - connect( m_previewer->getImageCanvas(), SIGNAL( noRect()), - m_scanParams, SLOT(slMaximalScanSize())); + connect( m_previewer->getImageCanvas(), TQT_SIGNAL( newRect(TQRect)), + m_scanParams, TQT_SLOT(slCustomScanSize(TQRect))); + connect( m_previewer->getImageCanvas(), TQT_SIGNAL( noRect()), + m_scanParams, TQT_SLOT(slMaximalScanSize())); - connect( m_scanParams, SIGNAL( scanResolutionChanged( int, int )), - m_previewer, SLOT( slNewScanResolutions( int, int ))); + connect( m_scanParams, TQT_SIGNAL( scanResolutionChanged( int, int )), + m_previewer, TQT_SLOT( slNewScanResolutions( int, int ))); /* continue to attach a real scanner */ /* first, get the list of available devices from libkscan */ - QStringList scannerNames; - QStrList backends = m_device->getDevices();; - QStrListIterator it( backends ); + TQStringList scannerNames; + TQStrList backends = m_device->getDevices();; + TQStrListIterator it( backends ); while ( it.current() ) { scannerNames.append( m_device->getScannerName( it.current() )); @@ -251,7 +251,7 @@ bool ScanDialog::setup() } /* ..if there are devices.. */ - QCString configDevice; + TQCString configDevice; good_scan_connect = true; if( scannerNames.count() > 0 ) { @@ -262,7 +262,7 @@ bool ScanDialog::setup() if( configDevice.isEmpty() || configDevice.isNull() ) { kdDebug(29000) << "configDevice is not valid - starting selector!" << configDevice << endl; - if ( ds.exec() == QDialog::Accepted ) + if ( ds.exec() == TQDialog::Accepted ) { configDevice = ds.getSelectedDevice(); } @@ -310,11 +310,11 @@ bool ScanDialog::setup() KConfig *kfg = KGlobal::config(); if( kfg ) { - QRect r = KGlobalSettings::desktopGeometry(this); + TQRect r = KGlobalSettings::desktopGeometry(this); kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - QString key = QString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); + TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); kdDebug(29000) << "Read Splitter-Sizes " << key << endl; splitter->setSizes( kfg->readIntListEntry( key )); } @@ -332,11 +332,11 @@ void ScanDialog::slotClose() KConfig *kfg = KGlobal::config(); if( kfg ) { - QRect r = KGlobalSettings::desktopGeometry(this); + TQRect r = KGlobalSettings::desktopGeometry(this); kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - QString key = QString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); + TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width()); kfg->writeEntry( key, splitter->sizes(), true, true); } } @@ -354,7 +354,7 @@ void ScanDialog::slotClose() accept(); } -void ScanDialog::slotNewPreview( QImage *image ) +void ScanDialog::slotNewPreview( TQImage *image ) { if( image ) { @@ -372,7 +372,7 @@ ScanDialog::~ScanDialog() { } -void ScanDialog::slotFinalImage(QImage *image, ImgScanInfo *) +void ScanDialog::slotFinalImage(TQImage *image, ImgScanInfo *) { emit finalImage(*image, nextId()); } diff --git a/libkscan/scandialog.h b/libkscan/scandialog.h index 02aa48b1..71667326 100644 --- a/libkscan/scandialog.h +++ b/libkscan/scandialog.h @@ -21,20 +21,20 @@ #ifndef SCAN_H #define SCAN_H -#include <qimage.h> +#include <tqimage.h> #include <kscan.h> class ScanParams; class KScanDevice; class Previewer; -class QSplitter; +class TQSplitter; class ScanDialog : public KScanDialog { Q_OBJECT public: - ScanDialog( QWidget *parent=0, const char *name=0, bool modal=false ); + ScanDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); ~ScanDialog(); virtual bool setup(); @@ -43,8 +43,8 @@ private: void createOptionsTab( void ); protected slots: - void slotFinalImage( QImage *, ImgScanInfo * ); - void slotNewPreview( QImage * ); + void slotFinalImage( TQImage *, ImgScanInfo * ); + void slotNewPreview( TQImage * ); void slotScanStart( ); void slotScanFinished( KScanStat status ); void slotAcquireStart(); @@ -59,11 +59,11 @@ private: ScanParams *m_scanParams; KScanDevice *m_device; Previewer *m_previewer; - QImage m_previewImage; + TQImage m_previewImage; bool good_scan_connect; - QCheckBox *cb_askOnStart; - QCheckBox *cb_network; - QSplitter *splitter; + TQCheckBox *cb_askOnStart; + TQCheckBox *cb_network; + TQSplitter *splitter; class ScanDialogPrivate; ScanDialogPrivate *d; }; @@ -71,10 +71,10 @@ private: class ScanDialogFactory : public KScanDialogFactory { public: - ScanDialogFactory( QObject *parent=0, const char *name=0 ); + ScanDialogFactory( TQObject *parent=0, const char *name=0 ); protected: - virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0, + virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0, bool modal=false ); diff --git a/libkscan/scanparams.cpp b/libkscan/scanparams.cpp index d886d113..b121c77d 100644 --- a/libkscan/scanparams.cpp +++ b/libkscan/scanparams.cpp @@ -18,22 +18,22 @@ */ #include <sane/saneopts.h> -#include <qcstring.h> -#include <qfile.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qimage.h> -#include <qtooltip.h> -#include <qmessagebox.h> -#include <qlayout.h> -#include <qdict.h> -#include <qprogressdialog.h> -#include <qscrollview.h> -#include <qsizepolicy.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqimage.h> +#include <tqtooltip.h> +#include <tqmessagebox.h> +#include <tqlayout.h> +#include <tqdict.h> +#include <tqprogressdialog.h> +#include <tqscrollview.h> +#include <tqsizepolicy.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> #include <kfiledialog.h> @@ -53,8 +53,8 @@ -ScanParams::ScanParams( QWidget *parent, const char *name ) - : QVBox( parent, name ), +ScanParams::ScanParams( TQWidget *parent, const char *name ) + : TQVBox( parent, name ), m_firstGTEdit( true ) { /* first some initialisation and debug messages */ @@ -94,17 +94,17 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) } sane_device = newScanDevice; - QStrList strl = sane_device->getCommonOptions(); - QString emp; + TQStrList strl = sane_device->getCommonOptions(); + TQString emp; for ( emp=strl.first(); strl.current(); emp=strl.next() ) kdDebug(29000) << "Common: " << strl.current() << endl; /* Start path for virual scanner */ - last_virt_scan_path = QDir::home(); + last_virt_scan_path = TQDir::home(); adf = ADF_OFF; /* Frame stuff for toplevel of scanparams - beautification */ - setFrameStyle( QFrame::Panel | QFrame::Raised ); + setFrameStyle( TQFrame::Panel | TQFrame::Raised ); setLineWidth( 1 ); @@ -112,21 +112,21 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) cb_gray_preview = 0; /* A top layout box */ - // QVBoxLayout *top = new QVBoxLayout(this, 6); - QHBox *hb = new QHBox( this ); + // TQVBoxLayout *top = new TQVBoxLayout(this, 6); + TQHBox *hb = new TQHBox( this ); hb->setSpacing( KDialog::spacingHint() ); - QString cap = i18n("<B>Scanner Settings</B>") + " : "; + TQString cap = i18n("<B>Scanner Settings</B>") + " : "; cap += sane_device->getScannerName(); - (void ) new QLabel( cap, hb ); + (void ) new TQLabel( cap, hb ); m_led = new KLed( hb ); m_led->setState( KLed::Off ); - m_led->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed )); + m_led->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); (void) new KSeparator( KSeparator::HLine, this); /* Now create Widgets for the important scan settings */ - QScrollView *sv = 0; + TQScrollView *sv = 0; if( sane_device->optionExists( SANE_NAME_FILE ) ) { @@ -156,25 +156,25 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) /* Create a Start-Scan-Button */ (void) new KSeparator( KSeparator::HLine, this); KButtonBox *kbb = new KButtonBox( this ); - QPushButton* pb = kbb->addButton( KGuiItem( i18n( "Final S&can" ), "scanner" ) ); - connect( pb, SIGNAL(clicked()), this, SLOT(slStartScan()) ); + TQPushButton* pb = kbb->addButton( KGuiItem( i18n( "Final S&can" ), "scanner" ) ); + connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStartScan()) ); pb = kbb->addButton( i18n( "&Preview Scan" )); - connect( pb, SIGNAL(clicked()), this, SLOT(slAcquirePreview()) ); + connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slAcquirePreview()) ); kbb->layout(); /* Initialise the progress dialog */ - progressDialog = new QProgressDialog( i18n("Scanning in progress"), + progressDialog = new TQProgressDialog( i18n("Scanning in progress"), i18n("Stop"), 100, 0L, "SCAN_PROGRESS", true, 0 ); progressDialog->setAutoClose( true ); progressDialog->setAutoReset( true ); - connect( sane_device, SIGNAL(sigScanProgress(int)), - progressDialog, SLOT(setProgress(int))); + connect( sane_device, TQT_SIGNAL(sigScanProgress(int)), + progressDialog, TQT_SLOT(setProgress(int))); /* Connect the Progress Dialogs cancel-Button */ - connect( progressDialog, SIGNAL( cancelled() ), sane_device, - SLOT( slStopScanning() ) ); + connect( progressDialog, TQT_SIGNAL( cancelled() ), sane_device, + TQT_SLOT( slStopScanning() ) ); return( true ); } @@ -202,9 +202,9 @@ void ScanParams::initialise( KScanOption *so ) if( startupOptset ) { - QCString name = so->getName(); + TQCString name = so->getName(); if( ! name.isEmpty() ){ - QCString val = startupOptset->getValue( name ); + TQCString val = startupOptset->getValue( name ); kdDebug( 29000) << "Initialising <" << name << "> with value <" << val << ">" << endl; so->set( val ); sane_device->apply(so); @@ -218,19 +218,19 @@ void ScanParams::initialise( KScanOption *so ) } } -QScrollView *ScanParams::scannerParams( ) +TQScrollView *ScanParams::scannerParams( ) { KScanOption *so = 0; /* Its a real scanner */ - QScrollView *sv = new QScrollView( this ); - sv->setHScrollBarMode( QScrollView::AlwaysOff ); - sv->setResizePolicy( QScrollView::AutoOneFit ); - QVBox *pbox = new QVBox( sv->viewport()); + TQScrollView *sv = new TQScrollView( this ); + sv->setHScrollBarMode( TQScrollView::AlwaysOff ); + sv->setResizePolicy( TQScrollView::AutoOneFit ); + TQVBox *pbox = new TQVBox( sv->viewport()); pbox->setSpacing( KDialog::spacingHint() ); - sv->setFrameStyle( QFrame::NoFrame ); + sv->setFrameStyle( TQFrame::NoFrame ); - QHBox *hb = new QHBox(pbox); + TQHBox *hb = new TQHBox(pbox); /* Mode setting */ so = sane_device->getGuiElement( SANE_NAME_SCAN_MODE, hb, @@ -260,24 +260,24 @@ QScrollView *ScanParams::scannerParams( ) hb->setStretchFactor( cb, 5 ); initialise( so ); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } /* Add a button for Source-Selection */ if( sane_device->optionExists( SANE_NAME_SCAN_SOURCE )) { KScanOption source( SANE_NAME_SCAN_SOURCE ); - QStrList l = source.getList(); + TQStrList l = source.getList(); - QWidget *spacer = new QWidget(hb); + TQWidget *spacer = new TQWidget(hb); hb->setStretchFactor( spacer, 1 ); kdDebug(29000) << "Source list size: " << l.count() << endl; if( l.count() > 1 ) { - pb_source_sel = new QPushButton( i18n("Source..."), hb ); - connect( pb_source_sel, SIGNAL(clicked()), this, SLOT(slSourceSelect())); + pb_source_sel = new TQPushButton( i18n("Source..."), hb ); + connect( pb_source_sel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slSourceSelect())); initialise( &source ); hb->setStretchFactor( pb_source_sel, 3 ); @@ -302,8 +302,8 @@ QScrollView *ScanParams::scannerParams( ) if( so ) { initialise(so); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } } @@ -316,8 +316,8 @@ QScrollView *ScanParams::scannerParams( ) if( so ) { initialise(so); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } } @@ -330,8 +330,8 @@ QScrollView *ScanParams::scannerParams( ) if( so ) { initialise(so); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } } @@ -349,11 +349,11 @@ QScrollView *ScanParams::scannerParams( ) so->slRedrawWidget( so ); /* connect to slot that passes the resolution to the previewer */ - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT( slNewXResolution(KScanOption*))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT( slNewXResolution(KScanOption*))); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); xy_resolution_bind = sane_device->getGuiElement(SANE_NAME_RESOLUTION_BIND, pbox, @@ -364,8 +364,8 @@ QScrollView *ScanParams::scannerParams( ) initialise( xy_resolution_bind ); xy_resolution_bind->slRedrawWidget( xy_resolution_bind ); /* Connect to Gui-change-Slot */ - connect( xy_resolution_bind, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( xy_resolution_bind, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } /* Resolution Setting -> Y-Resolution Setting */ @@ -443,7 +443,7 @@ QScrollView *ScanParams::scannerParams( ) /* The gamma table can be used - add a button for editing */ - QHBox *hb1 = new QHBox(pbox); + TQHBox *hb1 = new TQHBox(pbox); if( sane_device->optionExists( SANE_NAME_CUSTOM_GAMMA ) ) { @@ -451,28 +451,28 @@ QScrollView *ScanParams::scannerParams( ) SANE_TITLE_CUSTOM_GAMMA, SANE_DESC_CUSTOM_GAMMA ); initialise( so ); - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slReloadAllGui( KScanOption* ))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slReloadAllGui( KScanOption* ))); } else { - (void) new QLabel( i18n("Custom Gamma Table"), hb1 ); + (void) new TQLabel( i18n("Custom Gamma Table"), hb1 ); } /* Connect a signal to refresh activity of the gamma tables */ - (void) new QWidget( hb1 ); /* dummy widget to eat space */ + (void) new TQWidget( hb1 ); /* dummy widget to eat space */ - pb_edit_gtable = new QPushButton( i18n("Edit..."), hb1 ); + pb_edit_gtable = new TQPushButton( i18n("Edit..."), hb1 ); Q_CHECK_PTR(pb_edit_gtable); - connect( pb_edit_gtable, SIGNAL( clicked () ), - this, SLOT( slEditCustGamma () ) ); + connect( pb_edit_gtable, TQT_SIGNAL( clicked () ), + this, TQT_SLOT( slEditCustGamma () ) ); setEditCustomGammaTableState(); /* This connection cares for enabling/disabling the edit-Button */ if(so ) - connect( so, SIGNAL(guiChange(KScanOption*)), - this, SLOT(slOptionNotify(KScanOption*))); + connect( so, TQT_SIGNAL(guiChange(KScanOption*)), + this, TQT_SLOT(slOptionNotify(KScanOption*))); /* my Epson Perfection backends offer a list of user defined gamma values */ @@ -496,12 +496,12 @@ QScrollView *ScanParams::scannerParams( ) SANE_TITLE_GRAY_PREVIEW, SANE_DESC_GRAY_PREVIEW ); initialise( so ); - cb_gray_preview = (QCheckBox*) so->widget(); - QToolTip::add( cb_gray_preview, i18n("Acquire a gray preview even in color mode (faster)") ); + cb_gray_preview = (TQCheckBox*) so->widget(); + TQToolTip::add( cb_gray_preview, i18n("Acquire a gray preview even in color mode (faster)") ); } - QWidget *spacer = new QWidget( pbox ); - spacer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); + TQWidget *spacer = new TQWidget( pbox ); + spacer->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); pbox->setMinimumWidth( pbox->sizeHint().width() ); sv->setMinimumWidth( pbox->minimumWidth() ); @@ -514,10 +514,10 @@ QScrollView *ScanParams::scannerParams( ) void ScanParams::createNoScannerMsg( void ) { /* Mode setting */ - QString cap; + TQString cap; cap = i18n( "<B>Problem: No Scanner was found</B><P>Your system does not provide a SANE <I>(Scanner Access Now Easy)</I> installation, which is required by the KDE scan support.<P>Please install and configure SANE correctly on your system.<P>Visit the SANE homepage under http://www.sane-project.org to find out more about SANE installation and configuration. " ); - (void) new QLabel( cap, this ); + (void) new TQLabel( cap, this ); } @@ -538,9 +538,9 @@ void ScanParams::slSourceSelect( void ) KScanOption so( SANE_NAME_SCAN_SOURCE ); ADF_BEHAVE adf = ADF_OFF; - const QCString& currSource = so.get(); + const TQCString& currSource = so.get(); kdDebug(29000) << "Current Source is <" << currSource << ">" << endl; - QStrList sources; + TQStrList sources; if( so.valid() ) { @@ -554,13 +554,13 @@ void ScanParams::slSourceSelect( void ) ScanSourceDialog d( this, sources, adf ); d.slSetSource( currSource ); - if( d.exec() == QDialog::Accepted ) + if( d.exec() == TQDialog::Accepted ) { - QString sel_source = d.getText(); + TQString sel_source = d.getText(); adf = d.getAdfBehave(); /* set the selected Document source, the behavior is stored in a membervar */ - so.set( QCString(sel_source.latin1()) ); // FIX in ScanSourceDialog, then here + so.set( TQCString(sel_source.latin1()) ); // FIX in ScanSourceDialog, then here sane_device->apply( &so ); kdDebug(29000) << "Dialog finished OK: " << sel_source << ", " << adf << endl; @@ -580,18 +580,18 @@ void ScanParams::slSourceSelect( void ) void ScanParams::slFileSelect( void ) { kdDebug(29000) << "File Selector" << endl; - QString filter; - QCString prefix = "\n*."; + TQString filter; + TQCString prefix = "\n*."; if( scan_mode == ID_QT_IMGIO ) { - QStrList filterList = QImage::inputFormats(); + TQStrList filterList = TQImage::inputFormats(); filter = i18n( "*|All Files (*)"); - for( QCString fi_item = filterList.first(); !fi_item.isEmpty(); + for( TQCString fi_item = filterList.first(); !fi_item.isEmpty(); fi_item = filterList.next() ) { - filter.append( QString::fromLatin1( prefix + fi_item.lower()) ); + filter.append( TQString::fromLatin1( prefix + fi_item.lower()) ); } } else @@ -604,11 +604,11 @@ void ScanParams::slFileSelect( void ) KFileDialog fd(last_virt_scan_path.path(), filter, this, "FileDialog",true); fd.setCaption( i18n("Select Input File") ); /* Read the filename and remind it */ - QString fileName; - if ( fd.exec() == QDialog::Accepted ) { + TQString fileName; + if ( fd.exec() == TQDialog::Accepted ) { fileName = fd.selectedFile(); - QFileInfo ppath( fileName ); - last_virt_scan_path = QDir(ppath.dirPath(true)); + TQFileInfo ppath( fileName ); + last_virt_scan_path = TQDir(ppath.dirPath(true)); } else { return; } @@ -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( QFile::encodeName( fileName ) ); + virt_filename->set( TQFile::encodeName( fileName ) ); } } @@ -634,12 +634,12 @@ void ScanParams::slVirtScanModeSelect( int id ) /* Check if the entered filename to delete */ if( virt_filename ) { - QString vf = virt_filename->get(); + TQString vf = virt_filename->get(); kdDebug(29000) << "Found File in Filename-Option: " << vf << endl; - QFileInfo fi( vf ); - if( fi.extension() != QString::fromLatin1("pnm") ) - virt_filename->set(QCString("")); + TQFileInfo fi( vf ); + if( fi.extension() != TQString::fromLatin1("pnm") ) + virt_filename->set(TQCString("")); } } else { scan_mode = ID_QT_IMGIO; @@ -659,20 +659,20 @@ void ScanParams::virtualScannerParams( void ) { #if 0 KScanOption *so = 0; - QWidget *w = 0; + TQWidget *w = 0; /* Selection if virt. Scanner or SANE Debug */ - bg_virt_scan_mode = new QButtonGroup( 2, Qt::Horizontal, + bg_virt_scan_mode = new TQButtonGroup( 2, Qt::Horizontal, this, "GroupBoxVirtScanner" ); - connect( bg_virt_scan_mode, SIGNAL(clicked(int)), - this, SLOT( slVirtScanModeSelect(int))); + connect( bg_virt_scan_mode, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT( slVirtScanModeSelect(int))); - QRadioButton *rb1 = new QRadioButton( i18n("SANE debug (pnm only)"), + TQRadioButton *rb1 = new TQRadioButton( i18n("SANE debug (pnm only)"), bg_virt_scan_mode, "VirtScanSANEDebug" ); - QRadioButton *rb2 = new QRadioButton( i18n("virt. Scan (all Qt modes)"), + TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all Qt modes)"), bg_virt_scan_mode, "VirtScanQtModes" ); rb1->setChecked( true ); @@ -692,20 +692,20 @@ void ScanParams::virtualScannerParams( void ) SANE_DESC_FILE ); if( virt_filename ) { - QHBoxLayout *hb = new QHBoxLayout(); + TQHBoxLayout *hb = new TQHBoxLayout(); top->addLayout( hb ); w = virt_filename->widget(); w->setMinimumHeight( (w->sizeHint()).height()); - connect( w, SIGNAL(returnPressed()), this, - SLOT( slCheckGlob())); + connect( w, TQT_SIGNAL(returnPressed()), this, + TQT_SLOT( slCheckGlob())); hb->addWidget( w, 12 ); - QPushButton *pb_file_sel = new QPushButton( this ); + TQPushButton *pb_file_sel = new TQPushButton( this ); pb_file_sel->setPixmap(miniFloppyPixmap); //hb->addStretch( 1 ); hb->addWidget( pb_file_sel, 1 ); - connect( pb_file_sel, SIGNAL(clicked()), this, SLOT(slFileSelect())); + connect( pb_file_sel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slFileSelect())); } @@ -764,7 +764,7 @@ void ScanParams::slStartScan( void ) KScanStat stat = KSCAN_OK; kdDebug(29000) << "Called start-scan-Slot!" << endl; - QString q; + TQString q; if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_QT_IMGIO ) { @@ -772,7 +772,7 @@ void ScanParams::slStartScan( void ) q = virt_filename->get(); if( q.isEmpty() ) { - QMessageBox::information( this, i18n("KSANE"), + TQMessageBox::information( this, i18n("KSANE"), i18n("The filename for virtual scanning is not set.\n" "Please set the filename first.") ); stat = KSCAN_ERR_PARAM; @@ -863,12 +863,12 @@ void ScanParams::slEditCustGamma( void ) kdDebug(29000) << "Old gamma table: " << old_gt.getGamma() << ", " << old_gt.getBrightness() << ", " << old_gt.getContrast() << endl; GammaDialog gdiag( this ); - connect( &gdiag, SIGNAL( gammaToApply(KGammaTable*) ), - this, SLOT( slApplyGamma(KGammaTable*) ) ); + connect( &gdiag, TQT_SIGNAL( gammaToApply(KGammaTable*) ), + this, TQT_SLOT( slApplyGamma(KGammaTable*) ) ); gdiag.setGt( old_gt ); - if( gdiag.exec() == QDialog::Accepted ) + if( gdiag.exec() == TQDialog::Accepted ) { slApplyGamma( gdiag.getGt() ); kdDebug(29000) << "Fine, applied new Gamma Table !" << endl; @@ -1013,10 +1013,10 @@ void ScanParams::slAcquirePreview( void ) } /* Custom Scan size setting. - * The custom scan size is given in the QRect parameter. It must contain values + * The custom scan size is given in the TQRect parameter. It must contain values * from 0..1000 which are interpreted as tenth of percent of the overall dimension. */ -void ScanParams::slCustomScanSize( QRect sel) +void ScanParams::slCustomScanSize( TQRect sel) { kdDebug(29000) << "Custom-Size: " << sel.x() << ", " << sel.y() << " - " << sel.width() << "x" << sel.height() << endl; @@ -1069,7 +1069,7 @@ void ScanParams::slCustomScanSize( QRect sel) void ScanParams::slMaximalScanSize( void ) { kdDebug(29000) << "Setting to default" << endl; - slCustomScanSize(QRect( 0,0,1000,1000)); + slCustomScanSize(TQRect( 0,0,1000,1000)); } diff --git a/libkscan/scanparams.h b/libkscan/scanparams.h index c80e1ce6..7508cdb9 100644 --- a/libkscan/scanparams.h +++ b/libkscan/scanparams.h @@ -23,11 +23,11 @@ #include "kscandevice.h" #include "scansourcedialog.h" -#include <qvbox.h> -#include <qhbox.h> +#include <tqvbox.h> +#include <tqhbox.h> -#include <qdir.h> -#include <qpixmap.h> +#include <tqdir.h> +#include <tqpixmap.h> /** *@author Klaas Freitag @@ -35,12 +35,12 @@ class GammaDialog; class KScanOptSet; -class QScrollView; +class TQScrollView; class KLed; -class QProgressDialog; -class QPushButton; -class QCheckBox; -class QButtonGroup; +class TQProgressDialog; +class TQPushButton; +class TQCheckBox; +class TQButtonGroup; typedef enum { ID_SANE_DEBUG, ID_QT_IMGIO, ID_SCAN } ScanMode; @@ -48,10 +48,10 @@ class ScanParams : public QVBox { Q_OBJECT public: - ScanParams( QWidget *parent, const char *name = 0); + ScanParams( TQWidget *parent, const char *name = 0); ~ScanParams(); #if 0 - QSize sizeHint( ); + TQSize sizeHint( ); #endif bool connectDevice( KScanDevice* ); @@ -64,7 +64,7 @@ public slots: * between 0 and 1000, which are interpreted as tenth of percent of the * whole image dimensions. **/ -void slCustomScanSize( QRect ); +void slCustomScanSize( TQRect ); /** * sets the scan area to the default, which is the whole area. @@ -147,7 +147,7 @@ void slSourceSelect( void ); private: - QScrollView* scannerParams( ); + TQScrollView* scannerParams( ); void virtualScannerParams( void ); void createNoScannerMsg( void ); void initialise( KScanOption* ); @@ -157,21 +157,21 @@ private: KScanDevice *sane_device; KScanOption *virt_filename; - QCheckBox *cb_gray_preview; - QPushButton *pb_edit_gtable; - QPushButton *pb_source_sel; + TQCheckBox *cb_gray_preview; + TQPushButton *pb_edit_gtable; + TQPushButton *pb_source_sel; ADF_BEHAVE adf; - QButtonGroup *bg_virt_scan_mode; + TQButtonGroup *bg_virt_scan_mode; ScanMode scan_mode; - QDir last_virt_scan_path; + TQDir last_virt_scan_path; KScanOption *xy_resolution_bind; KScanOptSet *startupOptset; - QProgressDialog *progressDialog; + TQProgressDialog *progressDialog; - QPixmap pixLineArt, pixGray, pixColor, pixHalftone, pixMiniFloppy; + TQPixmap pixLineArt, pixGray, pixColor, pixHalftone, pixMiniFloppy; KLed *m_led; bool m_firstGTEdit; diff --git a/libkscan/scansourcedialog.cpp b/libkscan/scansourcedialog.cpp index 01d71dc1..fcb3fc25 100644 --- a/libkscan/scansourcedialog.cpp +++ b/libkscan/scansourcedialog.cpp @@ -23,18 +23,18 @@ #include <klocale.h> #include <kdebug.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qradiobutton.h> -#include <qslider.h> -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqradiobutton.h> +#include <tqslider.h> +#include <tqlineedit.h> +#include <tqcombobox.h> -#include <qvbuttongroup.h> -#include <qbuttongroup.h> +#include <tqvbuttongroup.h> +#include <tqbuttongroup.h> extern "C"{ @@ -45,21 +45,21 @@ extern "C"{ #endif -ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BEHAVE adfBehave ) +ScanSourceDialog::ScanSourceDialog( TQWidget *parent, const TQStrList list, ADF_BEHAVE adfBehave ) : KDialogBase( parent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"), Ok|Cancel,Ok, true) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - (void) new QLabel( i18n("<B>Source selection</B><P>" + (void) new TQLabel( i18n("<B>Source selection</B><P>" "Note that you may see more sources than actually exist"), vbox ); /* Combo Box for sources */ - const QStrList xx = list; + const TQStrList xx = list; sources = new KScanCombo( vbox, i18n("Select the Scanner document source:"), xx); - connect( sources, SIGNAL( activated(int)), this, SLOT( slChangeSource(int))); + connect( sources, TQT_SIGNAL( activated(int)), this, TQT_SLOT( slChangeSource(int))); /* Button Group for ADF-Behaviour */ @@ -68,16 +68,16 @@ ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BE if( sourceAdfEntry() > -1 ) { - bgroup = new QVButtonGroup( i18n("Advanced ADF-Options"), vbox, "ADF_BGROUP" ); + bgroup = new TQVButtonGroup( i18n("Advanced ADF-Options"), vbox, "ADF_BGROUP" ); - connect( bgroup, SIGNAL(clicked(int)), this, SLOT( slNotifyADF(int))); + connect( bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT( slNotifyADF(int))); /* Two buttons inside */ - QRadioButton *rbADFTillEnd = new QRadioButton( i18n("Scan until ADF reports out of paper"), + TQRadioButton *rbADFTillEnd = new TQRadioButton( i18n("Scan until ADF reports out of paper"), bgroup ); bgroup->insert( rbADFTillEnd, ADF_SCAN_ALONG ); - QRadioButton *rbADFOnce = new QRadioButton( i18n("Scan only one sheet of ADF per click"), + TQRadioButton *rbADFOnce = new TQRadioButton( i18n("Scan only one sheet of ADF per click"), bgroup ); bgroup->insert( rbADFOnce, ADF_SCAN_ONCE ); @@ -104,7 +104,7 @@ ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BE } } -QString ScanSourceDialog::getText( void ) const +TQString ScanSourceDialog::getText( void ) const { return( sources->currentText() ); } @@ -115,7 +115,7 @@ void ScanSourceDialog::slNotifyADF( int ) /* this seems to be broken, adf_text is a visible string? * needs rework if SANE 2 comes up which supports i18n */ #if 0 - QString adf_text = getText(); + TQString adf_text = getText(); adf = ADF_OFF; @@ -161,7 +161,7 @@ int ScanSourceDialog::sourceAdfEntry( void ) const for( int i = 0; i < cou; i++ ) { - QString q = sources->text( i ); + TQString q = sources->text( i ); #if 0 if( q == "ADF" || q == SANE_NAME_DOCUMENT_FEEDER ) @@ -174,7 +174,7 @@ int ScanSourceDialog::sourceAdfEntry( void ) const -void ScanSourceDialog::slSetSource( const QString source ) +void ScanSourceDialog::slSetSource( const TQString source ) { if( !sources ) return; kdDebug(29000) << "Setting <" << source << "> as source" << endl; @@ -189,7 +189,7 @@ void ScanSourceDialog::slSetSource( const QString source ) if( sources->text( i ) == source ) { sources->setCurrentItem( i ); - if( source == QString::number(sourceAdfEntry()) ) + if( source == TQString::number(sourceAdfEntry()) ) { if( bgroup ) bgroup->setEnabled( true ); diff --git a/libkscan/scansourcedialog.h b/libkscan/scansourcedialog.h index 3379843f..61ae4a6e 100644 --- a/libkscan/scansourcedialog.h +++ b/libkscan/scansourcedialog.h @@ -19,10 +19,10 @@ #ifndef SCANSOURCEDIALOG_H #define SCANSOURCEDIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> -#include <qstrlist.h> -#include <qstring.h> +#include <tqstrlist.h> +#include <tqstring.h> /** *@author Klaas Freitag @@ -31,18 +31,18 @@ typedef enum { ADF_OFF, ADF_SCAN_ALONG, ADF_SCAN_ONCE } ADF_BEHAVE; class KScanCombo; -class QRadioButton; -class QButtonGroup; +class TQRadioButton; +class TQButtonGroup; class ScanSourceDialog : public KDialogBase { Q_OBJECT public: - ScanSourceDialog( QWidget *parent, const QStrList, ADF_BEHAVE ); + ScanSourceDialog( TQWidget *parent, const TQStrList, ADF_BEHAVE ); ~ScanSourceDialog(); - // void fillWithSources( QStrList *list ); - QString getText( void ) const; + // void fillWithSources( TQStrList *list ); + TQString getText( void ) const; ADF_BEHAVE getAdfBehave( void ) const { return( adf ); } @@ -52,13 +52,13 @@ public slots: void slNotifyADF( int ); void slChangeSource( int ); int sourceAdfEntry( void ) const; - void slSetSource( const QString source ); + void slSetSource( const TQString source ); private: KScanCombo *sources; - QButtonGroup *bgroup; - QRadioButton *rb0, *rb1; + TQButtonGroup *bgroup; + TQRadioButton *rb0, *rb1; ADF_BEHAVE adf; bool adf_enabled; diff --git a/libkscan/sizeindicator.cpp b/libkscan/sizeindicator.cpp index 4ad1986d..bd259bd3 100644 --- a/libkscan/sizeindicator.cpp +++ b/libkscan/sizeindicator.cpp @@ -19,22 +19,22 @@ #include "sizeindicator.h" -#include <qpalette.h> -#include <qimage.h> +#include <tqpalette.h> +#include <tqimage.h> #include <kimageeffect.h> #include <klocale.h> #include <kdebug.h> -#include <qpainter.h> +#include <tqpainter.h> -SizeIndicator::SizeIndicator( QWidget *parent, long thres, long crit ) - :QLabel( parent ) +SizeIndicator::SizeIndicator( TQWidget *parent, long thres, long crit ) + :TQLabel( parent ) { sizeInByte = -1; - setFrameStyle( QFrame::Box | QFrame::Sunken ); - setMinimumWidth( fontMetrics().width( QString::fromLatin1("MMM.MM MB") )); + setFrameStyle( TQFrame::Box | TQFrame::Sunken ); + setMinimumWidth( fontMetrics().width( TQString::fromLatin1("MMM.MM MB") )); setCritical( crit ); threshold = thres; @@ -64,9 +64,9 @@ void SizeIndicator::setSizeInByte( long newSize ) sizeInByte = newSize; kdDebug(29000) << "New size in byte: " << newSize << endl ; - QString t; + TQString t; - QString unit = i18n( "%1 kB" ); + TQString unit = i18n( "%1 kB" ); double sizer = double(sizeInByte)/1024.0; // produces kiloBytes int precision = 1; int fwidth = 3; @@ -86,11 +86,11 @@ void SizeIndicator::setSizeInByte( long newSize ) -void SizeIndicator::drawContents( QPainter *p ) +void SizeIndicator::drawContents( TQPainter *p ) { - QSize s = size(); + TQSize s = size(); - QColor warnColor; + TQColor warnColor; if( sizeInByte >= threshold ) { @@ -104,7 +104,7 @@ void SizeIndicator::drawContents( QPainter *p ) warnColor, KImageEffect::CrossDiagonalGradient, 200,200 )); } /* Displaying the text */ - QString t = text(); + TQString t = text(); p->drawText( 0, 0, s.width(), s.height(), AlignHCenter | AlignVCenter, t); diff --git a/libkscan/sizeindicator.h b/libkscan/sizeindicator.h index 213fe931..d49c60b5 100644 --- a/libkscan/sizeindicator.h +++ b/libkscan/sizeindicator.h @@ -23,8 +23,8 @@ #define DEFAULT_CRITICAL (3*1024*1024) #define DEFAULT_THRESHOLD (1*1024*1024) -class QPainter; -#include <qlabel.h> +class TQPainter; +#include <tqlabel.h> /** * @short small size indication widget for file sizes @@ -49,7 +49,7 @@ public: * @param crit: Critical value, not yet used. */ - SizeIndicator( QWidget *parent, long thres = DEFAULT_THRESHOLD, + SizeIndicator( TQWidget *parent, long thres = DEFAULT_THRESHOLD, long crit = DEFAULT_CRITICAL ); /** * destructor does not really do much yet. @@ -82,7 +82,7 @@ protected: /** * reimplemented to display the color */ - virtual void drawContents( QPainter* ); + virtual void drawContents( TQPainter* ); private: |