X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5a0da4a9c8d10dc1921077d84bdabf05d20150b0..cebcf8db:/src/kitemviews/private/kitemlistroleeditor.h diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h index a0f55df51..eb8a9cb5e 100644 --- a/src/kitemviews/private/kitemlistroleeditor.h +++ b/src/kitemviews/private/kitemlistroleeditor.h @@ -11,15 +11,14 @@ #include -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(QWidget* parent); + explicit KItemListRoleEditor(QWidget *parent); ~KItemListRoleEditor() override; - void setRole(const QByteArray& role); + 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