KDevelop API Documentation

KDevFileSelector Class Reference

#include <fileselector_widget.h>

Inheritance diagram for KDevFileSelector:

Inheritance graph
[legend]
Collaboration diagram for KDevFileSelector:

Collaboration graph
[legend]
List of all members.

Public Types

enum  AutoSyncEvent { DocumentChanged = 1, DocumentOpened = 2, GotVisible = 4 }

Public Slots

void slotFilterChange (const QString &)
void setDir (KURL)
void setDir (const QString &url)

Public Member Functions

 KDevFileSelector (FileSelectorPart *part, KDevMainWindow *mainWindow=0, KDevPartController *partController=0, QWidget *parent=0, const char *name=0)
 ~KDevFileSelector ()
void readConfig (KConfig *, const QString &)
void writeConfig (KConfig *, const QString &)
void setupToolbar (KConfig *)
void setView (KFile::FileView)
KDevDirOperator * dirOperator ()
KActionCollection * actionCollection ()

Protected Member Functions

void focusInEvent (QFocusEvent *)
void showEvent (QShowEvent *)
bool eventFilter (QObject *, QEvent *)
KURL activeDocumentUrl ()

Private Slots

void cmbPathActivated (const KURL &u)
void cmbPathReturnPressed (const QString &u)
void dirUrlEntered (const KURL &u)
void dirFinishedLoading ()
void setActiveDocumentDir ()
void viewChanged ()
void btnFilterClick ()
void autoSync ()
void autoSync (KParts::Part *)
void initialDirChangeHack ()

Private Attributes

KDevFileSelectorToolBar * toolbar
KActionCollection * mActionCollection
KBookmarkHandler * bookmarkHandler
KURLComboBox * cmbPath
KDevDirOperator * dir
KAction * acSyncDir
KHistoryCombo * filter
QToolButton * btnFilter
FileSelectorPart * m_part
KDevMainWindow * mainwin
KDevPartController * partController
QString lastFilter
int autoSyncEvents
QString waitingUrl
QString waitingDir

Friends

class KFSConfigPage

Member Enumeration Documentation

enum KDevFileSelector::AutoSyncEvent
 

Enumeration values:
DocumentChanged 
DocumentOpened 
GotVisible 

Definition at line 109 of file fileselector_widget.h.


Constructor & Destructor Documentation

KDevFileSelector::KDevFileSelector (  FileSelectorPart *  part,
KDevMainWindow *  mainWindow = 0,
KDevPartController *  partController = 0,
QWidget *  parent = 0,
const char *  name = 0
) 
 

Definition at line 123 of file fileselector_widget.cpp.

References acSyncDir, KActionCollection::action(), KDirOperator::actionCollection(), bookmarkHandler, btnFilter, btnFilterClick(), cmbPath, cmbPathActivated(), cmbPathReturnPressed(), dir, dirFinishedLoading(), dirUrlEntered(), filter, m_part, mActionCollection, KActionMenu::popupMenu(), setActiveDocumentDir(), KCompletionBase::setCompletionObject(), KActionMenu::setDelayed(), setDir(), KToolBar::setEnableContextMenu(), KToolBar::setFlat(), KToolBar::setIconSize(), KToolBar::setIconText(), KDevFileSelectorToolBar::setMovingEnabled(), KAction::setShortcut(), KDevFileSelectorToolBarParent::setToolBar(), KDirOperator::setView(), silenceQToolBar(), slotFilterChange(), toolbar, viewChanged(), and waitingUrl.

KDevFileSelector::~KDevFileSelector (   ) 
 

Definition at line 236 of file fileselector_widget.cpp.

References KInstance::config(), KXMLGUIClient::instance(), m_part, and writeConfig().


Member Function Documentation

KActionCollection* KDevFileSelector::actionCollection (   )  [inline]
 

Definition at line 120 of file fileselector_widget.h.

Referenced by KFSConfigPage::init().

KURL KDevFileSelector::activeDocumentUrl (   )  [protected]
 

Definition at line 571 of file fileselector_widget.cpp.

References KParts::PartManager::activePart(), partController, and KParts::ReadOnlyPart::url().

Referenced by autoSync(), setActiveDocumentDir(), and viewChanged().

void KDevFileSelector::autoSync (  KParts::Part *   )  [private, slot]
 

Definition at line 455 of file fileselector_widget.cpp.

References kdDebug(), setDir(), KParts::ReadOnlyPart::url(), and waitingUrl.

void KDevFileSelector::autoSync (   )  [private, slot]
 

Definition at line 437 of file fileselector_widget.cpp.

References activeDocumentUrl(), KURL::directory(), KURL::isEmpty(), kdDebug(), setActiveDocumentDir(), and waitingUrl.

