KIO

renamefiledialog.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2006-2010 Peter Penz <peter.penz@gmx.at>
4 SPDX-FileCopyrightText: 2020 Méven Car <meven.car@kdemail.net>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef RENAMEFILEDIALOG_H
10#define RENAMEFILEDIALOG_H
11
12#include <KFileItem>
13
14#include "kiowidgets_export.h"
15
16#include <QDialog>
17#include <QString>
18
19class QLineEdit;
20class QSpinBox;
21class QPushButton;
22class KJob;
23
24namespace KIO
25{
26class RenameFileDialogPrivate;
27
28/**
29 * @class KIO::RenameFileDialog renamefiledialog.h <KIO/RenameFileDialog>
30 *
31 * @brief Dialog for renaming a variable number of files.
32 *
33 * The dialog deletes itself when accepted or rejected.
34 *
35 * @since 5.67
36 */
37// TODO KF6 : rename the class RenameFileDialog to RenameDialog and the class RenameDialog to RenameFileOverwrittenDialog or similar.
38class KIOWIDGETS_EXPORT RenameFileDialog : public QDialog
39{
40 Q_OBJECT
41
42public:
43 /**
44 * Constructs the Dialog to rename file(s)
45 *
46 * @param parent the parent QWidget
47 * @param items a non-empty list of items to rename
48 */
49 explicit RenameFileDialog(const KFileItemList &items, QWidget *parent);
50 ~RenameFileDialog() override;
51
52Q_SIGNALS:
53 void renamingFinished(const QList<QUrl> &urls);
54 void error(KJob *error);
55
56private Q_SLOTS:
57 KIOWIDGETS_NO_EXPORT void slotAccepted();
58 KIOWIDGETS_NO_EXPORT void slotTextChanged(const QString &newName);
59 KIOWIDGETS_NO_EXPORT void slotFileRenamed(const QUrl &oldUrl, const QUrl &newUrl);
60 KIOWIDGETS_NO_EXPORT void slotResult(KJob *job);
61
62private:
63 class RenameFileDialogPrivate;
64 RenameFileDialogPrivate *const d;
65};
66} // namespace KIO
67
68#endif
List of KFileItems, which adds a few helper methods to QList<KFileItem>.
Definition kfileitem.h:632
Dialog for renaming a variable number of files.
A namespace for KIO globals.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.