• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KFile

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KDirOperator Class Reference

#include <kdiroperator.h>

Inheritance diagram for KDirOperator:
Inheritance graph
[legend]

Public Types

enum  ActionType {
  SortActions = 1, ViewActions = 2, NavActions = 4, FileActions = 8,
  AllActions = 15
}
 

Public Slots

virtual void back ()
 
virtual void cdUp ()
 
virtual void deleteSelected ()
 
virtual void forward ()
 
virtual void home ()
 
QString makeCompletion (const QString &)
 
QString makeDirCompletion (const QString &)
 
virtual void mkdir ()
 
virtual void rereadDir ()
 
void setIconsZoom (int value)
 
virtual void trashSelected ()
 
void updateDir ()
 
void updateSelectionDependentActions ()
 

Signals

void completion (const QString &)
 
void contextMenuAboutToShow (const KFileItem &item, QMenu *menu)
 
void currentIconSizeChanged (int size)
 
void dirActivated (const KFileItem &item)
 
void dropped (const KFileItem &item, QDropEvent *event, const KUrl::List &urls)
 
void fileHighlighted (const KFileItem &item)
 
void fileSelected (const KFileItem &item)
 
void finishedLoading ()
 
void updateInformation (int files, int dirs)
 
void urlEntered (const KUrl &)
 
void viewChanged (QAbstractItemView *newView)
 

Public Member Functions

 KDirOperator (const KUrl &urlName=KUrl(), QWidget *parent=0)
 
virtual ~KDirOperator ()
 
KActionCollection * actionCollection () const
 
void clearFilter ()
 
void clearHistory ()
 
void close ()
 
KCompletion * completionObject () const
 
QStyleOptionViewItem::Position decorationPosition () const
 
virtual KIO::DeleteJob * del (const KFileItemList &items, QWidget *parent=0, bool ask=true, bool showProgress=true)
 
KCompletion * dirCompletionObject () const
 
bool dirHighlighting () const
 
KDirLister * dirLister () const
 
bool dirOnlyMode () const
 
int iconsZoom () const
 
bool isInlinePreviewShown () const
 
bool isRoot () const
 
bool isSaving () const
 
bool isSelected (const KFileItem &item) const
 
QStringList mimeFilter () const
 
virtual bool mkdir (const QString &directory, bool enterDirectory=true)
 
KFile::Modes mode () const
 
QString nameFilter () const
 
QStringList newFileMenuSupportedMimeTypes () const
 
int numDirs () const
 
int numFiles () const
 
bool onlyDoubleClickSelectsFiles () const
 
KFilePreviewGenerator * previewGenerator () const
 
QProgressBar * progressBar () const
 
virtual void readConfig (const KConfigGroup &configGroup)
 
KFileItemList selectedItems () const
 
virtual void setAcceptDrops (bool b)
 
void setCurrentItem (const QString &url)
 
void setCurrentItem (const KFileItem &item)
 
void setCurrentItems (const QStringList &urls)
 
void setCurrentItems (const KFileItemList &items)
 
void setDecorationPosition (QStyleOptionViewItem::Position position)
 
virtual void setDropOptions (int options)
 
virtual void setEnableDirHighlighting (bool enable)
 
void setInlinePreviewShown (bool show)
 
void setIsSaving (bool isSaving)
 
void setMimeFilter (const QStringList &mimetypes)
 
virtual void setMode (KFile::Modes m)
 
void setNameFilter (const QString &filter)
 
void setNewFileMenuSupportedMimeTypes (const QStringList &mime)
 
void setOnlyDoubleClickSelectsFiles (bool enable)
 
virtual void setPreviewWidget (KPreviewWidgetBase *w)
 
virtual void setShowHiddenFiles (bool s)
 
void setSorting (QDir::SortFlags)
 
void setupMenu (int whichActions)
 
virtual void setUrl (const KUrl &url, bool clearforward)
 
virtual void setView (QAbstractItemView *view)
 
virtual void setView (KFile::FileView viewKind)
 
virtual void setViewConfig (KConfigGroup &configGroup)
 
bool showHiddenFiles () const
 
QDir::SortFlags sorting () const
 
virtual KIO::CopyJob * trash (const KFileItemList &items, QWidget *parent, bool ask=true, bool showProgress=true)
 
KUrl url () const
 
QAbstractItemView * view () const
 
KConfigGroup * viewConfigGroup () const
 
virtual void writeConfig (KConfigGroup &configGroup)
 
- Public Member Functions inherited from QWidget
 QWidget (QWidget *parent, QFlags< Qt::WindowType > f)
 
 QWidget (QWidget *parent, const char *name, QFlags< Qt::WindowType > f)
 
 ~QWidget ()
 
bool acceptDrops () const
 
QString accessibleDescription () const
 
QString accessibleName () const
 
QList< QAction * > actions () const
 
void activateWindow ()
 
void addAction (QAction *action)
 
void addActions (QList< QAction * > actions)
 
void adjustSize ()
 
bool autoFillBackground () const
 
Qt::BackgroundMode backgroundMode () const
 
QPoint backgroundOffset () const
 
BackgroundOrigin backgroundOrigin () const
 
QPalette::ColorRole backgroundRole () const
 
QSize baseSize () const
 
QString caption () const
 
QWidget * childAt (int x, int y, bool includeThis) const
 
QWidget * childAt (const QPoint &p, bool includeThis) const
 
QWidget * childAt (int x, int y) const
 
QWidget * childAt (const QPoint &p) const
 
QRect childrenRect () const
 
QRegion childrenRegion () const
 
void clearFocus ()
 
void clearMask ()
 
bool close (bool alsoDelete)
 
bool close ()
 
QColorGroup colorGroup () const
 
void constPolish () const
 
QMargins contentsMargins () const
 
QRect contentsRect () const
 
Qt::ContextMenuPolicy contextMenuPolicy () const
 
QCursor cursor () const
 
void customContextMenuRequested (const QPoint &pos)
 
void drawText (const QPoint &p, const QString &s)
 
void drawText (int x, int y, const QString &s)
 
WId effectiveWinId () const
 
void ensurePolished () const
 
void erase ()
 
void erase (const QRect &rect)
 
void erase (const QRegion &rgn)
 
void erase (int x, int y, int w, int h)
 
