Commit dc3b8269 authored by Eike Ziller's avatar Eike Ziller
Browse files

ClassView: Remove unnecessary ui file



It was just containing a tree view anyhow

Change-Id: Ied34e370be4dca0a113a861cafc0a8dac5689db7
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent fe5f159e
......@@ -25,8 +25,5 @@ SOURCES += \
classviewtreeitemmodel.cpp \
classviewutils.cpp
FORMS += \
classviewnavigationwidget.ui
RESOURCES += \
classview.qrc
......@@ -18,7 +18,7 @@ QtcPlugin {
"classview.qrc",
"classviewconstants.h",
"classviewmanager.cpp", "classviewmanager.h",
"classviewnavigationwidget.cpp", "classviewnavigationwidget.h", "classviewnavigationwidget.ui",
"classviewnavigationwidget.cpp", "classviewnavigationwidget.h",
"classviewnavigationwidgetfactory.cpp", "classviewnavigationwidgetfactory.h",
"classviewparser.cpp", "classviewparser.h",
"classviewparsertreeitem.cpp", "classviewparsertreeitem.h",
......
......@@ -90,16 +90,20 @@ namespace Internal {
NavigationWidget::NavigationWidget(QWidget *parent) :
QWidget(parent)
{
ui = new Ui::NavigationWidget;
ui->setupUi(this);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
verticalLayout->setSpacing(0);
verticalLayout->setContentsMargins(0, 0, 0, 0);
treeView = new ::Utils::NavigationTreeView(this);
treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
verticalLayout->addWidget(treeView);
// tree model
treeModel = new TreeItemModel(this);
ui->treeView->setModel(treeModel);
treeView->setModel(treeModel);
// connect signal/slots
// selected item
connect(ui->treeView, SIGNAL(activated(QModelIndex)), SLOT(onItemActivated(QModelIndex)));
connect(treeView, SIGNAL(activated(QModelIndex)), SLOT(onItemActivated(QModelIndex)));
// connections to the manager
Manager *manager = Manager::instance();
......@@ -122,7 +126,6 @@ NavigationWidget::NavigationWidget(QWidget *parent) :
NavigationWidget::~NavigationWidget()
{
delete ui;
}
void NavigationWidget::hideEvent(QHideEvent *event)
......@@ -249,7 +252,7 @@ void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
QModelIndex sessionIndex;
for (int i = 0; i < treeModel->rowCount(sessionIndex); ++i)
ui->treeView->expand(treeModel->index(i, 0, sessionIndex));
treeView->expand(treeModel->index(i, 0, sessionIndex));
if (debug)
qDebug() << "Class View:" << QDateTime::currentDateTime().toString()
......@@ -267,7 +270,7 @@ void NavigationWidget::fetchExpandedItems(QStandardItem *item, const QStandardIt
return;
const QModelIndex &parent = treeModel->indexFromItem(target);
if (ui->treeView->isExpanded(parent) && Manager::instance()->canFetchMore(item, true))
if (treeView->isExpanded(parent) && Manager::instance()->canFetchMore(item, true))
Manager::instance()->fetchMore(item, true);
int itemIndex = 0;
......
......@@ -31,7 +31,8 @@
#define CLASSVIEWNAVIGATIONWIDGET_H
#include "classviewtreeitemmodel.h"
#include "ui_classviewnavigationwidget.h"
#include <utils/navigationtreeview.h>
#include <QList>
#include <QSharedPointer>
......@@ -39,6 +40,7 @@
#include <QPointer>
#include <QStandardItem>
#include <QToolButton>
#include <QVBoxLayout>
#include <QWidget>
namespace ClassView {
......@@ -86,7 +88,7 @@ protected:
void showEvent(QShowEvent *event);
private:
Ui::NavigationWidget *ui;
Utils::NavigationTreeView *treeView;
TreeItemModel *treeModel;
QPointer<QToolButton> fullProjectsModeButton;
};
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ClassView::Internal::NavigationWidget</class>
<widget class="QWidget" name="ClassView::Internal::NavigationWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="Utils::NavigationTreeView" name="treeView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Utils::NavigationTreeView</class>
<extends>QTreeView</extends>
<header>utils/navigationtreeview.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
Supports Markdown
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