From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker/extensions/sidebar/sidebarextension.cpp | 56 +++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'kicker/extensions/sidebar/sidebarextension.cpp') diff --git a/kicker/extensions/sidebar/sidebarextension.cpp b/kicker/extensions/sidebar/sidebarextension.cpp index a959f7f87..401c67fbd 100644 --- a/kicker/extensions/sidebar/sidebarextension.cpp +++ b/kicker/extensions/sidebar/sidebarextension.cpp @@ -22,16 +22,16 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include +#include extern "C" { - KDE_EXPORT KPanelExtension *init( QWidget *parent, const QString& configFile ) + KDE_EXPORT KPanelExtension *init( TQWidget *parent, const TQString& configFile ) { KGlobal::locale()->insertCatalogue("kickersidebarextension"); KGlobal::locale()->insertCatalogue("konqueror"); @@ -42,17 +42,17 @@ extern "C" } } -SidebarExtension::SidebarExtension( const QString& configFile, +SidebarExtension::SidebarExtension( const TQString& configFile, Type type, int actions, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KPanelExtension( configFile, type, actions, parent, name ),m_resizing(false),m_expandedSize(200) { kdDebug() << "SidebarExtension: Created '" << name << "', '" << configFile << "'" << endl; new KonqHistoryManager(0,"SidebarExtensionHistoryManager"); - m_layout=new QHBoxLayout(this); + m_layout=new TQHBoxLayout(this); m_layout->activate(); - m_sbWrapper=new QVBox(this); + m_sbWrapper=new TQVBox(this); KParts::ReadOnlyPart *p=KParts::ComponentFactory::createPartInstanceFromLibrary( "konq_sidebar", m_sbWrapper, @@ -62,19 +62,19 @@ SidebarExtension::SidebarExtension( const QString& configFile, KParts::BrowserExtension *be=KParts::BrowserExtension::childObject(p); if (be) { - connect(be,SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), - this,SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); - connect(be,SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), - this,SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); + connect(be,TQT_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), + this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); + connect(be,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), + this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); } - m_resizeHandle=new QFrame(this); - m_resizeHandle->setFrameShape(QFrame::Panel); - m_resizeHandle->setFrameShadow(QFrame::Raised); + m_resizeHandle=new TQFrame(this); + m_resizeHandle->setFrameShape(TQFrame::Panel); + m_resizeHandle->setFrameShadow(TQFrame::Raised); m_resizeHandle->setFixedWidth(6); - m_resizeHandle->setCursor(QCursor(Qt::SizeHorCursor)); - connect(p->widget(),SIGNAL(panelHasBeenExpanded(bool)),this,SLOT(needLayoutUpdate(bool))); + m_resizeHandle->setCursor(TQCursor(Qt::SizeHorCursor)); + connect(p->widget(),TQT_SIGNAL(panelHasBeenExpanded(bool)),this,TQT_SLOT(needLayoutUpdate(bool))); needLayoutUpdate(false); m_resizeHandle->installEventFilter(this); m_resizeHandle->setMouseTracking(true); @@ -110,31 +110,31 @@ SidebarExtension::~SidebarExtension() KGlobal::locale()->removeCatalogue("konqueror"); } -bool SidebarExtension::eventFilter( QObject *, QEvent *e ) { - if (e->type()==QEvent::MouseButtonPress) { +bool SidebarExtension::eventFilter( TQObject *, TQEvent *e ) { + if (e->type()==TQEvent::MouseButtonPress) { m_resizing=true; - m_x=((QMouseEvent*)e)->globalX(); + m_x=((TQMouseEvent*)e)->globalX(); return true; - } else if (e->type()==QEvent::MouseButtonRelease) { + } else if (e->type()==TQEvent::MouseButtonRelease) { m_resizing=false; m_expandedSize=topLevelWidget()->width(); needLayoutUpdate(true); return true; - } else if (e->type()==QEvent::MouseMove) { + } else if (e->type()==TQEvent::MouseMove) { if (m_resizing) { Position p=position(); if (p==Left) { - int diff=((QMouseEvent*)e)->globalX()-m_x; + int diff=((TQMouseEvent*)e)->globalX()-m_x; if (abs(diff)>3) { topLevelWidget()->setFixedWidth(topLevelWidget()->width()+diff); - m_x=((QMouseEvent*)e)->globalX(); + m_x=((TQMouseEvent*)e)->globalX(); } } else if (p==Right) { - int diff=((QMouseEvent*)e)->globalX()-m_x; + int diff=((TQMouseEvent*)e)->globalX()-m_x; if (abs(diff)>3) { topLevelWidget()->setFixedWidth(topLevelWidget()->width()-diff); topLevelWidget()->move(topLevelWidget()->x()+diff,topLevelWidget()->y()); - m_x=((QMouseEvent*)e)->globalX(); + m_x=((TQMouseEvent*)e)->globalX(); } } return true; @@ -148,9 +148,9 @@ KPanelExtension::Position SidebarExtension::preferedPosition() const { return KPanelExtension::Left; } -QSize SidebarExtension::sizeHint(Position, QSize maxSize ) const +TQSize SidebarExtension::sizeHint(Position, TQSize maxSize ) const { - return QSize(m_currentWidth,maxSize.height()); + return TQSize(m_currentWidth,maxSize.height()); } void SidebarExtension::positionChange( Position position ) { -- cgit v1.2.1