Qt::FocusPolicy focusPolicy () const
 
QWidget * focusProxy () const
 
QWidget * focusWidget () const
 
const QFont & font () const
 
QFontInfo fontInfo () const
 
QFontMetrics fontMetrics () const
 
QPalette::ColorRole foregroundRole () const
 
QRect frameGeometry () const
 
QSize frameSize () const
 
const QRect & geometry () const
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 
virtual HDC getDC () const
 
void grabGesture (Qt::GestureType gesture, QFlags< Qt::GestureFlag > flags)
 
void grabKeyboard ()
 
void grabMouse ()
 
void grabMouse (const QCursor &cursor)
 
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context)
 
QGraphicsEffect * graphicsEffect () const
 
QGraphicsProxyWidget * graphicsProxyWidget () const
 
bool hasEditFocus () const
 
bool hasFocus () const
 
bool hasMouse () const
 
bool hasMouseTracking () const
 
int height () const
 
virtual int heightForWidth (int w) const
 
void hide ()
 
const QPixmap * icon () const
 
void iconify ()
 
QString iconText () const
 
QInputContext * inputContext ()
 
Qt::InputMethodHints inputMethodHints () const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
void insertAction (QAction *before, QAction *action)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
bool isActiveWindow () const
 
bool isAncestorOf (const QWidget *child) const
 
bool isDesktop () const
 
bool isDialog () const
 
bool isEnabled () const
 
bool isEnabledTo (QWidget *ancestor) const
 
bool isEnabledToTLW () const
 
bool isFullScreen () const
 
bool isHidden () const
 
bool isInputMethodEnabled () const
 
bool isMaximized () const
 
bool isMinimized () const
 
bool isModal () const
 
bool isPopup () const
 
bool isShown () const
 
bool isTopLevel () const
 
bool isUpdatesEnabled () const
 
bool isVisible () const
 
bool isVisibleTo (QWidget *ancestor) const
 
bool isVisibleToTLW () const
 
bool isWindow () const
 
bool isWindowModified () const
 
QLayout * layout () const
 
Qt::LayoutDirection layoutDirection () const
 
QLocale locale () const
 
void lower ()
 
Qt::HANDLE macCGHandle () const
 
Qt::HANDLE macQDHandle () const
 
QPoint mapFrom (QWidget *parent, const QPoint &pos) const
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapFromParent (const QPoint &pos) const
 
QPoint mapTo (QWidget *parent, const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QPoint mapToParent (const QPoint &pos) const
 
QRegion mask () const
 
int maximumHeight () const
 
QSize maximumSize () const
 
int maximumWidth () const
 
int minimumHeight () const
 
QSize minimumSize () const
 
virtual QSize minimumSizeHint () const
 
int minimumWidth () const
 
void move (int x, int y)
 
void move (const QPoint &)
 
QWidget * nativeParentWidget () const
 
QWidget * nextInFocusChain () const
 
QRect normalGeometry () const
 
void overrideWindowFlags (QFlags< Qt::WindowType > flags)
 
bool ownCursor () const
 
bool ownFont () const
 
bool ownPalette () const
 
virtual QPaintEngine * paintEngine () const
 
const QPalette & palette () const
 
QWidget * parentWidget (bool sameWindow) const
 
QWidget * parentWidget () const
 
QPlatformWindow * platformWindow () const
 
QPlatformWindowFormat platformWindowFormat () const
 
void polish ()
 
QPoint pos () const
 
QWidget * previousInFocusChain () const
 
void raise ()
 
void recreate (QWidget *parent, QFlags< Qt::WindowType > f, const QPoint &p, bool showIt)
 
QRect rect () const
 
virtual void releaseDC (HDC hdc) const
 
void releaseKeyboard ()
 
void releaseMouse ()
 
void releaseShortcut (int id)
 
void removeAction (QAction *action)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QFlags< QWidget::RenderFlag > renderFlags)
 
void render (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QFlags< QWidget::RenderFlag > renderFlags)
 
void repaint (int x, int y, int w, int h, bool b)
 
void repaint (const QRegion &rgn, bool b)
 
void repaint ()
 
void repaint (int x, int y, int w, int h)
 
void repaint (const QRegion &rgn)
 
void repaint (bool b)
 
void repaint (const QRect &rect)
 
void repaint (const QRect &r, bool b)
 
void reparent (QWidget *parent, QFlags< Qt::WindowType > f, const QPoint &p, bool showIt)
 
void reparent (QWidget *parent, const QPoint &p, bool showIt)
 
void resize (int w, int h)
 
void resize (const QSize &)
 
bool restoreGeometry (const QByteArray &geometry)
 
QByteArray saveGeometry () const
 
void scroll (int dx, int dy)
 
void scroll (int dx, int dy, const QRect &r)
 
void setAcceptDrops (bool on)
 
void setAccessibleDescription (const QString &description)
 
void setAccessibleName (const QString &name)
 
void setActiveWindow ()
 
void setAttribute (Qt::WidgetAttribute attribute, bool on)
 
void setAutoFillBackground (bool enabled)
 
void setBackgroundColor (const QColor &color)
 
void setBackgroundMode (Qt::BackgroundMode widgetBackground, Qt::BackgroundMode paletteBackground)
 
void setBackgroundOrigin (BackgroundOrigin background)
 
void setBackgroundPixmap (const QPixmap &pixmap)
 
void setBackgroundRole (QPalette::ColorRole role)
 
void setBaseSize (const QSize &)
 
void setBaseSize (int basew, int baseh)
 
void setCaption (const QString &c)
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void setCursor (const QCursor &)
 
void setDisabled (bool disable)
 
void setEditFocus (bool enable)
 
void setEnabled (bool)
 
void setEraseColor (const QColor &color)
 
void setErasePixmap (const QPixmap &pixmap)
 
void setFixedHeight (int h)
 
void setFixedSize (const QSize &s)
 
void setFixedSize (int w, int h)
 
void setFixedWidth (int w)
 
void setFocus (Qt::FocusReason reason)
 
void setFocus ()
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
void setFocusProxy (QWidget *w)
 
void setFont (const QFont &)
 
void setFont (const QFont &f, bool b)
 
void setForegroundRole (QPalette::ColorRole role)
 
void setGeometry (int x, int y, int w, int h)
 