Referenced by readConfig().

void KDevFileSelector::btnFilterClick (   )  [private, slot]
 

Definition at line 423 of file fileselector_widget.cpp.

References btnFilter, filter, lastFilter, and slotFilterChange().

Referenced by KDevFileSelector().

void KDevFileSelector::cmbPathActivated (  const KURL &  u  )  [private, slot]
 

Definition at line 392 of file fileselector_widget.cpp.

References cmbPathReturnPressed(), and KURL::url().

Referenced by KDevFileSelector().

void KDevFileSelector::cmbPathReturnPressed (  const QString &  u  )  [private, slot]
 

Definition at line 397 of file fileselector_widget.cpp.

References cmbPath, dir, KDirOperator::setURL(), KURLComboBox::setURLs(), and KURLComboBox::urls.

Referenced by cmbPathActivated(), and KDevFileSelector().

void KDevFileSelector::dirFinishedLoading (   )  [private, slot]
 

Definition at line 412 of file fileselector_widget.cpp.

Referenced by KDevFileSelector().

KDevDirOperator* KDevFileSelector::dirOperator (   )  [inline]
 

Definition at line 119 of file fileselector_widget.h.

Referenced by KBookmarkHandler::currentURL(), and KFSConfigPage::init().

void KDevFileSelector::dirUrlEntered (  const KURL &  u  )  [private, slot]
 

Definition at line 407 of file fileselector_widget.cpp.

References cmbPath, and KURLComboBox::setURL().

Referenced by KDevFileSelector().

bool KDevFileSelector::eventFilter (  QObject *  o,
QEvent *  e
)  [protected]
 

Todo:
  • move the listbox to a suitable place if nessecary

- decide if it is worth caching the size while untill the contents are changed.

- same thing for the completion popup?

Definition at line 521 of file fileselector_widget.cpp.

References cmbPath, KDevMainWindow::main(), and mainwin.

void KDevFileSelector::focusInEvent (  QFocusEvent *   )  [protected]
 

Definition at line 499 of file fileselector_widget.cpp.

References dir.

void KDevFileSelector::initialDirChangeHack (   )  [private, slot]
 

Definition at line 294 of file fileselector_widget.cpp.

References setDir(), and waitingDir.

Referenced by readConfig().

void KDevFileSelector::readConfig (  KConfig *  config,
const QString &  name
) 
 

Definition at line 244 of file fileselector_widget.cpp.

References autoSync(), autoSyncEvents, cmbPath, dir, filter, initialDirChangeHack(), lastFilter, partController, KConfigBase::readBoolEntry(), KDirOperator::readConfig(), KConfigBase::readEntry(), KConfigBase::readListEntry(), KConfigBase::readNumEntry(), KConfigBase::readPathEntry(), KConfigBase::readPathListEntry(), KConfigBase::setGroup(), KHistoryCombo::setHistoryItems(), KURLComboBox::setMaxItems(), setupToolbar(), KURLComboBox::setURLs(), KDirOperator::setView(), slotFilterChange(), viewChanged(), and waitingDir.

void KDevFileSelector::setActiveDocumentDir (   )  [private, slot]
 

Fixme:
crash on shutdown

Definition at line 480 of file fileselector_widget.cpp.

References activeDocumentUrl(), KURL::isEmpty(), setDir(), and KURL::upURL().

Referenced by autoSync(), KDevFileSelector(), and showEvent().

void KDevFileSelector::setDir (  const QString &  url  )  [inline, slot]
 

Definition at line 125 of file fileselector_widget.h.

References setDir().

void KDevFileSelector::setDir (  KURL   )  [slot]
 

Definition at line 383 of file fileselector_widget.cpp.

References dir, and KDirOperator::setURL().

Referenced by autoSync(), initialDirChangeHack(), KDevFileSelector(), setActiveDocumentDir(), setDir(), and showEvent().

void KDevFileSelector::setupToolbar (  KConfig *   ) 
 

Definition at line 299 of file fileselector_widget.cpp.

References KActionCollection::action(), KDirOperator::actionCollection(), KToolBar::clear(), dir, mActionCollection, KAction::plug(), KConfigBase::readListEntry(), and toolbar.

Referenced by KFSConfigPage::apply(), and readConfig().

void KDevFileSelector::setView (  KFile::FileView   ) 
 

Definition at line 348 of file fileselector_widget.cpp.

References dir, and KDirOperator::setView().

void KDevFileSelector::showEvent (  QShowEvent *   )  [protected]
 

Definition at line 504 of file fileselector_widget.cpp.

References autoSyncEvents, kdDebug(), setActiveDocumentDir(), setDir(), and waitingUrl.

