diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:31:39 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:31:39 -0600 |
commit | 45f529de247fc4b3662f6b474abe03fe904306ec (patch) | |
tree | d4b70147f7b0aeda4c1cb484553dc8ae048eb7ec /libkscan | |
parent | ec1fddcd0d6663ad273af85357f04abbc5689468 (diff) | |
download | tdegraphics-45f529de247fc4b3662f6b474abe03fe904306ec.tar.gz tdegraphics-45f529de247fc4b3662f6b474abe03fe904306ec.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'libkscan')
-rw-r--r-- | libkscan/devselector.cpp | 10 | ||||
-rw-r--r-- | libkscan/dispgamma.cpp | 10 | ||||
-rw-r--r-- | libkscan/dispgamma.h | 2 | ||||
-rw-r--r-- | libkscan/img_canvas.cpp | 6 | ||||
-rw-r--r-- | libkscan/img_canvas.h | 2 | ||||
-rw-r--r-- | libkscan/kscandevice.cpp | 28 | ||||
-rw-r--r-- | libkscan/kscandevice.h | 2 | ||||
-rw-r--r-- | libkscan/scandialog.cpp | 16 | ||||
-rw-r--r-- | libkscan/scanparams.cpp | 12 | ||||
-rw-r--r-- | libkscan/scanparams.h | 2 | ||||
-rw-r--r-- | libkscan/sizeindicator.cpp | 4 |
11 files changed, 47 insertions, 47 deletions
diff --git a/libkscan/devselector.cpp b/libkscan/devselector.cpp index 97b06e54..fbf33ad3 100644 --- a/libkscan/devselector.cpp +++ b/libkscan/devselector.cpp @@ -70,7 +70,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, page, "CBOX_SKIP_ON_START" ); KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); cbSkipDialog->setChecked( skipDialog ); @@ -81,7 +81,7 @@ DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList, TQCString DeviceSelector::getDeviceFromConfig( void ) const { KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); TQCString result; @@ -126,7 +126,7 @@ TQCString DeviceSelector::getSelectedDevice( void ) const /* Store scanner selection settings */ KConfig *c = KGlobal::config(); - c->setGroup(TQString::tqfromLatin1(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 ); @@ -141,7 +141,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources, { bool default_ok = false; KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit(); /* Selector-Stuff*/ @@ -152,7 +152,7 @@ void DeviceSelector::setScanSources( const TQStrList& sources, TQStringList::ConstIterator it2 = hrSources.begin(); for ( ; it.current(); ++it, ++it2 ) { - TQString text = TQString::tqfromLatin1("&%1. %2\n%3").tqarg(1+nr).tqarg( TQString::fromLocal8Bit(*it) ).tqarg( *it2 ); + TQString text = TQString::fromLatin1("&%1. %2\n%3").tqarg(1+nr).tqarg( TQString::fromLocal8Bit(*it) ).tqarg( *it2 ); TQRadioButton *rb = new TQRadioButton( text, selectBox ); selectBox->insert( rb ); diff --git a/libkscan/dispgamma.cpp b/libkscan/dispgamma.cpp index bb10e8b5..d5d65d38 100644 --- a/libkscan/dispgamma.cpp +++ b/libkscan/dispgamma.cpp @@ -49,11 +49,11 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) p.setClipRect( ev->rect()); - p.setPen( tqcolorGroup().highlight() ); - p.setBrush( tqcolorGroup().base() ); + p.setPen( colorGroup().highlight() ); + p.setBrush( colorGroup().base() ); // Backgrond p.drawRect( 0,0, w, 256 ); - p.setPen( TQPen(tqcolorGroup().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 ); @@ -63,7 +63,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) p.drawLine( l*51, 2, l*51, 255 ); // draw gamma-Line - p.setPen( tqcolorGroup().highlight() ); + p.setPen( colorGroup().highlight() ); p.moveTo( 1, vals->at(1) ); for( int i = 2; i < w-1; i++ ) { @@ -73,7 +73,7 @@ void DispGamma::paintEvent( TQPaintEvent *ev ) } -TQSize DispGamma::tqsizeHint( void ) +TQSize DispGamma::sizeHint( void ) { return TQSize( 256 + 2*margin,256 + 2 * margin ); } diff --git a/libkscan/dispgamma.h b/libkscan/dispgamma.h index 4b8fff45..5d6bd790 100644 --- a/libkscan/dispgamma.h +++ b/libkscan/dispgamma.h @@ -40,7 +40,7 @@ public: DispGamma( TQWidget *parent ); ~DispGamma(); - TQSize tqsizeHint( void ); + TQSize sizeHint( void ); TQSizePolicy sizePolicy( void ); void setValueRef( TQMemArray<SANE_Word> *newVals ) diff --git a/libkscan/img_canvas.cpp b/libkscan/img_canvas.cpp index b510f55d..e58182dd 100644 --- a/libkscan/img_canvas.cpp +++ b/libkscan/img_canvas.cpp @@ -231,7 +231,7 @@ void ImageCanvas::newImage( TQImage *new_image ) kdDebug(29000) << "tqrepaint ok" << endl; } -TQSize ImageCanvas::tqsizeHint() const +TQSize ImageCanvas::sizeHint() const { return( TQSize( 2, 2 )); } @@ -379,7 +379,7 @@ void ImageCanvas::drawContents( TQPainter * p, int clipx, int clipy, int clipw, // p->scale( used_xscaler, used_yscaler ); // p->scale( used_xscaler, used_yscaler ); if ( x2 >= x1 && y2 >= y1 ) { - p->tqdrawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph); + p->drawPixmap( x1, y1, *pmScaled, x1, y1 ); //, clipw, cliph); // p->setBrush( red ); // p->drawRect( x1, y1, clipw, cliph ); } @@ -675,7 +675,7 @@ void ImageCanvas::update_scaled_pixmap( void ) if( scaleKind() == DYNAMIC ) kdDebug(28000) << "Scaling DYNAMIC" << endl; TQSize noSBSize( visibleWidth(), visibleHeight()); - const int sbWidth = kapp->tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent ); + const int sbWidth = kapp->tqstyle().pixelMetric( TQStyle::PM_ScrollBarExtent ); // if( verticalScrollBar()->visible() ) noSBSize.width()+=sbWidth; // if( horizontalScrollBar()->visible() ) noSBSize.height()+=sbWidth; diff --git a/libkscan/img_canvas.h b/libkscan/img_canvas.h index eac68e75..4179750b 100644 --- a/libkscan/img_canvas.h +++ b/libkscan/img_canvas.h @@ -123,7 +123,7 @@ public slots: maintain_aspect = aspect_in_mind; tqrepaint(); } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; void newImage( TQImage* ); void newImageHoldZoom( TQImage* ); void deleteView( TQImage *); diff --git a/libkscan/kscandevice.cpp b/libkscan/kscandevice.cpp index a00abd4b..c42d9bf7 100644 --- a/libkscan/kscandevice.cpp +++ b/libkscan/kscandevice.cpp @@ -175,7 +175,7 @@ KScanDevice::KScanDevice( TQObject *parent ) gui_elements.setAutoDelete( true ); scanner_initialised = false; /* stays false until openDevice. */ - scantqStatus = SSTAT_SILENT; + scanStatus = SSTAT_SILENT; data = 0; /* temporary image data buffer while scanning */ sn = 0; /* socket notifier for async scanning */ @@ -282,7 +282,7 @@ void KScanDevice::slCloseDevice( ) scanner_name = UNDEF_SCANNERNAME; if( scanner_handle ) { - if( scantqStatus != SSTAT_SILENT ) + if( scanStatus != SSTAT_SILENT ) { kdDebug(29000) << "Scanner is still active, calling cancel !" << endl; sane_cancel( scanner_handle ); @@ -659,11 +659,11 @@ void KScanDevice::slReloadAll( ) void KScanDevice::slStopScanning( void ) { kdDebug(29000) << "Attempt to stop scanning" << endl; - if( scantqStatus == SSTAT_IN_PROGRESS ) + if( scanStatus == SSTAT_IN_PROGRESS ) { emit( sigScanFinished( KSCAN_CANCELLED )); } - scantqStatus = SSTAT_STOP_NOW; + scanStatus = SSTAT_STOP_NOW; } @@ -673,7 +673,7 @@ const TQString KScanDevice::previewFile() if( !dir.endsWith("/") ) dir += "/"; - TQString fname = dir + TQString::tqfromLatin1(".previews/"); + TQString fname = dir + TQString::fromLatin1(".previews/"); TQString sname( getScannerName(shortScannerName()) ); sname.replace( '/', "_"); @@ -1090,7 +1090,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) if( stat == KSCAN_OK ) { overall_bytes = 0; - scantqStatus = SSTAT_IN_PROGRESS; + scanStatus = SSTAT_IN_PROGRESS; pixel_x = 0; pixel_y = 0; overall_bytes = 0; @@ -1115,7 +1115,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) do { doProcessABlock(); - if( scantqStatus != SSTAT_SILENT ) + if( scanStatus != SSTAT_SILENT ) { sane_stat = sane_get_parameters( scanner_handle, &sane_scan_param ); kdDebug(29000) << "--ProcessABlock-Loop" << endl; @@ -1126,7 +1126,7 @@ KScanStat KScanDevice::acquire_data( bool isPreview ) kdDebug(29000) << "pixels_per_line : " << sane_scan_param.pixels_per_line << endl; kdDebug(29000) << "bytes_per_line : " << sane_scan_param.bytes_per_line << endl; } - } while ( scantqStatus != SSTAT_SILENT ); + } while ( scanStatus != SSTAT_SILENT ); } } @@ -1410,9 +1410,9 @@ void KScanDevice::doProcessABlock( void ) } } - if( goOn && scantqStatus == SSTAT_STOP_NOW ) + if( goOn && scanStatus == SSTAT_STOP_NOW ) { - /* scantqStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */ + /* scanStatus is set to SSTAT_STOP_NOW due to hitting slStopScanning */ /* Mostly that one is fired by the STOP-Button in the progress dialog. */ /* This is also hit after the normal finish of the scan. Most probably, @@ -1421,7 +1421,7 @@ void KScanDevice::doProcessABlock( void ) */ kdDebug(29000) << "Stopping the scan progress !" << endl; goOn = false; - scantqStatus = SSTAT_SILENT; + scanStatus = SSTAT_SILENT; emit( sigScanFinished( KSCAN_OK )); } @@ -1435,13 +1435,13 @@ void KScanDevice::doProcessABlock( void ) { /** Everythings okay, the picture is ready **/ kdDebug(29000) << "last frame reached - scan successful" << endl; - scantqStatus = SSTAT_SILENT; + scanStatus = SSTAT_SILENT; emit( sigScanFinished( KSCAN_OK )); } else { /** EOF und nicht letzter Frame -> Parameter neu belegen und neu starten **/ - scantqStatus = SSTAT_NEXT_FRAME; + scanStatus = SSTAT_NEXT_FRAME; kdDebug(29000) << "EOF, but another frame to scan" << endl; } @@ -1449,7 +1449,7 @@ void KScanDevice::doProcessABlock( void ) if( sane_stat == SANE_STATUS_CANCELLED ) { - scantqStatus = SSTAT_STOP_NOW; + scanStatus = SSTAT_STOP_NOW; kdDebug(29000) << "Scan was cancelled" << endl; // stat = KSCAN_CANCELLED; diff --git a/libkscan/kscandevice.h b/libkscan/kscandevice.h index 894fa388..e5dd5100 100644 --- a/libkscan/kscandevice.h +++ b/libkscan/kscandevice.h @@ -438,7 +438,7 @@ private: TQSocketNotifier *sn; - SCANSTATUS scantqStatus; + SCANSTATUS scanStatus; /* Data for the scan process */ /* This could/should go to a small help object */ diff --git a/libkscan/scandialog.cpp b/libkscan/scandialog.cpp index 8d762272..c60e7963 100644 --- a/libkscan/scandialog.cpp +++ b/libkscan/scandialog.cpp @@ -55,7 +55,7 @@ ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name ) : KScanDialogFactory( parent, name ) { setName( "ScanDialogFactory" ); - KGlobal::locale()->insertCatalogue( TQString::tqfromLatin1("libkscan") ); + KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") ); } KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent, @@ -113,7 +113,7 @@ void ScanDialog::createOptionsTab( void ) TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" ); TQLabel *label = new TQLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ), gb ); - label->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); + label->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); /* Checkbox for asking for scanner on startup */ cb_askOnStart = new TQCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb ); @@ -130,7 +130,7 @@ void ScanDialog::createOptionsTab( void ) /* Read settings for startup behavior */ KConfig *gcfg = KGlobal::config(); - gcfg->setGroup(TQString::tqfromLatin1(GROUP_STARTUP)); + gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP)); bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false ); bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false ); @@ -144,7 +144,7 @@ void ScanDialog::createOptionsTab( void ) TQWidget *spaceEater = new TQWidget( page ); Q_CHECK_PTR( spaceEater ); - spaceEater->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::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(TQString::tqfromLatin1(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(TQString::tqfromLatin1(GROUP_STARTUP)); + c->setGroup(TQString::fromLatin1(GROUP_STARTUP)); c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true ); } @@ -314,7 +314,7 @@ bool ScanDialog::setup() kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); + TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); kdDebug(29000) << "Read Splitter-Sizes " << key << endl; splitter->setSizes( kfg->readIntListEntry( key )); } @@ -336,7 +336,7 @@ void ScanDialog::slotClose() kfg->setGroup( GROUP_STARTUP ); /* Since this is a vertical splitter, only the width is important */ - TQString key = TQString::tqfromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); + TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).tqarg( r.width()); kfg->writeEntry( key, splitter->sizes(), true, true); } } diff --git a/libkscan/scanparams.cpp b/libkscan/scanparams.cpp index ec9e77fe..422eed4a 100644 --- a/libkscan/scanparams.cpp +++ b/libkscan/scanparams.cpp @@ -120,7 +120,7 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice ) (void ) new TQLabel( cap, hb ); m_led = new KLed( hb ); m_led->setState( KLed::Off ); - m_led->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); + m_led->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); (void) new KSeparator( KSeparator::HLine, this); @@ -501,9 +501,9 @@ TQScrollView *ScanParams::scannerParams( ) } TQWidget *spacer = new TQWidget( pbox ); - spacer->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); + spacer->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); - pbox->setMinimumWidth( pbox->tqsizeHint().width() ); + pbox->setMinimumWidth( pbox->sizeHint().width() ); sv->setMinimumWidth( pbox->minimumWidth() ); sv->addChild( pbox ); @@ -591,7 +591,7 @@ void ScanParams::slFileSelect( void ) fi_item = filterList.next() ) { - filter.append( TQString::tqfromLatin1( prefix + fi_item.lower()) ); + filter.append( TQString::fromLatin1( prefix + fi_item.lower()) ); } } else @@ -638,7 +638,7 @@ void ScanParams::slVirtScanModeSelect( int id ) kdDebug(29000) << "Found File in Filename-Option: " << vf << endl; TQFileInfo fi( vf ); - if( fi.extension() != TQString::tqfromLatin1("pnm") ) + if( fi.extension() != TQString::fromLatin1("pnm") ) virt_filename->set(TQCString("")); } } else { @@ -695,7 +695,7 @@ void ScanParams::virtualScannerParams( void ) TQHBoxLayout *hb = new TQHBoxLayout(); top->addLayout( hb ); w = virt_filename->widget(); - w->setMinimumHeight( (w->tqsizeHint()).height()); + w->setMinimumHeight( (w->sizeHint()).height()); connect( w, TQT_SIGNAL(returnPressed()), this, TQT_SLOT( slCheckGlob())); diff --git a/libkscan/scanparams.h b/libkscan/scanparams.h index a9f29d0e..de69b0c9 100644 --- a/libkscan/scanparams.h +++ b/libkscan/scanparams.h @@ -52,7 +52,7 @@ public: ScanParams( TQWidget *parent, const char *name = 0); ~ScanParams(); #if 0 - TQSize tqsizeHint( ); + TQSize sizeHint( ); #endif bool connectDevice( KScanDevice* ); diff --git a/libkscan/sizeindicator.cpp b/libkscan/sizeindicator.cpp index 582f2330..d11b1cff 100644 --- a/libkscan/sizeindicator.cpp +++ b/libkscan/sizeindicator.cpp @@ -34,7 +34,7 @@ SizeIndicator::SizeIndicator( TQWidget *parent, long thres, long crit ) { sizeInByte = -1; setFrameStyle( TQFrame::Box | TQFrame::Sunken ); - setMinimumWidth( fontMetrics().width( TQString::tqfromLatin1("MMM.MM MB") )); + setMinimumWidth( fontMetrics().width( TQString::fromLatin1("MMM.MM MB") )); setCritical( crit ); threshold = thres; @@ -100,7 +100,7 @@ void SizeIndicator::drawContents( TQPainter *p ) warnColor.setHsv( 0, c, c ); p->drawImage( 0,0, - KImageEffect::unbalancedGradient( s, tqcolorGroup().background(), + KImageEffect::unbalancedGradient( s, colorGroup().background(), warnColor, KImageEffect::CrossDiagonalGradient, 200,200 )); } /* Displaying the text */ |