]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/renamedialog.h
Port away from KDELibs4Support (we only use KDELibs4Support when baloo isn't present...
[dolphin.git] / src / views / renamedialog.h
index 18dca3617990d46560a30279d54cd94d47066267..a1953e8b35e6afdb7379586493f76ea854b0a71a 100644 (file)
 #ifndef RENAMEDIALOG_H
 #define RENAMEDIALOG_H
 
-#include "libdolphin_export.h"
+#include "dolphin_export.h"
 
-#include <KDialog>
+#include <QDialog>
 #include <KFileItem>
-
-class KLineEdit;
-class KIntSpinBox;
-
 #include <QString>
 
+class QLineEdit;
+class QSpinBox;
+class QPushButton;
+
 /**
  * @brief Dialog for renaming a variable number of files.
  */
-class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public KDialog
+class DOLPHIN_EXPORT RenameDialog : public QDialog
 {
     Q_OBJECT
 
@@ -41,14 +41,13 @@ public:
     explicit RenameDialog(QWidget* parent, const KFileItemList& items);
     virtual ~RenameDialog();
 
-protected slots:
-    virtual void slotButtonClicked(int button);
-
 private slots:
+    void slotAccepted();
     void slotTextChanged(const QString& newName);
 
 private:
     void renameItems();
+    void renameItem(const KFileItem &item, const QString& newName);
 
     /**
      * @return Returns the string \p name, where the characters represented by
@@ -62,9 +61,11 @@ private:
 private:
     bool m_renameOneItem;
     QString m_newName;
-    KLineEdit* m_lineEdit;
+    QLineEdit* m_lineEdit;
     KFileItemList m_items;
-    KIntSpinBox* m_spinBox;
+    bool m_allExtensionsDifferent;
+    QSpinBox* m_spinBox;
+    QPushButton* m_okButton;
 };
 
 #endif