Commit 24a225de authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Avoid a bunch of function calls

parent f14c50da
...@@ -85,16 +85,17 @@ void NavigatorView::modelAttached(Model *model) ...@@ -85,16 +85,17 @@ void NavigatorView::modelAttached(Model *model)
m_treeModel->setView(this); m_treeModel->setView(this);
treeWidget()->expandAll(); QTreeView *treeView = treeWidget();
treeView->expandAll();
treeWidget()->header()->setResizeMode(0, QHeaderView::Stretch); treeView->header()->setResizeMode(0, QHeaderView::Stretch);
treeWidget()->header()->resizeSection(1,26); treeView->header()->resizeSection(1,26);
treeWidget()->setRootIsDecorated(false); treeView->setRootIsDecorated(false);
treeWidget()->setIndentation(20); treeView->setIndentation(20);
#ifdef _LOCK_ITEMS_ #ifdef _LOCK_ITEMS_
treeWidget()->header()->resizeSection(2,20); treeView->header()->resizeSection(2,20);
#endif #endif
treeWidget()->setHeaderHidden(true); treeView->setHeaderHidden(true);
} }
void NavigatorView::modelAboutToBeDetached(Model *model) void NavigatorView::modelAboutToBeDetached(Model *model)
......
...@@ -81,9 +81,4 @@ void NavigatorWidget::setTreeModel(QAbstractItemModel* model) ...@@ -81,9 +81,4 @@ void NavigatorWidget::setTreeModel(QAbstractItemModel* model)
m_treeView->setModel(model); m_treeView->setModel(model);
} }
QTreeView *NavigatorWidget::treeView()
{
return m_treeView;
}
} }
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
virtual ~NavigatorWidget(); virtual ~NavigatorWidget();
void setTreeModel(QAbstractItemModel *model); void setTreeModel(QAbstractItemModel *model);
QTreeView *treeView(); QTreeView *treeView() const { return m_treeView; }
private: private:
NavigatorTreeView *m_treeView; NavigatorTreeView *m_treeView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment