X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d9ac44e08f8d2abe7104c20e308d05038e1896da..b1c9b5126d:/src/renamedialog.h diff --git a/src/renamedialog.h b/src/renamedialog.h index c08856f8c..1eaae2c61 100644 --- a/src/renamedialog.h +++ b/src/renamedialog.h @@ -19,11 +19,14 @@ #ifndef RENAMEDIALOG_H #define RENAMEDIALOG_H +#include "libdolphin_export.h" + #include #include -#include +class KFileItem; +class KFileItemList; class KLineEdit; /** @@ -45,34 +48,46 @@ class KLineEdit; * } * \endcode */ -class RenameDialog : public KDialog +class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public KDialog { Q_OBJECT public: - explicit RenameDialog(const KUrl::List& items); + explicit RenameDialog(QWidget *parent, const KFileItemList& items); virtual ~RenameDialog(); /** - * Returns the new name of the items. If the returned string is not empty, - * then it is assured that the string contains exactly one character #, - * which should be replaced by ascending numbers. An empty string indicates - * that the user has removed the # character. + * Returns the new name of the items. If more than one + * item should be renamed, then it is assured that the # character + * is part of the returned string. If the returned string is empty, + * then RenameDialog::errorString() should be used to show the reason + * of having an empty string (e. g. if the # character has + * been deleted by the user, although more than one item should be + * renamed). */ - const QString& newName() const { return m_newName; } + const QString& newName() const + { + return m_newName; + } /** * Returns the error string, if Dialog::newName() returned an empty string. */ - const QString& errorString() const { return m_errorString; } + const QString& errorString() const + { + return m_errorString; + } protected slots: virtual void slotButtonClicked(int button); private: + bool m_renameOneItem; KLineEdit* m_lineEdit; QString m_newName; QString m_errorString; + + friend class RenameDialogTest; // allow access for unit testing }; #endif