Replace TQ_*Focus* and TQ_Scale* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/66/head
Michele Calgaro 9 months ago
parent 7b285cb0c7
commit 0e051a3c83
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -29,7 +29,7 @@ DisplayNumber::DisplayNumber(TQWidget *parent, int digits, \
setFrameStyle(TQFrame::Panel | TQFrame::Sunken); setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
setBackgroundMode(TQt::PaletteBase); setBackgroundMode(TQt::PaletteBase);
setAlignment(TQt::AlignCenter); setAlignment(TQt::AlignCenter);
setFocusPolicy(TQ_NoFocus); setFocusPolicy(TQWidget::NoFocus);
} }
DisplayNumber::~DisplayNumber(){ DisplayNumber::~DisplayNumber(){

@ -109,7 +109,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*,
// Setup main widget // Setup main widget
_mainWidget = new KGVMainWidget( parentWidget ); _mainWidget = new KGVMainWidget( parentWidget );
_mainWidget->setFocusPolicy( TQ_StrongFocus ); _mainWidget->setFocusPolicy( TQWidget::StrongFocus );
_mainWidget->installEventFilter( this ); _mainWidget->installEventFilter( this );
_mainWidget->setAcceptDrops( true ); _mainWidget->setAcceptDrops( true );
connect( _mainWidget, TQT_SIGNAL( spacePressed() ), connect( _mainWidget, TQT_SIGNAL( spacePressed() ),

@ -27,8 +27,8 @@ KGVPageView::KGVPageView( TQWidget* parent, const char* name )
{ {
_page = 0; _page = 0;
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
viewport()->setFocusPolicy( TQ_WheelFocus ); viewport()->setFocusPolicy( TQWidget::WheelFocus );
} }
void KGVPageView::setPage( TQWidget* page ) void KGVPageView::setPage( TQWidget* page )

@ -28,7 +28,7 @@
ViewControl::ViewControl( TQWidget *parent, const char *name ) ViewControl::ViewControl( TQWidget *parent, const char *name )
: TQDialog( parent, name ) : TQDialog( parent, name )
{ {
setFocusPolicy(TQ_StrongFocus); setFocusPolicy(TQWidget::StrongFocus);
TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 ); TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 );

@ -122,7 +122,7 @@ kpView::kpView (kpDocument *document,
setBackgroundMode (TQt::NoBackground); // no flicker setBackgroundMode (TQt::NoBackground); // no flicker
setFocusPolicy (TQ_WheelFocus); setFocusPolicy (TQWidget::WheelFocus);
setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down
setKeyCompression (true); setKeyCompression (true);
setInputMethodEnabled (true); // ensure using InputMethod setInputMethodEnabled (true); // ensure using InputMethod

@ -634,7 +634,7 @@ static void toolButtonSetLook (TQToolButton *button,
button->setUsesTextLabel (true); button->setUsesTextLabel (true);
button->setTextLabel (name, false/*no tooltip*/); button->setTextLabel (name, false/*no tooltip*/);
button->setAccel (TQAccel::shortcutKey (name)); button->setAccel (TQAccel::shortcutKey (name));
button->setFocusPolicy (TQ_StrongFocus); button->setFocusPolicy (TQWidget::StrongFocus);
button->setToggleButton (true); button->setToggleButton (true);
} }

@ -300,7 +300,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no )
float yScalefactor = xReso / yReso; float yScalefactor = xReso / yReso;
kdDebug(28000) << "Different resolution x/y, rescaling with factor " << yScalefactor << endl; kdDebug(28000) << "Different resolution x/y, rescaling with factor " << yScalefactor << endl;
/* rescale the image */ /* rescale the image */
*this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQ_ScaleFree ); *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQImage::ScaleFree );
} }
else else
{ {
@ -308,7 +308,7 @@ bool KookaImage::loadTiffDir( const TQString& filename, int no )
float scalefactor = yReso / xReso; float scalefactor = yReso / xReso;
kdDebug(28000) << "Different resolution x/y, rescaling x with factor " << scalefactor << endl; kdDebug(28000) << "Different resolution x/y, rescaling x with factor " << scalefactor << endl;
/* rescale the image */ /* rescale the image */
*this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQ_ScaleFree ); *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQImage::ScaleFree );
} }
} }

