diff options
Diffstat (limited to 'parts/fileselector/fileselector_widget.cpp')
-rw-r--r-- | parts/fileselector/fileselector_widget.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp index 894bf185..1d6fb154 100644 --- a/parts/fileselector/fileselector_widget.cpp +++ b/parts/fileselector/fileselector_widget.cpp @@ -26,9 +26,9 @@ #include "tdeactionselector.h" #include "kbookmarkhandler.h" -#include <kdevcore.h> -#include <kdevmainwindow.h> -#include <kdevpartcontroller.h> +#include <tdevcore.h> +#include <tdevmainwindow.h> +#include <tdevpartcontroller.h> #include <tqlayout.h> #include <tqtoolbutton.h> @@ -76,32 +76,32 @@ static void silenceTQToolBar(TQtMsgType, const char *) {} -KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *parent) +TDevFileSelectorToolBar::TDevFileSelectorToolBar(TQWidget *parent) : TDEToolBar( parent, "KDev FileSelector Toolbar", true ) { setMinimumWidth(10); } -KDevFileSelectorToolBar::~KDevFileSelectorToolBar() +TDevFileSelectorToolBar::~TDevFileSelectorToolBar() {} -void KDevFileSelectorToolBar::setMovingEnabled( bool) +void TDevFileSelectorToolBar::setMovingEnabled( bool) { TDEToolBar::setMovingEnabled(false); } -KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *parent) +TDevFileSelectorToolBarParent::TDevFileSelectorToolBarParent(TQWidget *parent) :TQFrame(parent),m_tb(0) {} -KDevFileSelectorToolBarParent::~KDevFileSelectorToolBarParent() +TDevFileSelectorToolBarParent::~TDevFileSelectorToolBarParent() {} -void KDevFileSelectorToolBarParent::setToolBar(KDevFileSelectorToolBar *tb) +void TDevFileSelectorToolBarParent::setToolBar(TDevFileSelectorToolBar *tb) { m_tb=tb; } -void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) +void TDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) { if (m_tb) { @@ -113,8 +113,8 @@ void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) //BEGIN Constructor/destructor -KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow, - KDevPartController *partController, +TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *mainWindow, + TDevPartController *partController, TQWidget * parent, const char * name ) : TQWidget(parent, name), m_part(part), @@ -127,8 +127,8 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar ); - KDevFileSelectorToolBarParent *tbp=new KDevFileSelectorToolBarParent(this); - toolbar = new KDevFileSelectorToolBar(tbp); + TDevFileSelectorToolBarParent *tbp=new TDevFileSelectorToolBarParent(this); + toolbar = new TDevFileSelectorToolBar(tbp); tbp->setToolBar(toolbar); lo->addWidget(tbp); toolbar->setMovingEnabled(false); @@ -142,7 +142,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main lo->addWidget(cmbPath); cmbPath->listBox()->installEventFilter( this ); - dir = new KDevDirOperator(m_part, KURL(), this, "operator"); + dir = new TDevDirOperator(m_part, KURL(), this, "operator"); dir->setView(KFile::/*Simple*/Detail); TDEActionCollection *coll = dir->actionCollection(); @@ -229,7 +229,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main "reapplies the last filter used when toggled on.") ); } -KDevFileSelector::~KDevFileSelector() +TDevFileSelector::~TDevFileSelector() { writeConfig( m_part->instance()->config(), "fileselector" ); } @@ -237,7 +237,7 @@ KDevFileSelector::~KDevFileSelector() //BEGIN Public Methods -void KDevFileSelector::readConfig(TDEConfig *config, const TQString & name) +void TDevFileSelector::readConfig(TDEConfig *config, const TQString & name) { dir->readConfig(config, name + ":dir"); dir->setView( KFile::Default ); @@ -283,12 +283,12 @@ void KDevFileSelector::readConfig(TDEConfig *config, const TQString & name) } -void KDevFileSelector::initialDirChangeHack() +void TDevFileSelector::initialDirChangeHack() { setDir( waitingDir ); } -void KDevFileSelector::setupToolbar( TDEConfig *config ) +void TDevFileSelector::setupToolbar( TDEConfig *config ) { toolbar->clear(); TQStringList tbactions = config->readListEntry( "toolbar actions", ',' ); @@ -311,7 +311,7 @@ void KDevFileSelector::setupToolbar( TDEConfig *config ) } } -void KDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) +void TDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) { dir->writeConfig(config,name + ":dir"); @@ -332,7 +332,7 @@ void KDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) config->writeEntry( "AutoSyncEvents", autoSyncEvents ); } -void KDevFileSelector::setView(KFile::FileView view) +void TDevFileSelector::setView(KFile::FileView view) { dir->setView(view); } @@ -341,7 +341,7 @@ void KDevFileSelector::setView(KFile::FileView view) //BEGIN Public Slots -void KDevFileSelector::slotFilterChange( const TQString & nf ) +void TDevFileSelector::slotFilterChange( const TQString & nf ) { TQToolTip::remove( btnFilter ); TQString f = nf.stripWhiteSpace(); @@ -371,7 +371,7 @@ void KDevFileSelector::slotFilterChange( const TQString & nf ) btnFilter->setEnabled( !( empty && lastFilter.isEmpty() ) ); } -void KDevFileSelector::setDir( KURL u ) +void TDevFileSelector::setDir( KURL u ) { dir->setURL(u, true); } @@ -380,12 +380,12 @@ void KDevFileSelector::setDir( KURL u ) //BEGIN Private Slots -void KDevFileSelector::cmbPathActivated( const KURL& u ) +void TDevFileSelector::cmbPathActivated( const KURL& u ) { cmbPathReturnPressed( u.url() ); } -void KDevFileSelector::cmbPathReturnPressed( const TQString& u ) +void TDevFileSelector::cmbPathReturnPressed( const TQString& u ) { TQStringList urls = cmbPath->urls(); urls.remove( u ); @@ -395,12 +395,12 @@ void KDevFileSelector::cmbPathReturnPressed( const TQString& u ) dir->setURL( KURL(u), true ); } -void KDevFileSelector::dirUrlEntered( const KURL& u ) +void TDevFileSelector::dirUrlEntered( const KURL& u ) { cmbPath->setURL( u ); } -void KDevFileSelector::dirFinishedLoading() +void TDevFileSelector::dirFinishedLoading() {} @@ -411,7 +411,7 @@ void KDevFileSelector::dirFinishedLoading() If on: Set last filter. */ -void KDevFileSelector::btnFilterClick() +void TDevFileSelector::btnFilterClick() { if ( !btnFilter->isOn() ) { @@ -425,9 +425,9 @@ void KDevFileSelector::btnFilterClick() } -void KDevFileSelector::autoSync() +void TDevFileSelector::autoSync() { - kdDebug()<<"KDevFileSelector::autoSync()"<<endl; + kdDebug()<<"TDevFileSelector::autoSync()"<<endl; // if visible, sync if ( isVisible() ) { @@ -443,14 +443,14 @@ void KDevFileSelector::autoSync() } } -void KDevFileSelector::autoSync( KParts::Part *part ) +void TDevFileSelector::autoSync( KParts::Part *part ) { KTextEditor::Document* doc = dynamic_cast<KTextEditor::Document*>( part ); if( !doc ) return; // as above, but using document url. - kdDebug()<<"KDevFileSelector::autoSync( KTextEditor::Document )"<<endl; + kdDebug()<<"TDevFileSelector::autoSync( KTextEditor::Document )"<<endl; KURL u ( doc->url() ); if ( u.isEmpty() ) { @@ -468,15 +468,15 @@ void KDevFileSelector::autoSync( KParts::Part *part ) } } /// \FIXME crash on shutdown -void KDevFileSelector::setActiveDocumentDir() +void TDevFileSelector::setActiveDocumentDir() { - //kdDebug()<<"KDevFileSelector::setActiveDocumentDir()"<<endl; + //kdDebug()<<"TDevFileSelector::setActiveDocumentDir()"<<endl; KURL u = activeDocumentUrl(); if (!u.isEmpty()) setDir( u.upURL() ); } -void KDevFileSelector::viewChanged() +void TDevFileSelector::viewChanged() { /// @todo make sure the button is disabled if the directory is unreadable, eg /// the document URL has protocol http @@ -487,12 +487,12 @@ void KDevFileSelector::viewChanged() //BEGIN Protected -void KDevFileSelector::focusInEvent( TQFocusEvent * ) +void TDevFileSelector::focusInEvent( TQFocusEvent * ) { dir->setFocus(); } -void KDevFileSelector::showEvent( TQShowEvent * ) +void TDevFileSelector::showEvent( TQShowEvent * ) { // sync if we should if ( autoSyncEvents & GotVisible ) @@ -509,7 +509,7 @@ void KDevFileSelector::showEvent( TQShowEvent * ) } } -bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) +bool TDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) { /* This is rather unfortunate, but: @@ -559,7 +559,7 @@ private: TQString _str; }; -KURL KDevFileSelector::activeDocumentUrl( ) +KURL TDevFileSelector::activeDocumentUrl( ) { KParts::ReadOnlyPart * part = dynamic_cast<KParts::ReadOnlyPart*>( partController->activePart() ); if ( part ) @@ -575,7 +575,7 @@ KURL KDevFileSelector::activeDocumentUrl( ) //////////////////////////////////////////////////////////////////////////////// // KFSConfigPage implementation //////////////////////////////////////////////////////////////////////////////// -KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KDevFileSelector *kfs ) +KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, TDevFileSelector *kfs ) : TQWidget( parent, name ), fileSelector( kfs ), bDirty( false ) @@ -706,20 +706,20 @@ void KFSConfigPage::apply() // sync int s = 0; if ( cbSyncActive->isChecked() ) - s |= KDevFileSelector::DocumentChanged; + s |= TDevFileSelector::DocumentChanged; if ( cbSyncOpen->isChecked() ) - s |= KDevFileSelector::DocumentOpened; + s |= TDevFileSelector::DocumentOpened; if ( cbSyncShow->isChecked() ) - s |= KDevFileSelector::GotVisible; + s |= TDevFileSelector::GotVisible; fileSelector->autoSyncEvents = s; // reset connections disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync() ) ); disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync( KParts::Part *) ) ); - if ( s & KDevFileSelector::DocumentChanged ) + if ( s & TDevFileSelector::DocumentChanged ) connect( fileSelector->partController, TQT_SIGNAL( viewChanged() ), fileSelector, TQT_SLOT( autoSync() ) ); - if ( s & KDevFileSelector::DocumentOpened ) + if ( s & TDevFileSelector::DocumentOpened ) connect( fileSelector->partController, TQT_SIGNAL( partAdded(KParts::Part *) ), fileSelector, TQT_SLOT( autoSync(KParts::Part *) ) ); @@ -773,9 +773,9 @@ void KFSConfigPage::init() // sync int s = fileSelector->autoSyncEvents; - cbSyncActive->setChecked( s & KDevFileSelector::DocumentChanged ); - cbSyncOpen->setChecked( s & KDevFileSelector::DocumentOpened ); - cbSyncShow->setChecked( s & KDevFileSelector::GotVisible ); + cbSyncActive->setChecked( s & TDevFileSelector::DocumentChanged ); + cbSyncOpen->setChecked( s & TDevFileSelector::DocumentOpened ); + cbSyncShow->setChecked( s & TDevFileSelector::GotVisible ); // histories sbPathHistLength->setValue( fileSelector->cmbPath->maxItems() ); sbFilterHistLength->setValue( fileSelector->filter->maxCount() ); @@ -791,9 +791,9 @@ void KFSConfigPage::slotChanged() //END KFSConfigPage -//BEGIN KDevDirOperator +//BEGIN TDevDirOperator -void KDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) +void TDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) { setupMenu(); updateSelectionDependentActions(); @@ -816,6 +816,6 @@ void KDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) popup->popup(pos); } -//END KDevDirOperator +//END TDevDirOperator #include "fileselector_widget.moc" |