void setGeometry (const QRect &)
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void setHidden (bool hidden)
 
void setIcon (const QPixmap &i)
 
void setIconText (const QString &it)
 
void setInputContext (QInputContext *context)
 
void setInputMethodEnabled (bool enabled)
 
void setInputMethodHints (QFlags< Qt::InputMethodHint > hints)
 
void setKeyCompression (bool b)
 
void setLayout (QLayout *layout)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
void setLocale (const QLocale &locale)
 
void setMask (const QBitmap &bitmap)
 
void setMask (const QRegion &region)
 
void setMaximumHeight (int maxh)
 
void setMaximumSize (const QSize &)
 
void setMaximumSize (int maxw, int maxh)
 
void setMaximumWidth (int maxw)
 
void setMinimumHeight (int minh)
 
void setMinimumSize (int minw, int minh)
 
void setMinimumSize (const QSize &)
 
void setMinimumWidth (int minw)
 
void setMouseTracking (bool enable)
 
void setPalette (const QPalette &)
 
void setPalette (const QPalette &p, bool b)
 
void setPaletteBackgroundColor (const QColor &color)
 
void setPaletteBackgroundPixmap (const QPixmap &pixmap)
 
void setPaletteForegroundColor (const QColor &color)
 
void setParent (QWidget *parent)
 
void setParent (QWidget *parent, QFlags< Qt::WindowType > f)
 
void setPlatformWindow (QPlatformWindow *window)
 
void setPlatformWindowFormat (const QPlatformWindowFormat &format)
 
void setShortcutAutoRepeat (int id, bool enable)
 
void setShortcutEnabled (int id, bool enable)
 
void setShown (bool shown)
 
void setSizeIncrement (const QSize &)
 
void setSizeIncrement (int w, int h)
 
void setSizePolicy (QSizePolicy::Policy hor, QSizePolicy::Policy ver, bool hfw)
 
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
 
void setSizePolicy (QSizePolicy)
 
void setStatusTip (const QString &)
 
void setStyle (QStyle *style)
 
QStyle * setStyle (const QString &style)
 
void setStyleSheet (const QString &styleSheet)
 
void setToolTip (const QString &)
 
void setUpdatesEnabled (bool enable)
 
void setupUi (QWidget *widget)
 
virtual void setVisible (bool visible)
 
void setWhatsThis (const QString &)
 
void setWindowFilePath (const QString &filePath)
 
void setWindowFlags (QFlags< Qt::WindowType > type)
 
void setWindowIcon (const QIcon &icon)
 
void setWindowIconText (const QString &)
 
void setWindowModality (Qt::WindowModality windowModality)
 
void setWindowModified (bool)
 
void setWindowOpacity (qreal level)
 
void setWindowRole (const QString &role)
 
void setWindowState (QFlags< Qt::WindowState > windowState)
 
void setWindowSurface (QWindowSurface *surface)
 
void setWindowTitle (const QString &)
 
void show ()
 
void showFullScreen ()
 
void showMaximized ()
 
void showMinimized ()
 
void showNormal ()
 
QSize size () const
 
virtual QSize sizeHint () const
 
QSize sizeIncrement () const
 
QSizePolicy sizePolicy () const
 
void stackUnder (QWidget *w)
 
QString statusTip () const
 
QStyle * style () const
 
QString styleSheet () const
 
bool testAttribute (Qt::WidgetAttribute attribute) const
 
QString toolTip () const
 
QWidget * topLevelWidget () const
 
bool underMouse () const
 
void ungrabGesture (Qt::GestureType gesture)
 
void unsetCursor ()
 
void unsetFont ()
 
void unsetLayoutDirection ()
 
void unsetLocale ()
 
void unsetPalette ()
 
void update (const QRect &rect)
 
void update (const QRegion &rgn)
 
void update (int x, int y, int w, int h)
 
void update ()
 
void updateGeometry ()
 
bool updatesEnabled () const
 
QRect visibleRect () const
 
QRegion visibleRegion () const
 
QString whatsThis () const
 
int width () const
 
QWidget * window () const
 
QString windowFilePath () const
 
Qt::WindowFlags windowFlags () const
 
QIcon windowIcon () const
 
QString windowIconText () const
 
Qt::WindowModality windowModality () const
 
qreal windowOpacity () const
 
QString windowRole () const
 
Qt::WindowStates windowState () const
 
QWindowSurface * windowSurface () const
 
QString windowTitle () const
 
Qt::WindowType windowType () const
 
WId winId () const
 
int x () const
 
const QX11Info & x11Info () const
 
Qt::HANDLE x11PictureHandle () const
 
int y () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 
- Public Member Functions inherited from QPaintDevice
virtual  ~QPaintDevice ()
 
int colorCount () const
 
int depth () const
 
int height () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int numColors () const
 
virtual QPaintEngine * paintEngine () const =0
 
bool paintingActive () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
int width () const
 
int widthMM () const
 
int x11Cells () const
 
Qt::HANDLE x11Colormap () const
 
bool x11DefaultColormap () const
 
bool x11DefaultVisual () const
 
int x11Depth () const
 
Display * x11Display () const
 
int x11Screen () const
 
void * x11Visual () const
 

Static Public Member Functions

static bool dirOnlyMode (uint mode)
 
- Static Public Member Functions inherited from QWidget
QWidget * find (WId id)
 
QWidget * keyboardGrabber ()
 
QWidget * mouseGrabber ()
 
void setTabOrder (QWidget *first, QWidget *second)
 
QWidgetMapper * wmapper ()
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Public Member Functions inherited from QPaintDevice
int x11AppCells (int screen)
 
Qt::HANDLE x11AppColormap (int screen)
 
bool x11AppDefaultColormap (int screen)
 
bool x11AppDefaultVisual (int screen)
 
int x11AppDepth (int screen)
 
Display * x11AppDisplay ()
 
int x11AppDpiX (int screen)
 
int x11AppDpiY (int screen)
 
Qt::HANDLE x11AppRootWindow (int screen)
 
int x11AppScreen ()
 
void * x11AppVisual (int screen)
 
void x11SetAppDpiX (int dpi, int screen)
 
void x11SetAppDpiY (int dpi, int screen)
 

Protected Slots

void highlightFile (const KFileItem &item)
 
void pathChanged ()
 
void resetCursor ()
 