void KDevFileSelector::slotFilterChange (  const QString &   )  [slot]
 

Definition at line 357 of file fileselector_widget.cpp.

References btnFilter, KDirOperator::clearFilter(), dir, empty(), filter, lastFilter, KDirOperator::setNameFilter(), and KDirOperator::updateDir().

Referenced by btnFilterClick(), KDevFileSelector(), and readConfig().

void KDevFileSelector::viewChanged (   )  [private, slot]
 

Todo:
make sure the button is disabled if the directory is unreadable, eg the document URL has protocol http

Definition at line 488 of file fileselector_widget.cpp.

References acSyncDir, activeDocumentUrl(), URLUtil::directory(), and KAction::setEnabled().

Referenced by KDevFileSelector(), and readConfig().

void KDevFileSelector::writeConfig (  KConfig *  ,
const QString & 
) 
 

Definition at line 322 of file fileselector_widget.cpp.

References autoSyncEvents, cmbPath, dir, filter, KHistoryCombo::historyItems, lastFilter, KURLComboBox::maxItems, KConfigBase::setGroup(), KDirOperator::writeConfig(), KConfigBase::writeEntry(), and KConfigBase::writePathEntry().

Referenced by ~KDevFileSelector().


Friends And Related Function Documentation

friend class KFSConfigPage [friend]
 

Definition at line 105 of file fileselector_widget.h.


Member Data Documentation

class KAction* KDevFileSelector::acSyncDir [private]
 

Definition at line 150 of file fileselector_widget.h.

Referenced by KDevFileSelector(), and viewChanged().

int KDevFileSelector::autoSyncEvents [private]
 

Definition at line 159 of file fileselector_widget.h.

Referenced by KFSConfigPage::apply(), KFSConfigPage::init(), readConfig(), showEvent(), and writeConfig().

class KBookmarkHandler* KDevFileSelector::bookmarkHandler [private]
 

Definition at line 147 of file fileselector_widget.h.

Referenced by KDevFileSelector().

class QToolButton* KDevFileSelector::btnFilter [private]
 

Definition at line 152 of file fileselector_widget.h.

Referenced by btnFilterClick(), KDevFileSelector(), and slotFilterChange().

KURLComboBox* KDevFileSelector::cmbPath [private]
 

Definition at line 148 of file fileselector_widget.h.

Referenced by KFSConfigPage::apply(), cmbPathReturnPressed(), dirUrlEntered(), eventFilter(), KFSConfigPage::init(), KDevFileSelector(), readConfig(), and writeConfig().

KDevDirOperator* KDevFileSelector::dir [private]
 

Definition at line 149 of file fileselector_widget.h.

Referenced by cmbPathReturnPressed(), focusInEvent(), KDevFileSelector(), readConfig(), setDir(), setupToolbar(), setView(), slotFilterChange(), and writeConfig().

KHistoryCombo* KDevFileSelector::filter [private]
 

Definition at line 151 of file fileselector_widget.h.

Referenced by KFSConfigPage::apply(), btnFilterClick(), KFSConfigPage::init(), KDevFileSelector(), readConfig(), slotFilterChange(), and writeConfig().

QString KDevFileSelector::lastFilter [private]
 

Definition at line 158 of file fileselector_widget.h.

Referenced by btnFilterClick(), readConfig(), slotFilterChange(), and writeConfig().

FileSelectorPart* KDevFileSelector::m_part [private]
 

Definition at line 154 of file fileselector_widget.h.

Referenced by KFSConfigPage::apply(), KFSConfigPage::init(), KDevFileSelector(), and ~KDevFileSelector().

KActionCollection* KDevFileSelector::mActionCollection [private]
 

Definition at line 146 of file fileselector_widget.h.

Referenced by KDevFileSelector(), and setupToolbar().

KDevMainWindow* KDevFileSelector::mainwin [private]
 

Definition at line 155 of file fileselector_widget.h.

Referenced by eventFilter().

KDevPartController* KDevFileSelector::partController [private]
 

Definition at line 156 of file fileselector_widget.h.

Referenced by activeDocumentUrl(), KFSConfigPage::apply(), and readConfig().

class KDevFileSelectorToolBar* KDevFileSelector::toolbar [private]
 

Definition at line 145 of file fileselector_widget.h.

Referenced by KDevFileSelector(), and setupToolbar().

QString KDevFileSelector::waitingDir [private]
 

Definition at line 161 of file fileselector_widget.h.

Referenced by initialDirChangeHack(), and readConfig().

QString KDevFileSelector::waitingUrl [private]
 

Definition at line 160 of file fileselector_widget.h.

Referenced by autoSync(), KDevFileSelector(), and showEvent().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:40:06 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003