@ -112,7 +112,7 @@ bool KookaPrint::printImage( KookaImage *img )
kdDebug(28000) << "Scaling to printer size " << newWidth << " x " << newHeight << endl; kdDebug(28000) << "Scaling to printer size " << newWidth << " x " << newHeight << endl;
tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
TQSize sz = tmpImg.size(); // the current image size TQSize sz = tmpImg.size(); // the current image size
TQSize maxOnPage = maxPageSize(); // the maximum space on one side TQSize maxOnPage = maxPageSize(); // the maximum space on one side
@ -177,7 +177,7 @@ void KookaPrint::printFittingToPage(KookaImage *img)
newHeight = int( double( img->height() ) * hAspect ); newHeight = int( double( img->height() ) * hAspect );
} }
tmpImg = img->smoothScale(newWidth, newHeight, TQ_ScaleFree); tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
m_painter->drawImage( 0,0, tmpImg ); m_painter->drawImage( 0,0, tmpImg );

@ -207,7 +207,7 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document )
// widget setup: setup focus, accept drops and track mouse // widget setup: setup focus, accept drops and track mouse
viewport()->setFocusProxy( this ); viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( TQ_StrongFocus ); viewport()->setFocusPolicy( TQWidget::StrongFocus );
//viewport()->setPaletteBackgroundColor( TQt::white ); //viewport()->setPaletteBackgroundColor( TQt::white );
viewport()->setBackgroundMode( TQt::NoBackground ); viewport()->setBackgroundMode( TQt::NoBackground );
setResizePolicy( Manual ); setResizePolicy( Manual );

@ -24,7 +24,7 @@
PageViewMessage::PageViewMessage( TQWidget * parent ) PageViewMessage::PageViewMessage( TQWidget * parent )
: TQWidget( parent, "pageViewMessage" ), m_timer( 0 ) : TQWidget( parent, "pageViewMessage" ), m_timer( 0 )
{ {
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
setBackgroundMode( NoBackground ); setBackgroundMode( NoBackground );
setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background)); setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background));
// if the layout is LtR, we can safely place it in the right position // if the layout is LtR, we can safely place it in the right position

@ -76,7 +76,7 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document )
// widget setup: can be focused by tab and mouse click (not wheel) // widget setup: can be focused by tab and mouse click (not wheel)
viewport()->setFocusProxy( this ); viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( TQ_StrongFocus ); viewport()->setFocusPolicy( TQWidget::StrongFocus );
setResizePolicy( Manual ); setResizePolicy( Manual );
setAcceptDrops( true ); setAcceptDrops( true );
setDragAutoScroll( false ); setDragAutoScroll( false );

@ -880,7 +880,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setOpaqueResize(manager->splitterOpaqueResize());
panner->setKeepSize(manager->splitterKeepSize()); panner->setKeepSize(manager->splitterKeepSize());
panner->setFocusPolicy( TQ_NoFocus ); panner->setFocusPolicy( TQWidget::NoFocus );
target->applyToWidget( panner ); target->applyToWidget( panner );
applyToWidget( panner ); applyToWidget( panner );
target->formerDockPos = target->currentDockPos; target->formerDockPos = target->currentDockPos;

@ -292,7 +292,7 @@ PMDockButton_Private::PMDockButton_Private( TQWidget *parent, const char * name
:TQPushButton( parent, name ) :TQPushButton( parent, name )
{ {
moveMouse = false; moveMouse = false;
setFocusPolicy( TQ_NoFocus ); setFocusPolicy( TQWidget::NoFocus );
} }
PMDockButton_Private::~PMDockButton_Private() PMDockButton_Private::~PMDockButton_Private()
@ -361,7 +361,7 @@ void PMDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{ {
if (w) { if (w) {
TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget(); TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget();
if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) { if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus(); embeddedWdg->setFocus();
} }
} }

@ -143,7 +143,7 @@ PMGLView::PMGLView( PMPart* part, PMViewType t,
initializeGL( ); initializeGL( );
setMouseTracking( true ); setMouseTracking( true );
setFocusPolicy( TQ_WheelFocus ); setFocusPolicy( TQWidget::WheelFocus );
PMRenderManager* rm = PMRenderManager::theManager( ); PMRenderManager* rm = PMRenderManager::theManager( );
rm->viewCreated( ); rm->viewCreated( );

@ -75,8 +75,8 @@ PMTreeView::PMTreeView( PMPart* part, TQWidget* parent /*= 0*/,
viewport( )->setAcceptDrops( true ); viewport( )->setAcceptDrops( true );
viewport( )->setMouseTracking( true ); viewport( )->setMouseTracking( true );
viewport( )->setFocusPolicy( TQ_WheelFocus ); viewport( )->setFocusPolicy( TQWidget::WheelFocus );
setFocusPolicy( TQ_WheelFocus ); setFocusPolicy( TQWidget::WheelFocus );
setAcceptDrops( true ); setAcceptDrops( true );
connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) ); connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) );

