summaryrefslogtreecommitdiffstats
path: root/parts/fileselector/fileselector_widget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/fileselector/fileselector_widget.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/fileselector/fileselector_widget.cpp')
-rw-r--r--parts/fileselector/fileselector_widget.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp
index 804270e1..e9e60f47 100644
--- a/parts/fileselector/fileselector_widget.cpp
+++ b/parts/fileselector/fileselector_widget.cpp
@@ -72,12 +72,12 @@
// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
-static void silenceQToolBar(QtMsgType, const char *)
+static void silenceTQToolBar(TQtMsgType, const char *)
{}
-KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *parent)
- : KToolBar( parent, "KDev FileSelector Toolbar", true )
+KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *tqparent)
+ : KToolBar( tqparent, "KDev FileSelector Toolbar", true )
{
setMinimumWidth(10);
}
@@ -91,8 +91,8 @@ void KDevFileSelectorToolBar::setMovingEnabled( bool)
}
-KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *parent)
- :TQFrame(parent),m_tb(0)
+KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *tqparent)
+ :TQFrame(tqparent),m_tb(0)
{}
KDevFileSelectorToolBarParent::~KDevFileSelectorToolBarParent()
{}
@@ -105,7 +105,7 @@ void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * )
{
if (m_tb)
{
- setMinimumHeight(m_tb->sizeHint().height());
+ setMinimumHeight(m_tb->tqsizeHint().height());
m_tb->resize(width(),height());
}
}
@@ -115,8 +115,8 @@ void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * )
KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow,
KDevPartController *partController,
- TQWidget * parent, const char * name )
- : TQWidget(parent, name),
+ TQWidget * tqparent, const char * name )
+ : TQWidget(tqparent, name),
m_part(part),
mainwin(mainWindow),
partController(partController)
@@ -125,7 +125,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
TQVBoxLayout* lo = new TQVBoxLayout(this);
- QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
+ TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar );
KDevFileSelectorToolBarParent *tbp=new KDevFileSelectorToolBarParent(this);
toolbar = new KDevFileSelectorToolBar(tbp);
@@ -133,10 +133,10 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
lo->addWidget(tbp);
toolbar->setMovingEnabled(false);
toolbar->setFlat(true);
- qInstallMsgHandler( oldHandler );
+ tqInstallMsgHandler( oldHandler );
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
- cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
+ cmbPath->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
KURLCompletion* cmpl = new KURLCompletion(KURLCompletion::DirCompletion);
cmbPath->setCompletionObject( cmpl );
lo->addWidget(cmbPath);
@@ -171,7 +171,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
btnFilter->setIconSet( SmallIconSet("filter" ) );
btnFilter->setToggleButton( true );
filter = new KHistoryCombo( true, filterBox, "filter");
- filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
+ filter->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
filterBox->setStretchFactor(filter, 2);
connect( btnFilter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnFilterClick() ) );
lo->addWidget(filterBox);
@@ -186,7 +186,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
// kaction for the dir sync method
acSyncDir = new KAction( i18n("Current Document Directory"), "dirsynch", 0,
- this, TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" );
+ TQT_TQOBJECT(this), TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" );
toolbar->setIconText( KToolBar::IconOnly );
toolbar->setIconSize( 16 );
toolbar->setEnableContextMenu( false );
@@ -209,7 +209,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
connect( bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
this, TQT_SLOT( setDir( const TQString& ) ) );
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
// whatsthis help
TQWhatsThis::add
@@ -349,10 +349,10 @@ void KDevFileSelector::slotFilterChange( const TQString & nf )
if ( empty )
{
dir->clearFilter();
- filter->lineEdit()->setText( TQString::null );
+ filter->lineEdit()->setText( TQString() );
TQToolTip::add
( btnFilter,
- TQString( i18n("Apply last filter (\"%1\")") ).arg( lastFilter ) );
+ TQString( i18n("Apply last filter (\"%1\")") ).tqarg( lastFilter ) );
}
else
{
@@ -415,7 +415,7 @@ void KDevFileSelector::btnFilterClick()
{
if ( !btnFilter->isOn() )
{
- slotFilterChange( TQString::null );
+ slotFilterChange( TQString() );
}
else
{
@@ -432,7 +432,7 @@ void KDevFileSelector::autoSync()
if ( isVisible() )
{
setActiveDocumentDir();
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
}
// else set waiting url
else
@@ -454,13 +454,13 @@ void KDevFileSelector::autoSync( KParts::Part *part )
KURL u ( doc->url() );
if ( u.isEmpty() )
{
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
return;
}
if ( isVisible() )
{
setDir( u.directory() );
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
}
else
{
@@ -499,13 +499,13 @@ void KDevFileSelector::showEvent( TQShowEvent * )
{
kdDebug()<<"syncing fs on show"<<endl;
setActiveDocumentDir();
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
}
// else, if we have a waiting URL set it
else if ( ! waitingUrl.isEmpty() )
{
setDir( waitingUrl );
- waitingUrl = TQString::null;
+ waitingUrl = TQString();
}
}
@@ -519,11 +519,11 @@ bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e )
And the popup is rather useless, if the paths are only partly visible.
*/
TQListBox *lb = cmbPath->listBox();
- if ( o == lb && e->type() == TQEvent::Show )
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lb) && e->type() == TQEvent::Show )
{
int add
= lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0;
- int w = QMIN( mainwin->main()->width(), lb->contentsWidth() + add );
+ int w = TQMIN( mainwin->main()->width(), lb->contentsWidth() + add );
lb->resize( w, lb->height() );
/// @todo - move the listbox to a suitable place if nessecary
/// @todo - decide if it is worth caching the size while untill the contents
@@ -537,16 +537,16 @@ bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e )
//BEGIN ACtionLBItem
/*
- QListboxItem that can store and return a string,
+ TQListboxItem that can store and return a string,
used for the toolbar action selector.
*/
-class ActionLBItem : public QListBoxPixmap
+class ActionLBItem : public TQListBoxPixmap
{
public:
ActionLBItem( TQListBox *lb=0,
const TQPixmap &pm = TQPixmap(),
- const TQString &text=TQString::null,
- const TQString &str=TQString::null ) :
+ const TQString &text=TQString(),
+ const TQString &str=TQString() ) :
TQListBoxPixmap( lb, pm, text ),
_str(str)
{}
@@ -575,8 +575,8 @@ KURL KDevFileSelector::activeDocumentUrl( )
////////////////////////////////////////////////////////////////////////////////
// KFSConfigPage implementation
////////////////////////////////////////////////////////////////////////////////
-KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KDevFileSelector *kfs )
- : TQWidget( parent, name ),
+KFSConfigPage::KFSConfigPage( TQWidget *tqparent, const char *name, KDevFileSelector *kfs )
+ : TQWidget( tqparent, name ),
fileSelector( kfs ),
bDirty( false )
{
@@ -762,13 +762,13 @@ void KFSConfigPage::init()
TQListBox *lb;
for ( TQStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it )
{
- lb = l.contains( *it ) ? acSel->selectedListBox() : acSel->availableListBox();
+ lb = l.tqcontains( *it ) ? acSel->selectedListBox() : acSel->availableListBox();
if ( *it == "bookmarks" || *it == "sync_dir" )
ac = fileSelector->actionCollection()->action( (*it).latin1() );
else
ac = fileSelector->dirOperator()->actionCollection()->action( (*it).latin1() );
if ( ac )
- new ActionLBItem( lb, SmallIcon( ac->icon() ), ac->text().replace( re, "" ), *it );
+ new ActionLBItem( lb, SmallIcon( ac->icon() ), ac->text().tqreplace( re, "" ), *it );
}
// sync