10#ifndef PROFILE_TREEVIEW_H
11#define PROFILE_TREEVIEW_H
16#include <QItemDelegate>
39 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
46 virtual void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
111 virtual void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected);
Item delegate that provides inline editing for profile name cells in the profile tree view.
Definition profile_tree_view.h:23
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Creates and returns an editor widget for the cell at index.
Definition profile_tree_view.cpp:23
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Populates the editor widget with the current value from the model.
Definition profile_tree_view.cpp:32
Tree view specialised for displaying and editing configuration profiles, with inline editing support ...
Definition profile_tree_view.h:59
virtual void mouseDoubleClickEvent(QMouseEvent *event)
Opens an inline editor for the double-clicked cell when the profile is editable; otherwise propagates...
Definition profile_tree_view.cpp:93
~ProfileTreeView()
Destroys the view and releases the associated delegate.
Definition profile_tree_view.cpp:51
void itemUpdated()
Emitted when a profile item has been modified through the inline editor.
virtual void showEvent(QShowEvent *)
Restores the previously selected row when the view becomes visible.
Definition profile_tree_view.cpp:107
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Responds to selection changes, updating UI state and emitting itemUpdated() when appropriate.
Definition profile_tree_view.cpp:56
void selectRow(int row)
Selects the row at row in the view, scrolling it into view if necessary.
Definition profile_tree_view.cpp:80
bool activeEdit()
Returns whether an inline edit is currently active in the view.
Definition profile_tree_view.cpp:100