@ -338,7 +338,7 @@ void KSnapshot::slotPrint()
neww = newh/h*w; neww = newh/h*w;
} }
img = img.smoothScale( int(neww), int(newh), TQ_ScaleMin ); img = img.smoothScale( int(neww), int(newh), TQImage::ScaleMin );
tqApp->processEvents(); tqApp->processEvents();
int x = (metrics.width()-img.width())/2; int x = (metrics.width()-img.width())/2;

@ -39,10 +39,10 @@ void KSnapshotWidget::setPreview( const TQPixmap &pm )
if ( r1 * previewWidth() < previewHeight() ) if ( r1 * previewWidth() < previewHeight() )
img = img.smoothScale( previewWidth(), img = img.smoothScale( previewWidth(),
int( previewWidth() * r1 ), int( previewWidth() * r1 ),
TQ_ScaleMin ); TQImage::ScaleMin );
else else
img = img.smoothScale( ( int ) ( ( ( double )previewHeight() ) / r1 ), img = img.smoothScale( ( int ) ( ( ( double )previewHeight() ) / r1 ),
previewHeight(), TQ_ScaleMin ); previewHeight(), TQImage::ScaleMin );
TQToolTip::remove( lblImage ); TQToolTip::remove( lblImage );
TQToolTip::add( lblImage, TQToolTip::add( lblImage,

@ -31,7 +31,7 @@ KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name)
: TQWidget(parent, name), m_part(part) : TQWidget(parent, name), m_part(part)
{ {
setMouseTracking(true); setMouseTracking(true);
setFocusPolicy(TQ_WheelFocus); setFocusPolicy(TQWidget::WheelFocus);
setBackgroundMode(NoBackground); setBackgroundMode(NoBackground);

@ -18,7 +18,7 @@ SVGTestWidget::SVGTestWidget(const KURL &url)
{ {
setBackgroundColor(TQt::white); setBackgroundColor(TQt::white);
setMouseTracking(true); setMouseTracking(true);
setFocusPolicy(TQ_WheelFocus); setFocusPolicy(TQWidget::WheelFocus);
m_doc = DocumentFactory::self()->requestDocument(TQT_TQOBJECT(this), TQT_SLOT(slotRenderingFinished())); m_doc = DocumentFactory::self()->requestDocument(TQT_TQOBJECT(this), TQT_SLOT(slotRenderingFinished()));
if(!m_doc) if(!m_doc)

@ -49,7 +49,7 @@ FileFinder::FileFinder( TQWidget *parent, const char *name )
comp->setReplaceEnv( true ); comp->setReplaceEnv( true );
setCompletionObject( comp, false ); setCompletionObject( comp, false );
setAutoDeleteCompletionObject( true ); setAutoDeleteCompletionObject( true );
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQWidget::ClickFocus );
TDEConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver cs( config, "GeneralConfiguration" ); TDEConfigGroupSaver cs( config, "GeneralConfiguration" );

@ -94,7 +94,7 @@ ImageWindow::~ImageWindow()
void ImageWindow::init() void ImageWindow::init()
{ {
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
KCursor::setAutoHideCursor( this, true, true ); KCursor::setAutoHideCursor( this, true, true );
KCursor::setHideCursorDelay( 1500 ); KCursor::setHideCursorDelay( 1500 );

@ -213,8 +213,8 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// tqDebug("-- smoothResize: %i x %i", newWidth, newHeight); // tqDebug("-- smoothResize: %i x %i", newWidth, newHeight);
TQImage *image = newTQImage(); TQImage *image = newTQImage();
// Note: TQ_ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small) // Note: TQImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small)
TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQ_ScaleFree); TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
delete image; delete image;

@ -935,7 +935,7 @@ KImageHolder * KImageCanvas::createNewClient()
client->setMouseTracking( true ); client->setMouseTracking( true );
client->installEventFilter( this ); client->installEventFilter( this );
setFocusProxy( client ); setFocusProxy( client );
client->setFocusPolicy( TQ_StrongFocus ); client->setFocusPolicy( TQWidget::StrongFocus );
client->setFocus(); client->setFocus();
addChild( client, 0, 0 ); addChild( client, 0, 0 );

@ -80,7 +80,7 @@ void KViewKonqExtension::print()
TQImage imagetoprint; TQImage imagetoprint;
if( printer.option( "app-kviewviewer-fitimage" ) == "1" ) if( printer.option( "app-kviewviewer-fitimage" ) == "1" )
imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), TQ_ScaleMin ); imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), TQImage::ScaleMin );
else else
imagetoprint = *m_pCanvas->image(); imagetoprint = *m_pCanvas->image();

@ -83,7 +83,7 @@ DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache
scrollGuide = -1; scrollGuide = -1;
setMouseTracking(true); setMouseTracking(true);
setFocusPolicy(TQ_ClickFocus); setFocusPolicy(TQWidget::ClickFocus);
connect(&clearStatusBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearStatusBar())); connect(&clearStatusBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearStatusBar()));
setBackgroundMode(TQt::NoBackground); setBackgroundMode(TQt::NoBackground);

