KIO

kdirlister.cpp
1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 1998, 1999 Torben Weis <weis@kde.org>
4 SPDX-FileCopyrightText: 2000 Carsten Pfeiffer <pfeiffer@kde.org>
5 SPDX-FileCopyrightText: 2003-2005 David Faure <faure@kde.org>
6 SPDX-FileCopyrightText: 2001-2006 Michael Brade <brade@kde.org>
7
8 SPDX-License-Identifier: LGPL-2.0-or-later
9*/
10
11#include "kdirlister.h"
12#include <KJobUiDelegate>
13#include <KJobWidgets>
14#include <kio/listjob.h>
15
16#include <QWidget>
17
18class KDirListerPrivate
19{
20public:
21 KDirListerPrivate()
22 {
23 }
24
25 QWidget *m_window = nullptr; // Main window this lister is associated with
26};
27
29 : KCoreDirLister(parent)
30 , d(new KDirListerPrivate)
31{
32}
33
37
39{
40 return KCoreDirLister::autoErrorHandlingEnabled();
41}
42
44{
45 d->m_window = window;
46}
47
49{
50 return d->m_window;
51}
52
54{
55 if (d->m_window) {
56 KJobWidgets::setWindow(job, d->m_window);
57 }
58}
59
60#include "moc_kdirlister.cpp"
Helper class for the kiojob used to list and update a directory.
QWidget * mainWindow()
Returns the main window associated with this object.
KDirLister(QObject *parent=nullptr)
Create a directory lister.
bool autoErrorHandlingEnabled() const
Check whether auto error handling is enabled.
void setMainWindow(QWidget *window)
Pass the main window this object is associated with this is used for caching authentication data.
~KDirLister() override
Destroy the directory lister.
void jobStarted(KIO::ListJob *) override
Reimplemented to associate a window with new jobs.
A ListJob is allows you to get the get the content of a directory.
Definition listjob.h:28
void setWindow(QObject *job, QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:53:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.