Commit 33d5922d authored by Pascal Létourneau's avatar Pascal Létourneau
Browse files

Less deprecated

Rename KonqFrameBase::widget() to asQWidget()
    to be not confused with QTabWidget::widget(int)

svn path=/trunk/KDE/kdebase/konqueror/; revision=583525
parent 15764fdc
......@@ -74,14 +74,14 @@ KonqFrameStatusBar::KonqFrameStatusBar( KonqFrame *_parent )
m_led = new QLabel( this );
m_led->setAlignment( Qt::AlignCenter );
m_led->setSizePolicy(QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ));
addWidget( m_led, 0, false ); // led (active view indicator)
addWidget( m_led, 0 ); // led (active view indicator)
m_led->hide();
m_pStatusLabel = new KSqueezedTextLabel( this );
m_pStatusLabel->setMinimumSize( 0, 0 );
m_pStatusLabel->setSizePolicy(QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed ));
m_pStatusLabel->installEventFilter(this);
addWidget( m_pStatusLabel, 1 /*stretch*/, false ); // status label
addWidget( m_pStatusLabel, 1 /*stretch*/ ); // status label
m_pLinkedViewCheckBox = new KonqCheckBox( this );
m_pLinkedViewCheckBox->setObjectName( "m_pLinkedViewCheckBox" );
......@@ -93,14 +93,14 @@ KonqFrameStatusBar::KonqFrameStatusBar( KonqFrame *_parent )
"This is especially useful with different types of views, such as a "
"directory tree with an icon view or detailed view, and possibly a "
"terminal emulator window." ) );
addWidget( m_pLinkedViewCheckBox, 0, true /*permanent->right align*/ );
addPermanentWidget( m_pLinkedViewCheckBox, 0 );
connect( m_pLinkedViewCheckBox, SIGNAL(toggled(bool)),
this, SIGNAL(linkedViewClicked(bool)) );
m_progressBar = new QProgressBar( this );
m_progressBar->setMaximumHeight(fontMetrics().height());
m_progressBar->hide();
addWidget( m_progressBar, 0, true /*permanent->right align*/ );
addPermanentWidget( m_progressBar, 0 );
fontChange(QFont());
installEventFilter( this );
......@@ -290,8 +290,8 @@ void KonqFrameBase::printFrameInfo(const QString& spaces)
//###################################################################
KonqFrame::KonqFrame( QWidget* parent, KonqFrameContainerBase *parentContainer, const char *name )
: QWidget (parent, name )
KonqFrame::KonqFrame( QWidget* parent, KonqFrameContainerBase *parentContainer )
: QWidget ( parent )
{
//kDebug(1202) << "KonqFrame::KonqFrame()" << endl;
......
......@@ -174,7 +174,7 @@ class KonqFrameBase
virtual void setTitle( const QString &title , QWidget* sender) = 0;
virtual void setTabIcon( const KUrl &url, QWidget* sender ) = 0;
virtual QWidget* widget() = 0;
virtual QWidget* asQWidget() = 0;
virtual void listViews( ChildViewList *viewList ) = 0;
virtual QByteArray frameType() = 0;
......@@ -206,8 +206,7 @@ class KonqFrame : public QWidget, public KonqFrameBase
Q_OBJECT
public:
KonqFrame( QWidget* parent, KonqFrameContainerBase *parentContainer = 0L,
const char *name = 0L );
KonqFrame( QWidget* parent, KonqFrameContainerBase *parentContainer = 0L );
virtual ~KonqFrame();
/**
......@@ -259,7 +258,7 @@ public:
const QPoint & p );
//virtual KonqFrameContainerBase* parentContainer();
virtual QWidget* widget() { return this; }
virtual QWidget* asQWidget() { return this; }
virtual QByteArray frameType() { return QByteArray("View"); }
QVBoxLayout *layout()const { return m_pLayout; }
......
......@@ -157,14 +157,14 @@ void KonqFrameContainer::swapChildren()
void KonqFrameContainer::setTitle( const QString &title , QWidget* sender)
{
//kDebug(1202) << "KonqFrameContainer::setTitle( " << title << " , " << sender << " )" << endl;
if (m_pParentContainer && activeChild() && (sender == activeChild()->widget()))
if (m_pParentContainer && activeChild() && (sender == activeChild()->asQWidget()))
m_pParentContainer->setTitle( title , this);
}
void KonqFrameContainer::setTabIcon( const KUrl &url, QWidget* sender )
{
//kDebug(1202) << "KonqFrameContainer::setTabIcon( " << url << " , " << sender << " )" << endl;
if (m_pParentContainer && activeChild() && (sender == activeChild()->widget()))
if (m_pParentContainer && activeChild() && (sender == activeChild()->asQWidget()))
m_pParentContainer->setTabIcon( url, this );
}
......
......@@ -95,7 +95,7 @@ public:
virtual void setTitle( const QString &title, QWidget* sender );
virtual void setTabIcon( const KUrl &url, QWidget* sender );
virtual QWidget* widget() { return this; }
virtual QWidget* asQWidget() { return this; }
virtual QByteArray frameType() { return QByteArray("Container"); }
/**
......
......@@ -198,7 +198,7 @@ ToggleViewGUIClient::ToggleViewGUIClient( KonqMainWindow *mainWindow )
// HACK
if ( (*cIt)->icon() != "unknown" )
action->setIconName( (*cIt)->icon() );
action->setIcon( KIcon((*cIt)->icon()) );
connect( action, SIGNAL( toggled( bool ) ),
this, SLOT( slotToggleView( bool ) ) );
......
......@@ -1266,7 +1266,7 @@ void KonqMainWindow::slotCreateNewWindow( const KUrl &url, const KParts::URLArgs
mainWindow->lower();
mainWindow->stackUnder( this );
if( this->isActiveWindow())
this->setActiveWindow();
this->activateWindow();
}
}
#else // Q_WS_X11
......@@ -1614,7 +1614,7 @@ void KonqMainWindow::slotViewModeToggle( bool toggle )
if (servicename.isEmpty())
servicename = service->name();
action->setText( servicename );
action->setIconName( service->icon() );
action->setIcon( KIcon( service->icon() ) );
// Bypassing KAction restriction - this action will not be found via KActionCollection when doing a name search
action->QAction::setObjectName( service->desktopEntryName() );
......@@ -2209,9 +2209,9 @@ void KonqMainWindow::slotPartActivated( KParts::Part *part )
if (servicename.isEmpty())
servicename = m_currentView->service()->name();
ta->setText( servicename );
ta->setIconName( m_currentView->service()->icon() );
ta->setIcon( KIcon( m_currentView->service()->icon() ) );
// Bypassing KAction restriction - this action will not be found via KActionCollection when doing a name search
ta->QAction::setName( m_currentView->service()->desktopEntryName().toAscii() ) ;
ta->QAction::setObjectName( m_currentView->service()->desktopEntryName().toAscii() ) ;
break;
}
}
......@@ -4919,7 +4919,7 @@ void KonqMainWindow::updateOpenWithActions()
for (; it != end; ++it )
{
KAction *action = new KAction( i18n( "Open with %1", (*it)->name() ), actionCollection(), (*it)->desktopEntryName().toLatin1() );
action->setIconName( (*it)->icon() );
action->setIcon( KIcon( (*it)->icon() ) );
connect( action, SIGNAL( activated() ),
this, SLOT( slotOpenWith() ) );
......@@ -5090,7 +5090,7 @@ void KonqMainWindow::updateViewModeActions()
if (mapitname.isEmpty())
mapitname = (*it)->name();
(*mapIt)->setText( mapitname );
(*mapIt)->setIconName( (*it)->icon() );
(*mapIt)->setIcon( KIcon((*it)->icon()) );
(*mapIt)->QAction::setObjectName( (*it)->desktopEntryName() ); // tricky...
preferredServiceMap.remove( library ); // The current view has priority over the saved settings
}
......@@ -5264,7 +5264,7 @@ bool KonqMainWindow::queryExit()
void KonqMainWindow::setIcon( const QPixmap& pix )
{
KParts::MainWindow::setIcon( pix );
KParts::MainWindow::setWindowIcon( pix );
QPixmap big = pix;
......@@ -5582,11 +5582,11 @@ void KonqMainWindow::insertChildFrame( KonqFrameBase * frame, int /*index*/ )
m_pChildFrame = frame;
m_pActiveChild = frame;
frame->setParentContainer(this);
if ( centralWidget() && centralWidget() != frame->widget() ) {
if ( centralWidget() && centralWidget() != frame->asQWidget() ) {
centralWidget()->setParent( 0 ); // workaround Qt-4.1.2 crash (reported)
setCentralWidget( 0 );
}
setCentralWidget( frame->widget() );
setCentralWidget( frame->asQWidget() );
}
/**
......@@ -5613,7 +5613,7 @@ void KonqMainWindow::setParentContainer(KonqFrameContainerBase* /*parent*/) { re
void KonqMainWindow::setTitle( const QString &/*title*/ , QWidget* /*sender*/) { return; }
void KonqMainWindow::setTabIcon( const KUrl &/*url*/, QWidget* /*sender*/ ) { return; }
QWidget* KonqMainWindow::widget() { return this; }
QWidget* KonqMainWindow::asQWidget() { return this; }
void KonqMainWindow::listViews( ChildViewList *viewList ) { if( m_pChildFrame ) m_pChildFrame->listViews( viewList ); }
......
......@@ -297,7 +297,7 @@ public:
void setTitle( const QString &title , QWidget* sender);
void setTabIcon( const KUrl &url, QWidget* sender );
QWidget* widget();
QWidget* asQWidget();
void listViews( ChildViewList *viewList );
QByteArray frameType();
......
......@@ -231,7 +231,7 @@ KonqDraggableLabel::KonqDraggableLabel( KonqMainWindow* mw, const QString& text
setObjectName( "kde toolbar widget" );
setBackgroundRole( QPalette::Button );
setAlignment( (QApplication::isRightToLeft() ? Qt::AlignRight : Qt::AlignLeft) |
Qt::AlignVCenter | Qt::TextShowMnemonic );
Qt::AlignVCenter );
setAcceptDrops(true);
adjustSize();
validDrag = false;
......
......@@ -270,15 +270,15 @@ void KonqFrameTabs::setTabIcon( const KUrl &url, QWidget* sender )
iconSet = SmallIcon( "fileclose" );
else
iconSet = SmallIconSet( KonqPixmapProvider::self()->iconNameFor( url ) );
if (tabIconSet( sender ).pixmap().serialNumber() != iconSet.pixmap().serialNumber())
setTabIconSet( sender, iconSet );
if (tabIcon( indexOf( sender ) ).pixmap().serialNumber() != iconSet.pixmap().serialNumber())
KTabWidget::setTabIcon( indexOf( sender ), iconSet );
}
void KonqFrameTabs::activateChild()
{
if (m_pActiveChild)
{
showPage( m_pActiveChild->widget() );
setCurrentIndex( indexOf( m_pActiveChild->asQWidget() ) );
m_pActiveChild->activateChild();
}
}
......@@ -291,7 +291,7 @@ void KonqFrameTabs::insertChildFrame( KonqFrameBase* frame, int index )
{
//kDebug(1202) << "Adding frame" << endl;
bool showTabBar = (count() == 1);
insertTab(frame->widget(),"", index);
insertTab(index, frame->asQWidget(), "");
frame->setParentContainer(this);
if (index == -1) m_pChildFrameList->append(frame);
else m_pChildFrameList->insert(index, frame);
......@@ -315,7 +315,7 @@ void KonqFrameTabs::removeChildFrame( KonqFrameBase * frame )
{
//kDebug(1202) << "KonqFrameTabs::RemoveChildFrame " << this << ". Child " << frame << " removed" << endl;
if (frame) {
removePage(frame->widget());
removePage(frame->asQWidget());
m_pChildFrameList->removeAll(frame);
if (m_rightWidget)
m_rightWidget->setEnabled( m_pChildFrameList->count()>1 );
......
......@@ -68,7 +68,7 @@ public:
virtual void setTitle( const QString &title, QWidget* sender );
virtual void setTabIcon( const KUrl &url, QWidget* sender );
virtual QWidget* widget() { return this; }
virtual QWidget* asQWidget() { return this; }
virtual QByteArray frameType() { return QByteArray("Tabs"); }
void activateChild();
......
......@@ -80,7 +80,7 @@ KonqView* KonqViewManager::Initialize( const QString &serviceType, const QString
static_cast<KonqFrameTabs*>( m_pDocContainer )->setAlwaysTabbedMode(
KonqSettings::alwaysTabbedMode() );
m_pDocContainer->widget()->show();
m_pDocContainer->asQWidget()->show();
return childView;
}
......@@ -120,37 +120,37 @@ KonqView* KonqViewManager::splitView ( Qt::Orientation orientation,
int index= -1;
if (parentContainer->frameType()=="Container") {
moveNewContainer = (static_cast<KonqFrameContainer*>(parentContainer)->idAfter( splitFrame->widget() ) != 0);
moveNewContainer = (static_cast<KonqFrameContainer*>(parentContainer)->idAfter( splitFrame->asQWidget() ) != 0);
splitterSizes = static_cast<KonqFrameContainer*>(parentContainer)->sizes();
}
else if (parentContainer->frameType()=="Tabs")
index = static_cast<KonqFrameTabs*>(parentContainer)->indexOf( splitFrame->widget() );
index = static_cast<KonqFrameTabs*>(parentContainer)->indexOf( splitFrame->asQWidget() );
#ifndef NDEBUG
//printSizeInfo( splitFrame, parentContainer, "before split");
#endif
parentContainer->widget()->setUpdatesEnabled( false );
parentContainer->asQWidget()->setUpdatesEnabled( false );
//kDebug(1202) << "Move out child" << endl;
QPoint pos = splitFrame->widget()->pos();
QPoint pos = splitFrame->asQWidget()->pos();
parentContainer->removeChildFrame( splitFrame );
splitFrame->widget()->setParent( m_pMainWindow );
splitFrame->widget()->move( pos );
splitFrame->asQWidget()->setParent( m_pMainWindow );
splitFrame->asQWidget()->move( pos );
//kDebug(1202) << "Create new Container" << endl;
KonqFrameContainer *newContainer = new KonqFrameContainer( orientation, parentContainer->widget(), parentContainer );
KonqFrameContainer *newContainer = new KonqFrameContainer( orientation, parentContainer->asQWidget(), parentContainer );
connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
parentContainer->insertChildFrame( newContainer, index );
if ( moveNewContainer ) {
static_cast<KonqFrameContainer*>(parentContainer)->moveToFirst( newContainer );
static_cast<KonqFrameContainer*>(parentContainer)->insertWidget( 0, newContainer );
static_cast<KonqFrameContainer*>(parentContainer)->swapChildren();
}
//kDebug(1202) << "Move in child" << endl;
splitFrame->widget()->setParent( newContainer );
splitFrame->widget()->move( pos );
splitFrame->asQWidget()->setParent( newContainer );
splitFrame->asQWidget()->move( pos );
newContainer->insertChildFrame( splitFrame );
#ifndef NDEBUG
......@@ -166,7 +166,7 @@ KonqView* KonqViewManager::splitView ( Qt::Orientation orientation,
if ( newOneFirst )
{
newContainer->moveToLast( splitFrame->widget() );
newContainer->addWidget( splitFrame->asQWidget() );
newContainer->swapChildren();
}
......@@ -177,14 +177,16 @@ KonqView* KonqViewManager::splitView ( Qt::Orientation orientation,
if (parentContainer->frameType()=="Container") {
static_cast<KonqFrameContainer*>(parentContainer)->setSizes( splitterSizes );
}
else if (parentContainer->frameType()=="Tabs")
static_cast<KonqFrameTabs*>(parentContainer)->showPage( newContainer );
else if (parentContainer->frameType()=="Tabs") {
KonqFrameTabs* pc = static_cast<KonqFrameTabs*>(parentContainer);
pc->setCurrentIndex( pc->indexOf( newContainer ) );
}
splitFrame->show();
//newView->frame()->show();
newContainer->show();
parentContainer->widget()->setUpdatesEnabled( true );
parentContainer->asQWidget()->setUpdatesEnabled( true );
if (m_pDocContainer == splitFrame) m_pDocContainer = newContainer;
......@@ -226,10 +228,10 @@ KonqView* KonqViewManager::splitWindow( Qt::Orientation orientation,
KonqFrameBase* mainFrame = m_pMainWindow->childFrame();
mainFrame->widget()->setUpdatesEnabled( false );
mainFrame->asQWidget()->setUpdatesEnabled( false );
//kDebug(1202) << "Move out child" << endl;
QPoint pos = mainFrame->widget()->pos();
QPoint pos = mainFrame->asQWidget()->pos();
m_pMainWindow->removeChildFrame( mainFrame );
KonqFrameContainer *newContainer = new KonqFrameContainer( orientation, m_pMainWindow, 0L);
......@@ -238,20 +240,20 @@ KonqView* KonqViewManager::splitWindow( Qt::Orientation orientation,
m_pMainWindow->insertChildFrame( newContainer );
newContainer->insertChildFrame( mainFrame );
mainFrame->widget()->setParent( newContainer );
mainFrame->widget()->move( pos );
mainFrame->asQWidget()->setParent( newContainer );
mainFrame->asQWidget()->move( pos );
KonqView* childView = setupView( newContainer, newViewFactory, service, partServiceOffers, appServiceOffers, serviceType, true );
if( newOneFirst ) {
static_cast<KonqFrameContainer*>(newContainer)->moveToFirst( childView->frame() );
static_cast<KonqFrameContainer*>(newContainer)->insertWidget( 0, childView->frame() );
static_cast<KonqFrameContainer*>(newContainer)->swapChildren();
}
newContainer->show();
mainFrame->widget()->show();
mainFrame->asQWidget()->show();
mainFrame->widget()->setUpdatesEnabled( true );
mainFrame->asQWidget()->setUpdatesEnabled( true );
childView->openUrl( url, locationBarURL );
......@@ -276,28 +278,28 @@ void KonqViewManager::convertDocContainer()
bool moveNewContainer = false;
QList<int> splitterSizes;
if (parentContainer->frameType()=="Container") {
moveNewContainer = (static_cast<KonqFrameContainer*>(parentContainer)->idAfter( m_pDocContainer->widget() ) != 0);
moveNewContainer = (static_cast<KonqFrameContainer*>(parentContainer)->idAfter( m_pDocContainer->asQWidget() ) != 0);
splitterSizes = static_cast<KonqFrameContainer*>(parentContainer)->sizes();
}
parentContainer->widget()->setUpdatesEnabled( false );
parentContainer->asQWidget()->setUpdatesEnabled( false );
//kDebug(1202) << "Move out child" << endl;
QPoint pos = m_pDocContainer->widget()->pos();
QPoint pos = m_pDocContainer->asQWidget()->pos();
parentContainer->removeChildFrame( m_pDocContainer );
m_pDocContainer->widget()->setParent( m_pMainWindow );
m_pDocContainer->widget()->move( pos );
m_pDocContainer->asQWidget()->setParent( m_pMainWindow );
m_pDocContainer->asQWidget()->move( pos );
KonqFrameTabs* newContainer = new KonqFrameTabs( parentContainer->widget() , parentContainer, this);
KonqFrameTabs* newContainer = new KonqFrameTabs( parentContainer->asQWidget() , parentContainer, this);
parentContainer->insertChildFrame( newContainer );
connect( newContainer, SIGNAL(ctrlTabPressed()), m_pMainWindow, SLOT(slotCtrlTabPressed()) );
m_pDocContainer->widget()->setParent( newContainer );
m_pDocContainer->widget()->move( pos );
m_pDocContainer->asQWidget()->setParent( newContainer );
m_pDocContainer->asQWidget()->move( pos );
newContainer->insertChildFrame( m_pDocContainer );
if ( moveNewContainer ) {
static_cast<KonqFrameContainer*>(parentContainer)->moveToFirst( newContainer );
static_cast<KonqFrameContainer*>(parentContainer)->insertWidget( 0, newContainer );
static_cast<KonqFrameContainer*>(parentContainer)->swapChildren();
}
if (parentContainer->frameType()=="Container")
......@@ -305,7 +307,7 @@ void KonqViewManager::convertDocContainer()
newContainer->show();
parentContainer->widget()->setUpdatesEnabled( true );
parentContainer->asQWidget()->setUpdatesEnabled( true );
m_pDocContainer = newContainer;
}
......@@ -450,7 +452,7 @@ void KonqViewManager::duplicateTab( KonqFrameBase* tab, bool openAfterCurrentPag
m_pMainWindow->viewCountChanged();
if (openAfterCurrentPage)
tabContainer->setCurrentIndex( tabContainer->currentPageIndex () + 1 );
tabContainer->setCurrentIndex( tabContainer->currentIndex () + 1 );
else
tabContainer->setCurrentIndex( tabContainer->count() - 1 );
......@@ -565,7 +567,7 @@ void KonqViewManager::removeTab( KonqFrameBase* tab )
if ( tabContainer->count() == 1 )
return;
if (currentFrame->widget() == tabContainer->currentWidget())
if (currentFrame->asQWidget() == tabContainer->currentWidget())
setActivePart( 0L, true );
tabContainer->removeChildFrame(currentFrame);
......@@ -711,7 +713,7 @@ void KonqViewManager::showTab( KonqView *view )
KonqFrameTabs *tabContainer = static_cast<KonqFrameTabs*>( docContainer() );
if (tabContainer->currentWidget() != view->frame())
{
tabContainer->showPage( view->frame() );
tabContainer->setCurrentIndex( tabContainer->indexOf( view->frame() ) );
emitActivePartChanged();
}
}
......@@ -760,10 +762,10 @@ void KonqViewManager::removeView( KonqView *view )
bool moveOtherChild = false;
if (grandParentContainer->frameType()=="Tabs")
index = static_cast<KonqFrameTabs*>(grandParentContainer)->indexOf( parentContainer->widget() );
index = static_cast<KonqFrameTabs*>(grandParentContainer)->indexOf( parentContainer->asQWidget() );
else if (grandParentContainer->frameType()=="Container")
{
moveOtherChild = (static_cast<KonqFrameContainer*>(grandParentContainer)->idAfter( parentContainer->widget() ) != 0);
moveOtherChild = (static_cast<KonqFrameContainer*>(grandParentContainer)->idAfter( parentContainer->asQWidget() ) != 0);
splitterSizes = static_cast<KonqFrameContainer*>(grandParentContainer)->sizes();
}
......@@ -778,11 +780,11 @@ void KonqViewManager::removeView( KonqView *view )
if (m_pDocContainer == parentContainer) m_pDocContainer = otherFrame;
grandParentContainer->widget()->setUpdatesEnabled( false );
grandParentContainer->asQWidget()->setUpdatesEnabled( false );
static_cast<KonqFrameContainer*>(parentContainer)->setAboutToBeDeleted();
//kDebug(1202) << "--- Reparenting otherFrame to m_pMainWindow " << m_pMainWindow << endl;
QPoint pos = otherFrame->widget()->pos();
QPoint pos = otherFrame->asQWidget()->pos();
otherFrame->reparentFrame( m_pMainWindow, pos );
//kDebug(1202) << "--- Removing otherFrame from parentContainer" << endl;
......@@ -797,30 +799,30 @@ void KonqViewManager::removeView( KonqView *view )
delete view; // This deletes the view, which deletes the part, which deletes its widget
//kDebug(1202) << "--- Deleting parentContainer " << parentContainer
// << ". Its parent is " << parentContainer->widget()->parent() << endl;
// << ". Its parent is " << parentContainer->asQWidget()->parent() << endl;
delete parentContainer;
//kDebug(1202) << "--- Reparenting otherFrame to grandParentContainer" << grandParentContainer << endl;
otherFrame->reparentFrame( grandParentContainer->widget(), pos );
otherFrame->reparentFrame( grandParentContainer->asQWidget(), pos );
//kDebug(1202) << "--- Inserting otherFrame into grandParentContainer" << grandParentContainer << endl;
grandParentContainer->insertChildFrame( otherFrame, index );
if( moveOtherChild )
{
static_cast<KonqFrameContainer*>(grandParentContainer)->moveToFirst( otherFrame->widget() );
static_cast<KonqFrameContainer*>(grandParentContainer)->insertWidget( 0, otherFrame->asQWidget() );
static_cast<KonqFrameContainer*>(grandParentContainer)->swapChildren();
}
if (grandParentContainer->frameType()=="Container")
static_cast<KonqFrameContainer*>(grandParentContainer)->setSizes( splitterSizes );
otherFrame->widget()->show();
otherFrame->asQWidget()->show();
grandParentContainer->setActiveChild( otherFrame );
grandParentContainer->activateChild();
grandParentContainer->widget()->setUpdatesEnabled( true );
grandParentContainer->asQWidget()->setUpdatesEnabled( true );
}
else if (parentContainer->frameType()=="Tabs") {
kDebug(1202) << "parentContainer " << parentContainer << " is a KonqFrameTabs" << endl;
......@@ -1025,7 +1027,7 @@ KonqView *KonqViewManager::setupView( KonqFrameContainerBase *parentContainer,
sType = m_pMainWindow->currentView()->serviceType();
//kDebug(1202) << "KonqViewManager::setupView creating KonqFrame with parent=" << parentContainer << endl;
KonqFrame* newViewFrame = new KonqFrame( parentContainer->widget(), parentContainer, "KonqFrame" );
KonqFrame* newViewFrame = new KonqFrame( parentContainer->asQWidget(), parentContainer );
newViewFrame->setGeometry( 0, 0, m_pMainWindow->width(), m_pMainWindow->height() );
//kDebug(1202) << "Creating KonqView" << endl;
......@@ -1589,7 +1591,7 @@ void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
}
else
{
KonqFrameContainer *newContainer = new KonqFrameContainer( o, parent->widget(), parent );
KonqFrameContainer *newContainer = new KonqFrameContainer( o, parent->asQWidget(), parent );
connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
int tabindex = -1;
......@@ -1618,7 +1620,7 @@ void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
{
//kDebug(1202) << "KonqViewManager::loadItem Item is a Tabs" << endl;
KonqFrameTabs *newContainer = new KonqFrameTabs( parent->widget(), parent, this );
KonqFrameTabs *newContainer = new KonqFrameTabs( parent->asQWidget(), parent, this );
connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
parent->insertChildFrame( newContainer );
......@@ -1640,7 +1642,7 @@ void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
}
}
newContainer->setActiveChild( dynamic_cast<KonqFrameBase*>(newContainer->page(index)) );
newContainer->setActiveChild( dynamic_cast<KonqFrameBase*>(newContainer->widget(index)) );
newContainer->setCurrentIndex( index );
newContainer->show();
......@@ -1792,7 +1794,7 @@ void KonqViewManager::printSizeInfo( KonqFrameBase* frame,
const char* msg )
{
QRect r;
r = frame->widget()->geometry();
r = frame->asQWidget()->geometry();
qDebug("Child size %s : x: %d, y: %d, w: %d, h: %d", msg, r.x(),r.y(),r.width(),r.height() );
if ( parent->frameType() == "Container" )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment