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