Skip to content

Commit

Permalink
Rename methods to camleCase
Browse files Browse the repository at this point in the history
  • Loading branch information
gpospelov committed Jan 31, 2021
1 parent d4e8d67 commit a994c28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples/treeviews/treeviewscore/sampleeditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SampleEditorWdiget::SampleEditorWdiget(SessionModel* model, QWidget* parent)
layout->addLayout(createRightLayout());
setLayout(layout);

connect_views();
setupConnections();

m_sessionModel->setUndoRedoEnabled(true);
m_undoView->setStack(UndoStack::qtUndoStack(m_sessionModel->undoStack()));
Expand All @@ -52,7 +52,7 @@ void SampleEditorWdiget::onContextMenuRequest(const QPoint& point)
{
auto treeView = qobject_cast<QTreeView*>(sender());

auto item = item_from_view(treeView, point);
auto item = itemFromView(treeView, point);
auto tagrow = item->tagRow();

QMenu menu;
Expand All @@ -74,7 +74,7 @@ void SampleEditorWdiget::onContextMenuRequest(const QPoint& point)

//! Returns SessionItem corresponding to given coordinate in a view.

SessionItem* SampleEditorWdiget::item_from_view(QTreeView* view, const QPoint& point)
SessionItem* SampleEditorWdiget::itemFromView(QTreeView* view, const QPoint& point)
{
QModelIndex index = view->indexAt(point);
auto view_item = m_defaultTreeView->viewModel()->itemFromIndex(index);
Expand All @@ -83,7 +83,7 @@ SessionItem* SampleEditorWdiget::item_from_view(QTreeView* view, const QPoint& p

//! Connect tree views to provide mutual item selection.

void SampleEditorWdiget::connect_views()
void SampleEditorWdiget::setupConnections()
{
// select items in other views when selection in m_defaultTreeView has changed
auto on_item_selected = [this](SessionItem* item) {
Expand Down
4 changes: 2 additions & 2 deletions examples/treeviews/treeviewscore/sampleeditorwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ private slots:
void onContextMenuRequest(const QPoint& point);

private:
ModelView::SessionItem* item_from_view(QTreeView* view, const QPoint& point);
ModelView::SessionItem* itemFromView(QTreeView* view, const QPoint& point);

QBoxLayout* createLeftLayout();
QBoxLayout* createMiddleLayout();
QBoxLayout* createRightLayout();

void connect_views();
void setupConnections();

QUndoView* m_undoView{nullptr};
ModelView::AllItemsTreeView* m_defaultTreeView{nullptr};
Expand Down

0 comments on commit a994c28

Please sign in to comment.