]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/private/kitemlistroleeditor.h
Port from KIconLoader::drawOverlays to KIconUtils::addOverlays
[dolphin.git] / src / kitemviews / private / kitemlistroleeditor.h
index a0f55df51f89e871f2da5556c8e5f2dc94080c10..eb8a9cb5edfb3f3cea8f094fb41d02307f4de298 100644 (file)
 
 #include <KTextEdit>
 
-enum EditResultDirection{
+enum EditResultDirection {
     EditDone,
     EditNext,
     EditPrevious,
 };
 Q_DECLARE_METATYPE(EditResultDirection)
 
-struct EditResult
-{
+struct EditResult {
     QString newName;
     EditResultDirection direction;
 };
@@ -39,30 +38,30 @@ class DOLPHIN_EXPORT KItemListRoleEditor : public KTextEdit
     Q_OBJECT
 
 public:
-    explicit KItemListRoleEditor(QWidgetparent);
+    explicit KItemListRoleEditor(QWidget *parent);
     ~KItemListRoleEditor() override;
 
-    void setRole(const QByteArrayrole);
+    void setRole(const QByteArray &role);
     QByteArray role() const;
 
     void setAllowUpDownKeyChainEdit(bool allowChainEdit);
-    bool eventFilter(QObject* watched, QEvent* event) override;
+    bool eventFilter(QObject *watched, QEvent *event) override;
 
 Q_SIGNALS:
-    void roleEditingFinished(const QByteArray& role, const QVariant& value);
-    void roleEditingCanceled(const QByteArray& role, const QVariant& value);
-
-protected:
-    bool event(QEvent* event) override;
-    void keyPressEvent(QKeyEvent* event) override;
+    void roleEditingFinished(const QByteArray &role, const QVariant &value);
+    void roleEditingCanceled(const QByteArray &role, const QVariant &value);
 
-private Q_SLOTS:
+public Q_SLOTS:
     /**
      * Increases the size of the editor in case if there is not
      * enough room for the text.
      */
     void autoAdjustSize();
 
+protected:
+    bool event(QEvent *event) override;
+    void keyPressEvent(QKeyEvent *event) override;
+
 private:
     /**
      * Emits the signal roleEditingFinished if m_blockFinishedSignal