@ -72,7 +72,7 @@ KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *p
watch->startScan(); watch->startScan();
mainWidget = new TQHBox(parentWidget, widgetName); mainWidget = new TQHBox(parentWidget, widgetName);
mainWidget->setFocusPolicy(TQ_StrongFocus); mainWidget->setFocusPolicy(TQWidget::StrongFocus);
setWidget(mainWidget); setWidget(mainWidget);
// Setup part manager // Setup part manager

@ -181,7 +181,7 @@ MarkListWidget::MarkListWidget(TQWidget* _parent, MarkList* _markList, const Pag
TQBoxLayout* bottomLayout = new TQHBoxLayout(layout); TQBoxLayout* bottomLayout = new TQHBoxLayout(layout);
checkBox = new TQCheckBox(TQString(), this ); checkBox = new TQCheckBox(TQString(), this );
checkBox->setFocusPolicy(TQ_NoFocus); checkBox->setFocusPolicy(TQWidget::NoFocus);
TQToolTip::add(checkBox, i18n("Select for printing")); TQToolTip::add(checkBox, i18n("Select for printing"));
bottomLayout->addWidget(checkBox, 0, TQt::AlignAuto); bottomLayout->addWidget(checkBox, 0, TQt::AlignAuto);
@ -277,8 +277,8 @@ MarkList::MarkList(TQWidget* parent, const char* name)
{ {
currentPage = PageNumber::invalidPage; currentPage = PageNumber::invalidPage;
widgetList.setAutoDelete(true); widgetList.setAutoDelete(true);
setFocusPolicy( TQ_StrongFocus ); setFocusPolicy( TQWidget::StrongFocus );
//viewport()->setFocusPolicy( TQ_WheelFocus ); //viewport()->setFocusPolicy( TQWidget::WheelFocus );
setResizePolicy(TQScrollView::Manual); setResizePolicy(TQScrollView::Manual);
setVScrollBarMode(TQScrollView::AlwaysOn); setVScrollBarMode(TQScrollView::AlwaysOn);

@ -36,7 +36,7 @@ PageView::PageView( TQWidget* parent, const char* name )
moveTool = true; moveTool = true;
widgetList = 0; widgetList = 0;
viewport()->setFocusPolicy(TQ_StrongFocus); viewport()->setFocusPolicy(TQWidget::StrongFocus);
setResizePolicy(TQScrollView::Manual); setResizePolicy(TQScrollView::Manual);

@ -49,7 +49,7 @@ KMultiPage::KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject
searchInProgress = false; searchInProgress = false;
TQVBox* verticalBox = new TQVBox(parentWidget); TQVBox* verticalBox = new TQVBox(parentWidget);
verticalBox->setFocusPolicy(TQ_StrongFocus); verticalBox->setFocusPolicy(TQWidget::StrongFocus);
setWidget(verticalBox); setWidget(verticalBox);
splitterWidget = new TQSplitter(verticalBox, widgetName); splitterWidget = new TQSplitter(verticalBox, widgetName);

Loading…
Cancel
Save