virtual void selectDir (const KFileItem &item)
 
void selectFile (const KFileItem &item)
 
void slotCompletionMatch (const QString &match)
 
void sortByDate ()
 
void sortByName ()
 
void sortBySize ()
 
void sortByType ()
 
void sortReversed ()
 
void toggleDirsFirst ()
 
void toggleIgnoreCase ()
 

Protected Member Functions

virtual void activatedMenu (const KFileItem &item, const QPoint &pos)
 
virtual void changeEvent (QEvent *event)
 
bool checkPreviewSupport ()
 
virtual QAbstractItemView * createView (QWidget *parent, KFile::FileView viewKind)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
void prepareCompletionObjects ()
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void setDirLister (KDirLister *lister)
 
void setupActions ()
 
void setupMenu ()
 
void updateSortActions ()
 
void updateViewActions ()
 
- Protected Member Functions inherited from QWidget
virtual void actionEvent (QActionEvent *event)
 
virtual void closeEvent (QCloseEvent *event)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
void create (WId window, bool initializeWindow, bool destroyOldWindow)
 
void destroy (bool destroyWindow, bool destroySubWindows)
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual void enterEvent (QEvent *event)
 
virtual bool event (QEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
bool focusNextChild ()
 
virtual bool focusNextPrevChild (bool next)
 
virtual void focusOutEvent (QFocusEvent *event)
 
bool focusPreviousChild ()
 
virtual void hideEvent (QHideEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void languageChange ()
 
virtual void leaveEvent (QEvent *event)
 
virtual bool macEvent (EventHandlerCallRef caller, EventRef event)
 
virtual int metric (PaintDeviceMetric m) const
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void moveEvent (QMoveEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual bool qwsEvent (QWSEvent *event)
 
void resetInputContext ()
 
virtual void showEvent (QShowEvent *event)
 
virtual void tabletEvent (QTabletEvent *event)
 
void updateMicroFocus ()
 
virtual void wheelEvent (QWheelEvent *event)
 
virtual bool winEvent (MSG *message, long *result)
 
virtual bool x11Event (XEvent *event)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice ()
 

Additional Inherited Members

- Public Attributes inherited from QWidget
typedef RenderFlags
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QWidget
 acceptDrops
 
 accessibleDescription
 
 accessibleName
 
 autoFillBackground
 
 baseSize
 
 childrenRect
 
 childrenRegion
 
 contextMenuPolicy
 
 cursor
 
 enabled
 
 focus
 
 focusPolicy
 
 font
 
 frameGeometry
 
 frameSize
 
 fullScreen
 
 geometry
 
 height
 
 inputMethodHints
 
 isActiveWindow
 
 layoutDirection
 
 locale
 
 maximized
 
 maximumHeight
 
 maximumSize
 
 maximumWidth
 
 minimized
 
 minimumHeight
 
 minimumSize
 
 minimumSizeHint
 
 minimumWidth
 
 modal
 
 mouseTracking
 
 normalGeometry
 
 palette
 
 pos
 
 rect
 
 size
 
 sizeHint
 
 sizeIncrement
 
 sizePolicy
 
 statusTip
 
 styleSheet
 
 toolTip
 
 updatesEnabled
 
 visible
 
 whatsThis
 
 width
 
 windowFilePath
 
 windowFlags
 
 windowIcon
 
 windowIconText
 
 windowModality
 
 windowModified
 
 windowOpacity
 
 windowTitle
 
 x
 
 y
 
- Properties inherited from QObject
 objectName
 

Detailed Description

This widget works as a network transparent filebrowser.

You specify a URL to display and this url will be loaded via KDirLister. The user can browse through directories, highlight and select files, delete or rename files.

It supports different views, e.g. a detailed view (see KFileDetailView), a simple icon view (see KFileIconView), a combination of two views, separating directories and files ( KCombiView).

Additionally, a preview view is available (see KFilePreview), which can show either a simple or detailed view and additionally a preview widget (see setPreviewWidget()). KImageFilePreview is one implementation of a preview widget, that displays previews for all supported filetypes utilizing KIO::PreviewJob.

Currently, those classes don't support Drag&Drop out of the box – there you have to use your own view-classes. You can use some DnD-aware views from Björn Sahlström bjorn.nosp@m.@kbe.nosp@m.ar.or.nosp@m.g until they will be integrated into this library. See http://devel-home.kde.org/~pfeiffer/DnD-classes.tar.gz

This widget is the one used in the KFileDialog.

Basic usage is like this:

KDirOperator *op = new KDirOperator( KUrl( "file:/home/gis" ), this );
// some signals you might be interested in
connect(op, SIGNAL(urlEntered(const KUrl&)),
SLOT(urlEntered(const KUrl&)));
connect(op, SIGNAL(fileHighlighted(const KFileItem &)),
SLOT(fileHighlighted(const KFileItem &)));
connect(op, SIGNAL(fileSelected(const KFileItem &)),
SLOT(fileSelected(const KFileItem &)));
connect(op, SIGNAL(finishedLoading()),
SLOT(slotLoadingFinished()));
KConfigGroup grp(KGlobal::config(),"Your KDiroperator ConfigGroup" );
op->readConfig( &grp);
op->setView(KFile::Default);

This will create a childwidget of 'this' showing the directory contents of /home/gis in the default-view. The view is determined by the readConfig() call, which will read the KDirOperator settings, the user left your program with (and which you saved with op->writeConfig()).

A widget for displaying files and browsing directories.

Author
Stephan Kulow coolo.nosp@m.@kde.nosp@m..org, Carsten Pfeiffer pfeif.nosp@m.fer@.nosp@m.kde.o.nosp@m.rg

Definition at line 101 of file kdiroperator.h.

Member Enumeration Documentation

enum KDirOperator::ActionType

The various action types.

These values can be or'd together

Enumerator
SortActions 
ViewActions 
NavActions 
FileActions 
AllActions 

Definition at line 109 of file kdiroperator.h.

Constructor & Destructor Documentation

KDirOperator::KDirOperator ( const KUrl &  urlName = KUrl(),
QWidget *  parent = 0 
)
explicit

Constructs the KDirOperator with no initial view.

As the views are configurable, call readConfig() to load the user's configuration and then setView to explicitly set a view.

This constructor doesn't start loading the url, setView will do it.

Definition at line 371 of file kdiroperator.cpp.

KDirOperator::~KDirOperator ( )
virtual

Destroys the KDirOperator.

Definition at line 428 of file kdiroperator.cpp.

Member Function Documentation

KActionCollection * KDirOperator::actionCollection ( ) const

an accessor to a collection of all available Actions.

The actions are static, they will be there all the time (no need to connect to the signals KActionCollection::inserted() or removed().

There are the following actions:

  • popupMenu : an ActionMenu presenting a popupmenu with all actions
  • up : changes to the parent directory
  • back : goes back to the previous directory
  • forward : goes forward in the history
  • home : changes to the user's home directory
  • reload : reloads the current directory
  • mkdir : opens a dialog box to create a directory
  • delete : deletes the selected files/directories
  • sorting menu : an ActionMenu containing all sort-options
  • by name : sorts by name
  • by size : sorts by size
  • by date : sorts by date
  • by type : sorts by type
  • descending : reverses the sort order
  • view menu : an ActionMenu containing all actions concerning the view
  • short view : shows a simple fileview
  • detailed view : shows a detailed fileview (dates, permissions ,...)
  • show hidden : shows hidden files
  • preview : shows a preview next to the fileview
  • properties : shows a KPropertiesDialog for the selected files

The short and detailed view are in an exclusive group. The sort-by actions are in an exclusive group as well. Also the "separate dirs", "preview" and "single" actions are in an exclusive group.

You can e.g. use

actionCollection()->action( "up" )->plug( someToolBar );

to add a button into a toolbar, which makes the dirOperator change to its parent directory.

Returns
all available Actions

Definition at line 593 of file kdiroperator.cpp.

void KDirOperator::activatedMenu ( const KFileItem &  item,
const QPoint &  pos 
)
protectedvirtual

Called upon right-click to activate the popupmenu.

Definition at line 1301 of file kdiroperator.cpp.

void KDirOperator::back ( )
virtualslot

Goes one step back in the history and opens that url.

Definition at line 1205 of file kdiroperator.cpp.

void KDirOperator::cdUp ( )
virtualslot

Goes one directory up from the current url.

Definition at line 1236 of file kdiroperator.cpp.

void KDirOperator::changeEvent ( QEvent *  event)
protectedvirtual

Reimplemented from QWidget.

Definition at line 1315 of file kdiroperator.cpp.

bool KDirOperator::checkPreviewSupport ( )
protected

Checks if there support from KIO::PreviewJob for the currently shown files, taking mimeFilter() and nameFilter() into account Enables/disables the preview-action accordingly.

Definition at line 1288 of file kdiroperator.cpp.

void KDirOperator::clearFilter ( )

Clears both the namefilter and mimetype filter, so that all files and directories will be shown.

Call updateDir() to apply it.

See also
setMimeFilter
setNameFilter

Definition at line 1249 of file kdiroperator.cpp.

void KDirOperator::clearHistory ( )

Clears the forward and backward history.

Definition at line 2295 of file kdiroperator.cpp.

void KDirOperator::close ( )

Stops loading immediately.

You don't need to call this, usually.

Definition at line 959 of file kdiroperator.cpp.

void KDirOperator::completion ( const QString &  )
signal
KCompletion * KDirOperator::completionObject ( ) const
Returns
a KCompletion object, containing all filenames and directories of the current directory/URL. You can use it to insert it into a KLineEdit or KComboBox Note: it will only contain files, after prepareCompletionObjects() has been called. It will be implicitly called from makeCompletion() or makeDirCompletion()

Definition at line 583 of file kdiroperator.cpp.

void KDirOperator::contextMenuAboutToShow ( const KFileItem &  item,
QMenu *  menu 
)
signal

Emitted just before the context menu is shown, allows users to extend the menu with custom actions.

Parameters
itemthe file on which the context menu was invoked
menuthe context menu, pre-populated with the file-management actions
Since
4.2
QAbstractItemView * KDirOperator::createView ( QWidget *  parent,
KFile::FileView  viewKind 
)
protectedvirtual

A view factory for creating predefined fileviews.

Called internally by setView, but you can also call it directly. Reimplement this if you depend on self defined fileviews.

Parameters
parentis the QWidget to be set as parent
viewKindis the predefined view to be set, note: this can be several ones OR:ed together
Returns
the created view
See also
KFile::FileView
setView

Definition at line 1442 of file kdiroperator.cpp.

void KDirOperator::currentIconSizeChanged ( int  size)
signal

Will notify that the icon size has changed.

Since we save the icon size depending on the view type (list view or a different kind of view), a call to setView() can trigger this signal to be emitted.

Since
4.2
QStyleOptionViewItem::Position KDirOperator::decorationPosition ( ) const

Returns the position where icons are shown relative to the labels of file items in the icon view.

Since
4.2.3

Definition at line 2608 of file kdiroperator.cpp.

KIO::DeleteJob * KDirOperator::del ( const KFileItemList &  items,
QWidget *  parent = 0,
bool  ask = true,
bool  showProgress = true 
)
virtual

Starts and returns a KIO::DeleteJob to delete the given items.

Parameters
itemsthe list of items to be deleted
parentthe parent widget used for the confirmation dialog
askspecifies whether a confirmation dialog should be shown
showProgresspassed to the DeleteJob to show a progress dialog

Definition at line 775 of file kdiroperator.cpp.

void KDirOperator::deleteSelected ( )
virtualslot

Deletes the currently selected files/directories.

Definition at line 829 of file kdiroperator.cpp.

void KDirOperator::dirActivated ( const KFileItem &  item)
signal
KCompletion * KDirOperator::dirCompletionObject ( ) const
Returns
a KCompletion object, containing only all directories of the current directory/URL. You can use it to insert it into a KLineEdit or KComboBox Note: it will only contain directories, after prepareCompletionObjects() has been called. It will be implicitly called from makeCompletion() or makeDirCompletion()

Definition at line 588 of file kdiroperator.cpp.

bool KDirOperator::dirHighlighting ( ) const
Returns
whether the last directory will be made the current item when going up in the directory hierarchy.

Default is false.

Definition at line 2311 of file kdiroperator.cpp.

KDirLister * KDirOperator::dirLister ( ) const
Returns
the object listing the directory

Definition at line 459 of file kdiroperator.cpp.

bool KDirOperator::dirOnlyMode ( ) const
Returns
true if we are in directory-only mode, that is, no files are shown.

Definition at line 2316 of file kdiroperator.cpp.

bool KDirOperator::dirOnlyMode ( uint  mode)
static

Definition at line 2321 of file kdiroperator.cpp.

void KDirOperator::dropped ( const KFileItem &  item,
QDropEvent *  event,
const KUrl::List &  urls 
)
signal

Emitted when files are dropped.

Dropping files is disabled by default. You need to enable it with setAcceptDrops()

Parameters
itemthe item on which the drop occurred or 0.
eventthe drop event itself.
urlsthe urls that where dropped.
bool KDirOperator::eventFilter ( QObject *  watched,
QEvent *  event 
)
protectedvirtual

Reimplemented from QObject.

Definition at line 1320 of file kdiroperator.cpp.

void KDirOperator::fileHighlighted ( const KFileItem &  item)
signal

Emitted when a file is highlighted or generally the selection changes in multiselection mode.

In the latter case, item is 0L. You can access the selected items with selectedItems().

void KDirOperator::fileSelected ( const KFileItem &  item)
signal
void KDirOperator::finishedLoading ( )
signal
void KDirOperator::forward ( )
virtualslot

Goes one step forward in the history and opens that url.

Definition at line 1219 of file kdiroperator.cpp.

void KDirOperator::highlightFile ( const KFileItem &  item)
protectedslot

Emits fileHighlighted(item)

Definition at line 1695 of file kdiroperator.cpp.

void KDirOperator::home ( )
virtualslot

Enters the home directory.

Definition at line 1243 of file kdiroperator.cpp.

int KDirOperator::iconsZoom ( ) const

Returns the icon zoom.

Since
4.2

Definition at line 902 of file kdiroperator.cpp.

bool KDirOperator::isInlinePreviewShown ( ) const

Returns whether the inline previews are shown or not.

Since
4.2

Definition at line 897 of file kdiroperator.cpp.

bool KDirOperator::isRoot ( ) const
Returns
true if we are displaying the root directory of the current url

Definition at line 446 of file kdiroperator.cpp.

bool KDirOperator::isSaving ( ) const

Returns whether KDirOperator will force a double click to accept.

Note
this is false by default
Since
4.2

Definition at line 912 of file kdiroperator.cpp.

bool KDirOperator::isSelected ( const KFileItem &  item) const
Returns
true if item is currently selected, or false otherwise.

Definition at line 562 of file kdiroperator.cpp.

void KDirOperator::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Reimplemented from QWidget.

Definition at line 181 of file kdiroperator.cpp.

QString KDirOperator::makeCompletion ( const QString &  string)
slot

Tries to complete the given string (only completes files).

Definition at line 1784 of file kdiroperator.cpp.

QString KDirOperator::makeDirCompletion ( const QString &  string)
slot

Tries to complete the given string (only completes directores).

Definition at line 1795 of file kdiroperator.cpp.

QStringList KDirOperator::mimeFilter ( ) const
Returns
the current mime filter.

Definition at line 1273 of file kdiroperator.cpp.

bool KDirOperator::mkdir ( const QString &  directory,
bool  enterDirectory = true 
)
virtual

Creates the given directory/url.

If it is a relative path, it will be completed with the current directory. If enterDirectory is true, the directory will be entered after a successful operation. If unsuccessful, a messagebox will be presented to the user.

Returns
true if the directory could be created.

Definition at line 744 of file kdiroperator.cpp.

void KDirOperator::mkdir ( )
virtualslot

Opens a dialog to create a new directory.

Definition at line 737 of file kdiroperator.cpp.

KFile::Modes KDirOperator::mode ( ) const
Returns
the listing/selection mode.

Definition at line 1506 of file kdiroperator.cpp.

QString KDirOperator::nameFilter ( ) const
Returns
the current namefilter.
See also
setNameFilter

Definition at line 1262 of file kdiroperator.cpp.

QStringList KDirOperator::newFileMenuSupportedMimeTypes ( ) const
Returns
the current Supported Mimes Types.
Since
4.5

Definition at line 1283 of file kdiroperator.cpp.

int KDirOperator::numDirs ( ) const
Returns
the number of directories in the currently listed url. Returns 0 if there is no view.

Definition at line 573 of file kdiroperator.cpp.

int KDirOperator::numFiles ( ) const
Returns
the number of files in the currently listed url. Returns 0 if there is no view.

Definition at line 578 of file kdiroperator.cpp.

bool KDirOperator::onlyDoubleClickSelectsFiles ( ) const
Returns
whether files (not directories) should only be select()ed by double-clicks.
See also
setOnlyDoubleClickSelectsFiles

Definition at line 2242 of file kdiroperator.cpp.

void KDirOperator::pathChanged ( )
protectedslot

Called after setUrl() to load the directory, update the history, etc.

Definition at line 1167 of file kdiroperator.cpp.

void KDirOperator::prepareCompletionObjects ( )
protected

Synchronizes the completion objects with the entries of the currently listed url.

Automatically called from makeCompletion() and makeDirCompletion()

Definition at line 1806 of file kdiroperator.cpp.

KFilePreviewGenerator * KDirOperator::previewGenerator ( ) const

Returns the preview generator for the current view.

Since
4.2

Definition at line 887 of file kdiroperator.cpp.

QProgressBar * KDirOperator::progressBar ( ) const
Returns
the progress widget, that is shown during directory listing. You can for example reparent() it to put it into a statusbar.

Definition at line 2290 of file kdiroperator.cpp.

void KDirOperator::readConfig ( const KConfigGroup &  configGroup)
virtual

Reads the default settings for a view, i.e.

the default KFile::FileView. Also reads the sorting and whether hidden files should be shown. Note: the default view will not be set - you have to call

setView( KFile::Default )

to apply it.

See also
setView
setViewConfig
writeConfig

Definition at line 2081 of file kdiroperator.cpp.

void KDirOperator::rereadDir ( )
virtualslot

Re-reads the current url.

Definition at line 1089 of file kdiroperator.cpp.

void KDirOperator::resetCursor ( )
protectedslot

Restores the normal cursor after showing the busy-cursor.

Also hides the progressbar.

Definition at line 464 of file kdiroperator.cpp.

void KDirOperator::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Reimplemented from QWidget.

Definition at line 2206 of file kdiroperator.cpp.

void KDirOperator::selectDir ( const KFileItem &  item)
protectedvirtualslot

Enters the directory specified by the given item.

Definition at line 1683 of file kdiroperator.cpp.

KFileItemList KDirOperator::selectedItems ( ) const
Returns
a list of all currently selected items. If there is no view, or there are no selected items, an empty list is returned.

Definition at line 542 of file kdiroperator.cpp.

void KDirOperator::selectFile ( const KFileItem &  item)
protectedslot

Emits fileSelected( item )

Definition at line 1688 of file kdiroperator.cpp.

void KDirOperator::setAcceptDrops ( bool  b)
virtual

Reimplemented - allow dropping of files if b is true.

Parameters
btrue if the widget should allow dropping of files

Definition at line 1456 of file kdiroperator.cpp.

void KDirOperator::setCurrentItem ( const QString &  url)

Clears the current selection and attempts to set url the current url file.

Note that urls can be relative or absolute.

Definition at line 1704 of file kdiroperator.cpp.

void KDirOperator::setCurrentItem ( const KFileItem &  item)

Clears the current selection and attempts to set item as the current item.

Definition at line 1718 of file kdiroperator.cpp.

void KDirOperator::setCurrentItems ( const QStringList &  urls)

Clears the current selection and attempts to set urls the current url files.

Note that urls can be relative or absolute.

Since
4.2

Definition at line 1737 of file kdiroperator.cpp.

void KDirOperator::setCurrentItems ( const KFileItemList &  items)

Clears the current selection and attempts to set items as the current items.

Since
4.2

Definition at line 1759 of file kdiroperator.cpp.

void KDirOperator::setDecorationPosition ( QStyleOptionViewItem::Position  position)

Sets the position where icons shall be shown relative to the labels of file items in the icon view.

Since
4.2.3

Definition at line 2613 of file kdiroperator.cpp.

void KDirOperator::setDirLister ( KDirLister *  lister)
protectedvirtual

Sets a custom KDirLister to list directories.

The KDirOperator takes ownership of the given KDirLister.

Definition at line 1635 of file kdiroperator.cpp.

void KDirOperator::setDropOptions ( int  options)
virtual

Sets the options for dropping files.

CURRENTLY NOT IMPLEMENTED

Definition at line 1464 of file kdiroperator.cpp.

void KDirOperator::setEnableDirHighlighting ( bool  enable)
virtual

When going up in the directory hierarchy, KDirOperator can highlight the directory that was just left.

I.e. when you go from /home/gis/src to /home/gis, the item "src" will be made the current item.

Default is off.

Definition at line 2306 of file kdiroperator.cpp.

void KDirOperator::setIconsZoom ( int  value)
slot

Notifies that the icons size should change.

value is an int ranged from 0 to 100. 100 means KIconLoader::SizeEnormous.

Since
4.2

Definition at line 934 of file kdiroperator.cpp.

void KDirOperator::setInlinePreviewShown ( bool  show)

Forces the inline previews to be shown or hidden, depending on show.

Parameters
showWhether to show inline previews or not.
Since
4.2

Definition at line 892 of file kdiroperator.cpp.

void KDirOperator::setIsSaving ( bool  isSaving)

If the system is set up to trigger items on single click, if isSaving is true, we will force to double click to accept.

Note
this is false by default
Since
4.2

Definition at line 907 of file kdiroperator.cpp.

void KDirOperator::setMimeFilter ( const QStringList &  mimetypes)

Sets a list of mimetypes as filter.

Only files of those mimetypes will be shown.

Example:

QStringList filter;
filter << "text/html" << "image/png" << "inode/directory";
dirOperator->setMimefilter( filter );

Node: Without the mimetype inode/directory, only files would be shown. Call updateDir() to apply it.

See also
KDirLister::setMimeFilter
mimeFilter

Definition at line 1267 of file kdiroperator.cpp.

void KDirOperator::setMode ( KFile::Modes  m)
virtual

Sets the listing/selection mode for the views, an OR'ed combination of.

  • File
  • Directory
  • Files
  • ExistingOnly
  • LocalOnly

You cannot mix File and Files of course, as the former means single-selection mode, the latter multi-selection.

Definition at line 1511 of file kdiroperator.cpp.

void KDirOperator::setNameFilter ( const QString &  filter)

Sets a filter like "*.cpp *.h *.o".

Only files matching that filter will be shown.

See also
KDirLister::setNameFilter
nameFilter

Definition at line 1256 of file kdiroperator.cpp.

void KDirOperator::setNewFileMenuSupportedMimeTypes ( const QStringList &  mime)

Only show the files in a given set of mimetypes.

This is useful in specialized applications (while file managers, on the other hand, want to show all mimetypes). Internally uses KNewFileMenu::setSupportedMimeTypes

Example:

QStringList mimeTypes;
mimeTypes << "text/html" << "inode/directory";
dirOperator->setNewFileMenuSupportedMimeTypes(mimeTypes);

Note: If the list is empty, all options will be shown. Otherwise, without the mimetype inode/directory, only file options will be shown.

See also
KNewFileMenu::setSupportedMimeTypes
newFileMenuSupportedMimeTypes
Since
4.5

Definition at line 1278 of file kdiroperator.cpp.

void KDirOperator::setOnlyDoubleClickSelectsFiles ( bool  enable)

This toggles between double/single click file and directory selection mode.

When argument is true, files and directories are highlighted with single click and selected (executed) with double click.

NOTE: this is not implemented in KDE 4 yet

The default follows the signle/double click system setting.

Definition at line 2233 of file kdiroperator.cpp.

void KDirOperator::setPreviewWidget ( KPreviewWidgetBase *  w)
virtual

Sets a preview-widget to be shown next to the file-view.

The ownership of w is transferred to KDirOperator, so don't delete it yourself!

Definition at line 520 of file kdiroperator.cpp.

void KDirOperator::setShowHiddenFiles ( bool  s)
virtual

Enables/disables showing hidden files.

Definition at line 2598 of file kdiroperator.cpp.

void KDirOperator::setSorting ( QDir::SortFlags  spec)

Sets the way to sort files and directories.

Definition at line 436 of file kdiroperator.cpp.

void KDirOperator::setupActions ( )
protected

Sets up all the actions.

Called from the constructor, you usually better not call this.

Definition at line 1830 of file kdiroperator.cpp.

void KDirOperator::setupMenu ( int  whichActions)

Sets up the action menu.

Parameters
whichActionsis an value of OR'd ActionTypes that controls which actions to show in the action menu

Definition at line 1996 of file kdiroperator.cpp.

void KDirOperator::setupMenu ( )
protected

Sets up the context-menu with all the necessary actions.

Called from the constructor, you usually don't need to call this.

Definition at line 1991 of file kdiroperator.cpp.

void KDirOperator::setUrl ( const KUrl &  url,
bool  clearforward 
)
virtual

Sets a new url to list.

Parameters
clearforwardspecifies whether the "forward" history should be cleared.
urlthe URL to set

Definition at line 1022 of file kdiroperator.cpp.

void KDirOperator::setView ( QAbstractItemView *  view)
virtual

Sets a new view to be used for showing and browsing files.

Note: this will read the current url() to fill the view.

See also
KFileTreeView
view

Definition at line 1525 of file kdiroperator.cpp.

void KDirOperator::setView ( KFile::FileView  viewKind)
virtual

Sets one of the predefined fileviews.

See also
KFile::FileView

Definition at line 1472 of file kdiroperator.cpp.

void KDirOperator::setViewConfig ( KConfigGroup &  configGroup)
virtual

Sets the config object and the to be used group in KDirOperator.

This will be used to store the view's configuration. If you don't set this, the views cannot save and restore their configuration.

Usually you call this right after KDirOperator creation so that the view instantiation can make use of it already.

Note that KDirOperator does NOT take ownership of that object (typically it's KGlobal::config() anyway.

You must not delete the KConfig or KConfigGroup object (and master config object) before either deleting the KDirOperator or calling setViewConfig(0); or something like that

See also
viewConfig
viewConfigGroup

Definition at line 2587 of file kdiroperator.cpp.

bool KDirOperator::showHiddenFiles ( ) const
Returns
true when hidden files are shown or false otherwise.

Definition at line 2603 of file kdiroperator.cpp.

void KDirOperator::slotCompletionMatch ( const QString &  match)
protectedslot

Tries to make the given match as current item in the view and emits completion( match )

Definition at line 1824 of file kdiroperator.cpp.

void KDirOperator::sortByDate ( )
protectedslot

Changes sorting to sort by date.

Definition at line 481 of file kdiroperator.cpp.

void KDirOperator::sortByName ( )
protectedslot

Changes sorting to sort by name.

Definition at line 471 of file kdiroperator.cpp.

void KDirOperator::sortBySize ( )
protectedslot

Changes sorting to sort by size.

Definition at line 476 of file kdiroperator.cpp.

void KDirOperator::sortByType ( )
protectedslot

Changes sorting to sort by date.

Definition at line 486 of file kdiroperator.cpp.

QDir::SortFlags KDirOperator::sorting ( ) const
Returns
the current way of sorting files and directories

Definition at line 441 of file kdiroperator.cpp.

void KDirOperator::sortReversed ( )
protectedslot

Changes sorting to reverse sorting.

Definition at line 491 of file kdiroperator.cpp.

void KDirOperator::toggleDirsFirst ( )
protectedslot

Toggles showing directories first / having them sorted like files.

Definition at line 497 of file kdiroperator.cpp.

void KDirOperator::toggleIgnoreCase ( )
protectedslot

Toggles case sensitive / case insensitive sorting.

Definition at line 502 of file kdiroperator.cpp.

KIO::CopyJob * KDirOperator::trash ( const KFileItemList &  items,
QWidget *  parent,
bool  ask = true,
bool  showProgress = true 
)
virtual

Starts and returns a KIO::CopyJob to trash the given items.

Parameters
itemsthe list of items to be trashed
parentthe parent widget used for the confirmation dialog
askspecifies whether a confirmation dialog should be shown
showProgresspassed to the CopyJob to show a progress dialog

Definition at line 837 of file kdiroperator.cpp.

void KDirOperator::trashSelected ( )
virtualslot

Trashes the currently selected files/directories.

This function used to take activation reason and keyboard modifiers, in order to call deleteSelected() if the user wanted to delete. Instead, call deleteSelected().

FIXME KAction Port: link deleteSelected() up correctly

Definition at line 917 of file kdiroperator.cpp.

void KDirOperator::updateDir ( )
slot

to update the view after changing the settings

Definition at line 1082 of file kdiroperator.cpp.

void KDirOperator::updateInformation ( int  files,
int  dirs 
)
signal
void KDirOperator::updateSelectionDependentActions ( )
slot

Enables/disables actions that are selection dependent.

Call this e.g. when you are about to show a popup menu using some of KDirOperators actions.

Definition at line 511 of file kdiroperator.cpp.

void KDirOperator::updateSortActions ( )
protected

Updates the sorting-related actions to comply with the current sorting.

See also
sorting

Definition at line 2052 of file kdiroperator.cpp.

void KDirOperator::updateViewActions ( )
protected

Updates the view-related actions to comply with the current KFile::FileView.

Definition at line 2067 of file kdiroperator.cpp.

KUrl KDirOperator::url ( ) const
Returns
the current url

Definition at line 1231 of file kdiroperator.cpp.

void KDirOperator::urlEntered ( const KUrl &  )
signal
QAbstractItemView * KDirOperator::view ( ) const
Returns
the currently used view.
See also
setView

Definition at line 1501 of file kdiroperator.cpp.

void KDirOperator::viewChanged ( QAbstractItemView *  newView)
signal

Emitted whenever the current fileview is changed, either by an explicit call to setView() or by the user selecting a different view thru the GUI.

KConfigGroup * KDirOperator::viewConfigGroup ( ) const

Definition at line 2593 of file kdiroperator.cpp.

void KDirOperator::writeConfig ( KConfigGroup &  configGroup)
virtual

Saves the current settings like sorting, simple or detailed view.

See also
readConfig
setViewConfig

Definition at line 2138 of file kdiroperator.cpp.


The documentation for this class was generated from the following files:
  • kdiroperator.h
  • kdiroperator.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

Skip menu "KFile"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal